Blog

Data Analytics

Semantic Layer First: Getting Your BI Ready for AI Agents

Semantic Layer First: Getting Your BI Ready for AI Agents

AI agents answer business questions correctly only when metrics, joins and terms are defined once in a semantic layer. What it is and how to build one.

AI agents answer business questions correctly only when metrics, joins and terms are defined once in a semantic layer. What it is and how to build one.

7 min read
Mehmet, Vizio AI Tech Lead, leading software development, technical architecture, and digital product delivery.
Mehmet Can Duvarci
Head of Tech

Blog

Data Analytics

Semantic Layer First: Getting Your BI Ready for AI Agents

AI agents answer business questions correctly only when metrics, joins and terms are defined once in a semantic layer. What it is and how to build one.

7 min read
Mehmet, Vizio AI Tech Lead, leading software development, technical architecture, and digital product delivery.
Mehmet Can Duvarci
Head of Tech
Dithered illustration of a marble hand resting one finger on a single red entry in a great stone lexicon, above a vast archive of ledgers.
logo of Facebook
logo of X
logo of LinkedIn
logo of Reddit
logo of Telegram
Contents
No headings found on page

AI agents need a semantic layer because they otherwise guess. Asked for "revenue last quarter", an agent working on raw tables has to pick the table, the joins, the filters and the formula itself, and it can pick differently each time. A semantic layer defines each metric, dimension and relationship once, so every agent and dashboard computes the same answer.

Picture a finance lead who asks the company's new AI assistant for net revenue by region last quarter. The assistant writes SQL, returns a clean table, and the total is a few percent off the board pack. Nobody can say why at first. Later someone works it out: the assistant summed gross order value, ignored refunds and joined customers to regions through the billing address instead of the sales territory. Each choice was reasonable. None of them was the company's definition, because that definition only existed inside one Power BI report.

What is a semantic layer?

A semantic layer is a set of shared business definitions (metrics, dimensions, relationships and plain-language descriptions) that sits between your raw tables and every tool that asks questions of them. It turns "net revenue" from a formula someone remembers into an object with one definition that every report and agent uses.

A few terms, each in one sentence:

  • A metric is a calculation the business agrees on, such as net revenue or active customers.

  • A dimension is a way to group or filter that metric, such as region, product line or month.

  • A relationship is the approved join between two tables, such as orders to customers on customer ID.

  • Grain is what one row in a table represents, such as one order or one order line.

Most companies already have a semantic layer, just not in one place. It is split across Power BI or Tableau models, spreadsheet formulas, dbt models and the heads of two analysts.

Why do AI agents get business questions wrong without one?

Without a semantic layer, an agent has to infer business meaning from column names, and column names rarely carry the rules. A table called orders does not say whether cancelled orders count, which currency to use or which date marks a sale.

The usual failure points:

  • Ambiguous names. Two columns called amount, in two tables, mean different things.

  • Wrong joins. Joining at the wrong grain duplicates rows and inflates totals.

  • Missing filters. Test accounts, refunds or internal orders are left in.

  • Ratios computed wrongly. Averaging a ratio per region gives a different answer from dividing the totals.

  • Drift. The answer changes when the agent picks a different path next time.

Microsoft says much the same about its own Copilot in Power BI. Its guidance on preparing data for AI states that "when data is unstructured or ambiguous, AI systems can struggle to correctly interpret it", and that outputs "might be generic, inaccurate, or even misleading". It also notes that preparation "can't ensure a specific output every time", because AI behaviour is nondeterministic. A semantic layer narrows the room for error. It does not remove the need to test.

What are Snowflake, Databricks and dbt shipping for this?

The major data platforms now treat semantic definitions as database objects that both BI tools and AI agents can read. That is the main change of the last year: definitions are moving out of individual dashboards and into the platform.

A marble hand laying a measuring rod against a standard measure bar set into a marble wall, with copies of its shadow on many floor tiles
  • Snowflake semantic views: definitions live as schema-level objects in Snowflake; Cortex Analyst and Cortex Agents read them.

  • Databricks Unity Catalog metric views: YAML definitions registered in Unity Catalog; Genie, dashboards and external BI tools read them.

  • dbt Semantic Layer (MetricFlow): definitions live in your dbt project; AI tools such as Claude and ChatGPT reach them through the dbt MCP server.

  • Power BI semantic model with Prep data for AI (preview): definitions live in the Power BI semantic model; Copilot in Power BI reads them.

Snowflake semantic views

Snowflake semantic views are schema-level objects that store logical tables, relationships, facts, dimensions and metrics in the database. Defining them became generally available at Snowflake Summit in June 2025, and Cortex Analyst reads the definition to generate SQL against the physical tables.

Databricks metric views

Unity Catalog metric views separate measure definitions from the dimensions used to group them. Databricks' own example is a ratio, "sum of revenue divided by distinct customer count", defined once and grouped by any field while the engine computes it correctly. They can be queried from Genie, dashboards and external tools such as Power BI and Tableau; a BI compatibility mode for Power BI was released in beta in March 2026.

dbt Semantic Layer and the Fivetran merger

The dbt Semantic Layer, powered by MetricFlow, defines metrics in the dbt project, so a change "is refreshed everywhere it's invoked". dbt's documentation says AI tools such as Claude and ChatGPT can connect to it through the dbt MCP server, "so their answers use your governed metrics instead of guessing at raw tables". Fivetran and dbt Labs completed their merger on 1 June 2026, and a DocuSign data architecture lead quoted in the announcement puts it plainly: "AI and agents are only as strong as the data behind them."

Where should the semantic layer live: in the BI tool or the warehouse?

Put core metrics where most of their consumers can reach them. If agents, notebooks and more than one BI tool need the same numbers, define them in the warehouse or in dbt. If everything runs through one BI tool, its semantic model can be enough for now.

Signs the BI model is enough

  • One BI tool, one team and one main agent experience, such as Copilot in Power BI.

  • Metrics change rarely, and the owners are the report authors.

Signs it should move down a level

  • The same metric is rebuilt in two or more tools, and the numbers differ.

  • Agents query the warehouse directly, outside the BI tool.

  • Finance, sales and operations each keep their own version of a shared metric.

Moving the layer down does not mean deleting BI models. The BI tool keeps formatting, report logic and visuals; the warehouse or dbt holds the definitions.

How do you build a semantic layer that agents can use?

Start with the ten to twenty metrics people actually ask about, define each one in plain language and in code, and test the agent against questions with known answers before anyone relies on it.

Steps

  1. Collect the real questions. Pull them from leadership packs, recurring requests to the data team and the questions people already type into chat tools.

  2. Pick the metrics behind them. Choose a short list and name an owner for each.

  3. Write the definition in words first. For example: "Net revenue is gross order value minus refunds and discounts, in euros, by order date, excluding test accounts."

  4. Fix the grain and the joins. Document what one row means in each table, and which joins are approved.

  5. Encode it in one place. Use semantic views, metric views, dbt metrics or the BI semantic model, not all four.

  6. Add synonyms and descriptions. Agents read them. "Sales", "revenue" and "turnover" should point to the right metric, or to a clear question back.

  7. Connect the agent to the layer, not to raw tables. Give it read access to the governed objects only.

Two marble hands steadying a stone balance scale, a sphere of glyphs on one pan and engraved tablets on the other, its pointer level and red

Test before you trust it

Build an evaluation set: thirty or so questions with answers your analysts have checked. Run it after every change to a definition or to the agent. Power BI's verified answers do something similar inside one model, tying trigger phrases to a visual whose result someone has approved. Track which questions fail and why; most failures point to a missing definition or synonym, not a model problem.

How we approach it at Vizio AI

We start from the questions, not the tools. With the client's analysts, we collect the questions leadership and operations ask most often, trace each answer back to the tables and formulas behind it, and write down where the current reports disagree.

From that list we agree the core metrics, their owners and their definitions in plain language, and only then choose where to encode them, usually in the platform the client already runs. We connect the agent to those governed objects with read-only access, build the evaluation set with the analysts, and keep it running after handover so a changed definition shows up as a failed test, not a wrong board number.

This is part of our DX Studio work. If the agent reaches the warehouse through MCP, Connecting an AI Agent to Your CRM? Secure the MCP Server First covers access control. For the model behind the agent, see Claude, GPT or Gemini? Choosing a Model for Business Workflows, and for how we set up the reporting side, Power BI Implementation in 30 Days.

Sources

FAQs.

01

Is a semantic layer the same as a data warehouse?

No. A data warehouse stores the data; a semantic layer describes what it means. The warehouse holds tables of orders, customers and refunds. The semantic layer says how those tables join, what one row represents and how net revenue is calculated from them. Some platforms store the semantic layer inside the warehouse as views, but it is still a separate set of definitions on top of the data.

02

Do we need dbt to have a semantic layer?

No. dbt is one option. Snowflake semantic views, Databricks metric views and a well-built Power BI semantic model are others. The right choice depends on where your data already lives and how many tools need the same metrics. What matters is that each core metric is defined in one place and that agents and reports read from it.

03

How many metrics should we define before connecting an AI agent?

Start with the metrics behind the questions people ask most, often ten to twenty. Each needs an owner, a plain-language definition, a fixed grain and tested joins. Leave the agent unable to answer questions outside that set, or have it say it does not know, rather than letting it improvise against raw tables. Add metrics as new questions come in.

04

Can an AI agent still give wrong answers with a semantic layer?

Yes. A semantic layer narrows the choices the agent makes, but the model can still pick the wrong metric, misread a date range or misunderstand the question. Microsoft notes that preparing data for Copilot can't guarantee a specific output every time. That is why an evaluation set of checked questions, run after every change, belongs in the setup.

05

Who should own the semantic layer?

The data team usually maintains it, but each metric needs a business owner who signs off on its definition, such as finance for revenue and sales operations for pipeline. Changes go through review like code. Without named owners, definitions drift back into individual reports and agents start to disagree again.

01

Is a semantic layer the same as a data warehouse?

No. A data warehouse stores the data; a semantic layer describes what it means. The warehouse holds tables of orders, customers and refunds. The semantic layer says how those tables join, what one row represents and how net revenue is calculated from them. Some platforms store the semantic layer inside the warehouse as views, but it is still a separate set of definitions on top of the data.

02

Do we need dbt to have a semantic layer?

No. dbt is one option. Snowflake semantic views, Databricks metric views and a well-built Power BI semantic model are others. The right choice depends on where your data already lives and how many tools need the same metrics. What matters is that each core metric is defined in one place and that agents and reports read from it.

03

How many metrics should we define before connecting an AI agent?

Start with the metrics behind the questions people ask most, often ten to twenty. Each needs an owner, a plain-language definition, a fixed grain and tested joins. Leave the agent unable to answer questions outside that set, or have it say it does not know, rather than letting it improvise against raw tables. Add metrics as new questions come in.

04

Can an AI agent still give wrong answers with a semantic layer?

Yes. A semantic layer narrows the choices the agent makes, but the model can still pick the wrong metric, misread a date range or misunderstand the question. Microsoft notes that preparing data for Copilot can't guarantee a specific output every time. That is why an evaluation set of checked questions, run after every change, belongs in the setup.

05

Who should own the semantic layer?

The data team usually maintains it, but each metric needs a business owner who signs off on its definition, such as finance for revenue and sales operations for pipeline. Changes go through review like code. Without named owners, definitions drift back into individual reports and agents start to disagree again.

Read more.

Dithered illustration of a marble hand resting one finger on a single red entry in a great stone lexicon, above a vast archive of ledgers.
Semantic Layer First: Getting Your BI Ready for AI Agents
Mehmet Can Duvarci
7 min

AI agents answer business questions correctly only when metrics, joins and terms are defined once in a semantic layer. What it is and how to build one.

Dithered illustration of a marble hand holding a drafting compass between one grand vaulted hall and a cluster of small identical pavilions, with a single yellow point at the compass tip.
HubSpot vs GoHighLevel for Service Businesses Adding AI in 2026
Omer Faruk Ilhan
6 min

HubSpot suits teams wanting one CRM with AI agents across sales, marketing and service. GoHighLevel suits agencies and local firms putting AI on calls.

Dithered illustration of a marble hand lifting the edge of a sculpted veil from a classical face, with a single red thread running through the veil's hem.
The AI Act Delay That Doesn't Apply to You: Article 50 for Chatbots and AI Content
Orhan Gazi Yalcin
8 min

EU AI Act Article 50 has applied since 2 August 2026: chatbots must say they are AI, and AI content must be marked or labelled. Only marking gets until 2 Dec.

Think AI-first.
Move future-fast.

Let’s build what’s next! From product ideas and intelligent workflows to data-driven systems and scalable growth operations.

Have a product idea, AI workflow, data system, or growth challenge that needs clearer execution?

Let’s shape the right system around it.

Think AI-first.
Move future-fast.

Let’s build what’s next! From product ideas and intelligent workflows to data-driven systems and scalable growth operations.