---
title: "Semantic Layer vs Metrics Layer for AI Agents"
url: "https://atlan.com/know/ai-agent/semantic-layer/semantic-layer-vs-metrics-layer/"
description: "How a metrics layer and a semantic layer differ in 2026, what each gives an AI agent, and how to test whether yours holds up when agents ask the questions."
author: "Emily Winks"
author_role: "Data Governance Expert"
published: "2026-09-10"
updated: "2026-12-03T00:00:00.000Z"
---

## Semantic layer vs metrics layer: what's the difference?

A metrics layer holds one agreed definition per KPI: the formula, filters, time grain and owner. A semantic layer covers more: table meaning, joins, dimensions, metrics and often access rules, usually organized per view or subject area. For AI agents, the label matters less than the shape. Business questions start with a metric, so agents answer best when each metric carries its formula, joins and SQL in one place. Keep the semantic layer you run; it becomes a source.

Key distinction

- **Metrics layer**: one definition per KPI, with formula, filters, grain and an owner
- **Semantic layer**: table meaning, joins, dimensions, metrics and access, often per view
- **Atlan view**: a semantic layer is one slice of context; agents also need who is asking and why
- **What an agent needs**: each metric with its formula, joins and SQL, read before it writes SQL

## Key takeaways

- A metrics layer settles how each KPI is calculated; a semantic layer adds table meaning, joins, dimensions and access.
- Atlan treats a semantic layer as one slice of context: it says what a term means, not who is asking or why.
- In a 2026 test, semantic views alone answered under two in five questions; metrics plus past queries, over four in five.
- Keep the semantic layer you run, and organize what agents read around each metric, with an owner and a version.

---

Pick a metrics layer to fix KPI math that differs across dashboards, and a semantic layer when teams disagree on table meaning, joins or access. Data and analytics engineers connecting AI agents to the warehouse face a third question, where each metric lives and who owns it, because a wrong answer costs them a confident wrong number instead of an error. Atlan's [Analytics Agent Playbook](https://analytics-playbook.atlan.com/#ch01-models) tested this on one go-to-market warehouse with 107 real questions. Switching models moved accuracy about 10 points. Adding past SQL as context moved each model 26 points or more.

### Test Your Semantic Layer for Agents

Give it how your views are split, where each metric is defined and how fixes land. It scores five questions and returns the metrics to reorganize first. [Read the skill](/skills/semantic-layer-agent-test.md).

*Paste into a new chat*

```
Use the skill at https://atlan.com/skills/semantic-layer-agent-test.md to test whether our semantic layer holds up for AI agents. Ask me for whatever it needs.
```

*Run once in a terminal*

```
curl -fsSL --create-dirs \
  -o ~/.agents/skills/semantic-layer-agent-test/SKILL.md \
  https://atlan.com/skills/semantic-layer-agent-test.md
```

*For an agent*

```
curl -fsSL https://atlan.com/skills/semantic-layer-agent-test.md
```


    Human
    Agent


  ClaudeChatGPTGeminiCursorOther
  Copy

| | Metrics layer | Semantic layer |
|---|---|---|
| What it settles | How each KPI is calculated | What data means: tables, joins, dimensions, metrics and access |
| Unit of organization | One entry per metric | Usually one view or model per table or subject area |
| Typical owner | Analytics engineers, with a business owner per metric | Data and analytics teams together |
| What an agent gets | A definition it can run | A view it has to pick before it can answer |
| What it leaves open | Entity meaning and access, unless each metric carries its joins | Questions that span two views, and metrics copied into several views |
| Best for | "Why does revenue differ across dashboards?" | That, plus "what counts as an active customer?" and "who can see this field?" |

---

## Why do semantic layers and metrics layers get mixed up?

The words arrived decades apart and now describe overlapping products.

Semantic layers started inside BI tools in the 1990s, as the place where business names sat on top of raw tables. Metrics layers came much later, when analytics engineers got tired of "active users" meaning something different in every dashboard. Then AI agents gave both terms a new job, and every platform started shipping something it calls a semantic layer.

Atlan's Austin Kronz, a former Gartner analyst who covered BI for five years, hears the confusion on almost every call. On [WTF is the Context Layer, episode three](https://atlan.com/wtf-context-layer/is-semantic-layer-context-layer-recording/), he described checking himself ten minutes into a conversation: "I know we're both saying semantic layer right now, but what do you mean when you say semantic layer?"

The most visible source of the blur is dbt. dbt Labs shipped a metric package called dbt Metrics and a semantic layer built on it, then [deprecated both in December 2023](https://docs.getdbt.com/blog/deprecating-dbt-metrics). It rebuilt the [dbt Semantic Layer](https://atlan.com/dbt-semantic-layer/) on MetricFlow, an engine whose job is to define metrics once and compile them to SQL[1]. The product name says semantic layer. The engine does a metrics layer's work.

So before [comparing tools](https://atlan.com/know/best-semantic-layer-tools/), agree on what each term covers in your own stack.

---

## How does Atlan define a semantic layer?

Atlan treats a semantic layer as one slice of a larger body of business context. Prukalpa Sankar, Atlan's co-founder, put it this way on [episode 1 of the series](https://atlan.com/wtf-context-layer/what-is-context-layer-recording/): a semantic layer is "a subset of a representation of context", the part that relates to your data.

Her example is a question every sales leader asks, and every [text-to-SQL agent](https://atlan.com/know/ai-agent/data-for-ai/text-to-sql-for-enterprise/) gets: "What are my top 10 new customers?" An agent needs four kinds of context to answer it:

1. **User context.** Who is asking, and what decision are they about to make?
2. **Knowledge context.** What does "new" mean in this business?
3. **Meaning context.** What counts as a customer here?
4. **Data context.** How is customer calculated, and in which tables?

A [semantic layer](https://atlan.com/know/semantic-layer/) typically solves the third one, meaning. It maps technical fields to [business terms](https://atlan.com/know/business-context-for-ai/) so a dashboard, a notebook and an [AI agent](https://atlan.com/know/ai-agent/semantic-layer-for-ai-agents/) read "customer" the same way.

### What a semantic layer holds

Every semantic layer, whatever it is called, holds the same four parts:

- **Table meaning:** what each table and column represents in business terms
- **Joins:** the approved paths between tables, so nobody re-derives them
- **Metrics:** the measures, such as revenue or churn
- **Dimensions:** the ways a metric can be cut, such as region, segment or month

Many also enforce [access rules](https://atlan.com/know/ai-agent/semantic-layer/semantic-layer-vs-data-catalog/), so an analyst and an agent acting for that analyst see the same rows. What a semantic layer does not hold is the rest of PK's list: who is asking, and the business knowledge that never made it into a table. That is why Atlan places the semantic layer inside a [context layer](https://atlan.com/know/context-layer-vs-semantic-layer/) rather than treating it as the whole answer, and why an [ontology](https://atlan.com/know/ontology-vs-semantic-layer/) sits beside it.

---

## What is a metrics layer?

A [metrics layer](https://atlan.com/metrics-layer/) holds one agreed definition per metric: the formula, the filters, the time grain, an owner and a version. Every tool that asks for revenue gets the same SQL instead of rebuilding it.

The Analytics Agent Playbook goes a step further and treats [the metric as the unit of context](https://analytics-playbook.atlan.com/#ch02-metric). A real business question hides decisions nobody wrote down. "What was our Q3 pipeline?" hides at least five:

1. Which opportunity stages count as pipeline?
2. Which rows are always left out, such as test or internal accounts?
3. Fiscal quarter or calendar quarter?
4. Which amount, on which table?
5. How the rows are joined before they are summed

A [query that guesses](https://atlan.com/know/ai-agent/semantic-layer/semantic-layer-for-text-to-sql/) any of these runs cleanly and returns a believable, wrong number. In the Playbook's 2026 illustration, an agent that got each decision right four times in five would get all five right only about one time in three. That is arithmetic, not a measurement, but it shows why the decisions belong in the definition.

A metric seals every one of those decisions into a single statement that runs, with a named owner who can correct it. The Playbook found that [the same metric written as SQL beat the same metric written as prose](https://analytics-playbook.atlan.com/#ch02-form) by 16 points on multi-table questions, in a single run of each, because a sentence has to be translated into SQL again on every question.

Atlan's Between the Columns explainer covers metric drift, where two dashboards show two revenue numbers, in under four minutes.





---

## Is a semantic layer enough for AI agents?

On its own, usually not. PK said it directly on episode 1: semantic layers "in its clear definition are not necessarily enough for conversational analytics to work."

The numbers point the same way:

- **On one go-to-market warehouse in 2026**, with 107 real questions graded by code, semantic views as the only way in answered fewer than two in five correctly. AI-generated metrics and trusted past queries, [served per question](https://atlan.com/know/mcp-delivers-business-context/), answered more than four in five ([the Playbook's results](https://analytics-playbook.atlan.com/#ch02-ladder)).
- **Copies drift.** An EMA impact brief on Atlan's Context Conference, published in September 2026, found that when a business rule changes, more than four in five organizations must update it in two or more systems[4]. Each copy is another place an agent can read an outdated metric.
- **Analysts agree on the stakes.** Rita Sallam, Distinguished VP Analyst at Gartner, said in May 2026: ["Agentic AI outcomes depend on context including semantic representations of data."](https://www.gartner.com/en/newsroom/press-releases/2026-05-11-gartner-says-lack-of-semantics-causes-inaccurate-artificial-intelligence-agents-and-wasted-spending)

The gap is rarely the semantic layer's quality. It is what the agent has to do with it, and how its [context is structured](https://atlan.com/know/ai-agent/how-to-structure-context-for-ai-agents/). A [layer built for analysts in BI](https://atlan.com/know/ai-agent/semantic-layer/semantic-layer-for-bi-vs-ai-agents/) assumes a person who already knows which view to open. An agent has to guess that from names and descriptions, and a wrong guess looks exactly like a right one. That pattern sits behind most [AI agents that fail in production](https://atlan.com/know/why-ai-agents-fail-in-production/).

---

## Which should an AI agent read: a semantic layer or a metrics layer?

Organize what the [agent](https://atlan.com/know/context-layer-for-ai-agents/) reads per metric, because business questions start with a metric. "What was revenue in Q3?" names the metric first and the tables never.

A layer organized per table or subject area makes the agent pick a view before it can answer. Three problems follow:

- **The same metric lives in several views.** Revenue sits in the finance view and the sales view, defined slightly differently.
- **Questions that span two views have no home.** "Revenue for accounts with open support tickets" needs both, and the agent writes the join itself.
- **Fixes pile up beside the view.** A correction becomes a note in a prompt instead of a change to the definition, so only one agent sees it.

A metric organized per metric starts where the question starts. In the Playbook's phrasing, a semantic layer generates SQL; a metric gives the agent the definition. Read more on [why a metric, and not a view](https://analytics-playbook.atlan.com/#ch-sv).

### What changed in 2026

PK described her own shift on episode 1. Six months earlier, her answer to a talk-to-data request was to bootstrap a semantic view and publish it to the agents downstream. Her answer now is to build the context layer from metrics and an ontology, then add skills: "Just build skills and actually we're done."

[Skills](https://atlan.com/know/ai-agent/ai-agent-skills/skill-engineering-vs-prompt-engineering/) carry what used to live only in an analyst's head. Her example: an analyst running a what-if analysis always checks for seasonality, because that is how the business works. Written as a skill, that habit reaches every agent.

### What do you gain by combining a semantic layer and a metrics layer?

Each covers the other's gap. The semantic layer keeps BI consistent and holds table meaning, joins and access. Metrics defined on top give agents one runnable definition per number, with an owner. You keep the layer your analysts use, and its measures become the first candidate metrics.

### Do you need a semantic layer if you already have a BI tool?

Often, yes. A BI tool's own model defines metrics for that tool only, so a notebook, a second BI tool or an AI agent has to define them again.

---

## How to test a semantic layer for AI agents

Five questions show whether your layer holds up once agents are asking. They come from the [Analytics Agent Playbook](https://analytics-playbook.atlan.com/#ch-sv-start), and they work the same on [Snowflake semantic views](https://atlan.com/know/snowflake/snowflake-semantic-views/), a [Power BI semantic model](https://atlan.com/know/ai-agent/semantic-layer/power-bi-semantic-model-vs-dedicated-semantic-layer/), or a layer you built yourself.

1. When a metric definition changes, how many places have to change with it?
2. Can an agent answer a question that spans two of your views?
3. For a question your metrics cover, does the layer compile the SQL, or does the agent write it fresh?
4. Does the same request compile to the same SQL every time, with no model in the loop?
5. When someone corrects a wrong answer, does the fix change the definition, or get added beside it as a note?

One or two fails: keep the layer and move the failing metrics into one definition each. Three or more: keep the layer for BI, and build what agents read per metric.

Before changing anything, write down a small set of real questions with known answers and score your agent against them. The Playbook calls this a golden set, and [evaluating agents](https://atlan.com/know/ai-agent-evaluation-benchmarks-and-metrics/) without one makes it impossible to tell a fix from luck.

---

## Who should own metric definitions?

The business, metric by metric. Teams that skip this step end up encoding the disagreement instead of settling it.

Teams at Atlan's [Context in Practice session on the agentic data catalog](https://atlan.com/context-in-practice-agentic-data-catalog-recording/) described the same turn. They set out to help stewards write better definitions. They found they first had to decide who owns each metric, who approves a change, and whether an agent may use it at all.

Workday reached the same point from the governance side. Joe DosSantos, VP of Enterprise Data and Analytics at Workday, said: "Atlan captures Workday's shared language to be leveraged by AI via its MCP server. As part of Atlan's AI labs, we're co-building the semantic layer that AI needs." His team's reasoning is in [why Workday is building a semantic layer](https://atlan.com/regovern-watch-center/workday-building-semantic-layer/).

The order that works:

1. Name the core metrics the business actually argues about.
2. Name an owner for each. [Who owns the context layer](https://atlan.com/know/who-owns-the-context-layer/) covers how teams split this.
3. Write each definition once, with its formula, grain, exclusions and joins.
4. Version it, so a past number can be traced to the definition that produced it. [Managing KPI definitions in a data catalog](https://atlan.com/know/ai-agent/how-to-manage-kpi-definitions-and-a-business-glossary-in-a-data-catalog/) shows the workflow.

Clear owners and definitions are also much of what makes [data AI-ready](https://atlan.com/know/ai-readiness/ai-ready-data/). [Agent-ready data](https://atlan.com/know/ai-agent/ai-ready-data/agent-ready-data/) and [what makes data AI-ready](https://atlan.com/know/ai-agent/data-for-ai/what-makes-data-ai-ready/) cover the rest.

---

## Where does the dbt Semantic Layer fit?

For dbt teams, it is the most likely place metric definitions already live.

The dbt Semantic Layer uses MetricFlow to define metrics in YAML next to dbt models and compile them into SQL for any tool that queries it[2]. MetricFlow itself is open source; [the MetricFlow license change](https://atlan.com/know/ai-agent/semantic-layer/metricflow-apache-2-license-dbt-semantic-layer/) explains what that means for teams.

For an agent, dbt metrics are a strong starting point because they are already code, reviewed and versioned. Two checks still apply: whether each metric carries the joins and dimensions an agent needs, and whether the questions agents get fall inside the metrics you have defined. Use the five questions above, and treat dbt's metrics as candidates for the agent's context, not a separate system to replace.

---

## How Atlan uses semantic layers and metrics layers together

Atlan Trident holds the context your agents run on: metrics and saved queries in [Metric Studio](https://platform.atlan.com/studios/metrics-studio), each with its formula, source table, joins and dimensions, plus [evals](https://atlan.com/know/ai-agent-evaluation-benchmarks-and-metrics/) and traces that show whether a change helped.

At Atlan's Context Conference in October 2026, EMA described how Trident manages metric definitions "with formulas, grain, dimensions, and SQL examples", with owners and versions, the way engineering teams manage code[4].

Any agent that speaks [MCP](https://atlan.com/know/ai-agent/semantic-layer/mcp-semantic-layer-for-ai-agents/) ([Model Context Protocol](https://atlan.com/know/what-is-model-context-protocol/), the open standard agents use to call tools and data), from Claude or Codex to your own harness, reads a metric before it writes SQL, with the caller's own permissions. The [Analytics plugin](https://platform.atlan.com/studios/metrics/how-tos/analytics-plugin) builds those metrics from your dashboards and tables inside the coding agent you already use. Trident is in early access, and the plugin is in preview.

The method behind all of this is public. The [Analytics Agent Playbook](https://analytics-playbook.atlan.com/) walks through it from the golden set to launch, for teams on any stack.

---

## FAQs about semantic layer vs metrics layer

Quick answers to common questions.

### 1. What is the difference between a semantic layer and a metrics layer?

A metrics layer defines how each KPI is calculated: the formula, the filters, the time grain, with an owner. A semantic layer covers that plus table meaning, joins, dimensions and often access rules. For an AI agent, the bigger difference is organization: per metric, or per view.

### 2. Is a metrics layer part of a semantic layer?

Usually, yes. Metrics are one of the four parts every semantic layer holds, alongside table meaning, joins and dimensions. A standalone metrics layer covers that one part in depth, with one definition per metric that every tool reads.

### 3. Is a semantic layer enough for AI agents?

Usually not on its own. On one 107-question benchmark in 2026, semantic views as the only way in answered fewer than two in five correctly, while metrics and trusted past queries served per question answered more than four in five. Agents also need to know who is asking and the business rules that never reached a table.

### 4. Do I need a semantic layer if I use dbt?

You may already have one. The dbt Semantic Layer defines metrics in YAML and compiles them to SQL. For agents, check that each metric carries its joins and dimensions, and that agents read those definitions instead of writing their own SQL.

### 5. Should I replace my semantic layer to support AI agents?

No. Keep it for the analysts who use it. Its measures and filters become candidate metrics for the agent's context, alongside the SQL your analysts already run. What changes is how agents read it: one metric at a time, before they write SQL.

### 6. Who should own metric definitions?

The business team accountable for the number, one owner per metric. Finance owns revenue; sales owns pipeline. The owner approves changes, and each change gets a version, so a past number can be traced to the definition that produced it.

---

## Sources

1. [dbt Semantic Layer FAQs, dbt Developer Hub](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-faqs)
2. [dbt Semantic Layer, dbt Developer Hub](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-sl)
3. [Deprecating dbt Metrics and the legacy dbt Semantic Layer, dbt Labs](https://docs.getdbt.com/blog/deprecating-dbt-metrics)
4. [Atlan's Context Conference: Atlan Brings Software Discipline to Enterprise Context, EMA](https://atlan.com/docs/ema-context-conference-impact-brief.pdf)
5. [Gartner Says Lack of Semantics Causes Inaccurate AI Agents and Wasted Spending, Gartner](https://www.gartner.com/en/newsroom/press-releases/2026-05-11-gartner-says-lack-of-semantics-causes-inaccurate-artificial-intelligence-agents-and-wasted-spending)
6. [Analytics Agent Playbook, Atlan](https://analytics-playbook.atlan.com/)
7. [Model Context Protocol](https://modelcontextprotocol.io/)

## Next steps

- To see Atlan's context layer in action first, watch a recorded demo: [Atlan context layer demos](https://atlan.com/context-layer-demo/)
- To see Atlan working on your own data stack, book a demo: [Book a demo with Atlan](https://atlan.com/forms/talk-to-sales-contact/)
