Skip to content
Semantic layer

Define metrics once.

Use them everywhere.

Build a semantic layer from reusable SQL definitions for your most important metrics and models. Basedash AI can reference them across chat, charts, dashboards, insights, and automations.

14-day trial. No credit card required.

Data / Production warehouse
Run definition

Definitions

Activation rate

activation_rate

Monthly recurring revenue

mrr

Qualified pipeline

qualified_pipeline

Cohort retention

cohort_retention

Activation rate

Users who complete onboarding within seven days of signup.

01 select date_trunc('week', signed_up_at) as week,

02 count(*) filter (where onboarded_at <= signed_up_at + interval '7 days')

03 / nullif(count(*), 0) as activation_rate

04 from users where email not like '%@basedash.com'

reference

activation_rate

latest week

42.8%

used by AI

Everywhere

Why it matters

Your metrics get a source of truth.

The definitions feature turns repeat SQL into reusable, AI-readable building blocks.

Deterministic metrics

Save the exact SQL for MRR, activation, churn, retention, or any model your company depends on.

AI-aware by default

Basedash agents see available definitions and can reference them when creating charts, answers, insights, and reports.

Reusable everywhere

Reference definitions inside CTEs with Liquid syntax instead of copying SQL into every dashboard.

Coverage

Every AI workflow can reuse them.

The semantic layer follows the work your team already does in Basedash.

Chat

Ask questions that reuse approved SQL.

Charts

Generate visualizations from trusted models.

Dashboards

Keep every report on the same calculation.

Insights

Spot trends from consistent metric logic.

Automations

Schedule reports with deterministic SQL.

SQL editor

Compose definitions inside larger queries.

Examples

Model the numbers teams trust.

Start with calculations that show up in dashboards, board reports, and chat.

Revenue

Monthly recurring revenue

mrr

Recurring invoice lines, excluding trials and one-time credits.

Growth

Activation rate

activation_rate

Users who complete onboarding within seven days of signup.

Product

Cohort retention

cohort_retention

Weekly retained accounts by signup cohort and plan.

FAQ

Semantic layer, answered.

What is the Basedash semantic layer? +

The Basedash semantic layer is powered by definitions: saved SQL queries scoped to a data source. Each definition has a name, reference name, description, and SQL query that Basedash can expand inside other queries.

How does the AI use the semantic layer? +

Basedash gives AI agents a catalog of definitions for the data sources they are using. The AI can inspect a definition, reference it in SQL, or create and update definitions when an admin asks for reusable metric logic.

How do I reference a definition in SQL? +

Use Liquid syntax like {{ definition("mrr") }} inside a query on the same data source. We recommend placing definitions inside CTEs so the final query stays readable.

How is the semantic layer different from skills? +

They are deterministic SQL. Skills are prose instructions for the AI. Use definitions when the calculation itself should be reusable, and skills when the AI needs broader business guidance.

Get started in under 30 minutes

We can help you migrate your data and dashboards from any other tool.