A semantic layer — implemented by tools like dbt Semantic Layer (dbt MetricFlow), Cube, AtScale, Snowflake Semantic Views, and Databricks Metric Views — translates raw data into governed business metrics that BI dashboards and AI agents query through a standard interface (SQL, GraphQL, REST, or MCP). A context layer wraps that semantic layer with lineage, policy, decision precedents, and sensitivity rules, then exposes the full context to AI agents at runtime. In 2026, only 7% of enterprises say their data is ready for AI, while one-quarter (27%) report their data is not very or not at all ready.
Simply put, enterprise AI needs both a context layer and a semantic layer. Here’s why:
The semantic layer gives AI agents deterministic answers to the question “What does this metric mean?” A context layer is the operational shell that wraps the semantic layer, providing the metadata an autonomous agent needs to act safely.
Without the semantic layer, agents hallucinate definitions. Without the context layer, agents scale those (now-correct) definitions into ungoverned decisions. They return wrong answers, and there is no way to know why without the lineage and decision precedents the context layer supplies.
What is the difference between a context layer and a semantic layer? At a glance
Permalink to “What is the difference between a context layer and a semantic layer? At a glance”A semantic layer defines and serves as the governing layer for business metrics. The context layer governs how enterprise AI agents discover and use those metrics safely. Here is a side-by-side comparison of the two layers across 10 dimensions:
| Dimension | Semantic layer | Context layer |
|---|---|---|
| What it stores | Metric definitions, dimensions, joins, and calculations | Lineage, ownership, policy, decision precedents, sensitivity, and temporal validity |
| Query interface | SQL, JDBC, GraphQL, Python, MCP | APIs, SQL, MCP |
| Output type | Deterministic query results | Enriched, policy-aware metadata about what the agent should and can use |
| Governance scope | Metric-level consistency | Asset-, policy-, and decision-level governance |
| Runtime behavior | Translates logical queries into physical queries | Enforces policy and surfaces context at agent decision time |
| Build-time scope | Defined by analytics engineers | Maintained jointly by stewards, domain owners, and platform teams |
| Cross-platform reach | Often tied to a specific warehouse or BI tool | Designed to span warehouses, BI tools, and agent runtimes |
| Relationship to the other | The substrate that the context layer ingests | The operational shell around the semantic layer |
| When it is sufficient on its own | BI consistency across a single platform; a small set of well-understood KPIs; self-service analytics inside one tool | Never sufficient on its own; always sits on top of a semantic layer |
| When you need to add the other | When AI agents act autonomously, RAG or GraphRAG needs grounding, humans and agents share metrics, or data estate spans platforms | Always paired with a semantic layer for metric definitions |

How semantic and context layers differ in purpose, consumers, and AI readiness. Image by Atlan.
Semantic layer vs. context layer: What AI agents need to give correct answers in 2026
Permalink to “Semantic layer vs. context layer: What AI agents need to give correct answers in 2026”Some practitioners feel that semantic definitions are key and that simply renaming the data box layer to the context box layer in AI architecture diagrams won’t enable AI agents to answer accurately. Some feel that it’s just a branding game. However, a context layer is much more than what practitioners perceive.
The perspectives and opinions differ because the term “context layer” has a serious vocabulary inflation.
The architectural choice here depends on what a semantic layer actually does for an AI agent, and where it stops. And what a context layer adds on top of it that isn’t in the semantic definition.

How missing context causes AI agents to hallucinate, misreport, and breach compliance. Image by Atlan.
To understand this, let’s explore each layer in more detail.
What is a semantic layer?
Permalink to “What is a semantic layer?”A semantic layer turns business definitions into deterministic queries. When a dashboard asks for “active customers in Q3,” the semantic layer translates that into the exact SQL, against the exact tables, with the exact filters everyone agreed on. It is the governed translation engine between business language and the warehouse.
“A semantic layer is operational, meaning that a semantic layer is actually taking a logical query and turning it into a physical query. And that’s where determinism comes into play. A glossary describes things. A semantic layer executes.”
— Dave Mariani, CTO of AtScale
For AI agents, this matters more than for humans. An analyst can intuit that “revenue” means net of refunds; an LLM cannot.
Alec Bolosky at Select Star, speaking at Coalesce 2025, uses an analogy worth borrowing: “I like to think of LLMs as the dumbest smart kid. They’re the kid in class who’s really brilliant but didn’t read the assignment. And the semantic model is basically the context that the LLMs can use.”
Which tools commonly implement semantic layers?
Permalink to “Which tools commonly implement semantic layers?”The most common implementations include:
- dbt MetricFlow is generally available with native MCP server support, exposing metrics through SQL, JDBC, GraphQL, and Python.
- Cube ships an open-source headless semantic layer.
- Looker, Power BI, and Tableau each carry their own semantic primitives.
- Snowflake Cortex Analyst and Databricks Genie ship platform-native semantic models.
But the semantic layer answers a narrow question. It tells the agent how a metric is calculated.
It does not tell the agent who owns it, when it was last validated, which downstream models depend on it, whether the underlying data contains PII, or what the team decided last quarter when a similar question came up.
Those answers live somewhere else, or they don’t live anywhere at all.
What is a context layer?
Permalink to “What is a context layer?”A context layer is the operational shell that wraps the semantic layer, providing the metadata an autonomous agent needs to act safely. It includes:
- Governance rules, including access policies, certifications, and approval workflows.
- Column-level lineage upstream to sources and downstream to every consumer.
- Decision precedents that capture how the organization has resolved similar questions in the past.
- Sensitivity classifications, including PII tags, retention rules, and data residency constraints.
- Temporal validity that tracks when metadata was last verified and whether it is currently trustworthy.
- Runtime policy enforcement that constrains what the agent can do, not just what the metric means.
The enriched context is exposed to agents through APIs, SQL, and the MCP.
Juan Sequeda, Principal Researcher at ServiceNow, puts it directly: “Treat that context right as a first-class citizen. That’s why the governance and stuff are really critical.”
But when it comes to the context layer, there’s some confusion around the term. It’s best to look at the related concepts for clarity.
| Concept | What it is | When it shows up |
|---|---|---|
| Data catalog | An inventory of data assets, ownership, and definitions | Foundational: what data exists and where |
| Knowledge graph | A representation of typed entities and their relationships | Design-time modeling primitive |
| Context graph | The structural form that a context layer takes within a system | Living record connecting assets, policies, lineage, and decisions |
| GraphRAG | A retrieval pattern using LLM-generated knowledge graphs | Sits on top of a context layer; does not replace one |
| Context layer | A runtime delivery model for a governed context to AI agents | Operational architecture for agent reliability |
A catalog is essential infrastructure, but not agent-facing on its own. A knowledge graph is powerful, but it is designed for design-time use. A context layer makes the semantic layer agent-ready rather than dashboard-ready.
An example of a context layer and a semantic layer working together
Permalink to “An example of a context layer and a semantic layer working together”The cleanest way to see the relationship is to follow a query through both layers.
Let’s take dbt MetricFlow as the semantic layer. It’s generally available and exposes governed metrics through SQL, JDBC, GraphQL, and a native MCP service. In a context-layer pattern, dbt defines the metric. Atlan ingests the dbt model and enriches it with the surrounding metadata, ownership, certifications, active metadata, policy tags, and lineage upstream to source and downstream to dashboards.
The enriched context is then exposed to the agent through the Atlan MCP server, which sits next to (not on top of) the dbt MCP server.
The semantic layer holds the definitions. The context layer holds the rules about which definitions to use (if they were modified), when, for whom, and what to do if the agent runs out of road.
Stephen Robb, Partner Solution Architect at dbt Labs, says, “For enterprise AI, the bottleneck isn’t compute power or data volume. We would argue that it’s context, and basically like a structured, governed context.”
Enterprise AI is only as reliable as the structured context that feeds it. AI needs a data control plane within a structured context layer, built on something like dbt, to provide that information to it.
Workday offers a concrete reference for this pattern. Its data teams pair a semantic layer for governed metric definitions with a context layer that carries lineage, ownership, and runtime policy, then deliver that combined context to AI agents through MCP.
Context layer vs. semantic layer: What to know before making an architectural choice
Permalink to “Context layer vs. semantic layer: What to know before making an architectural choice”Snowflake Cortex Analyst, Databricks Genie, Microsoft Fabric, and Palantir Foundry all ship semantic and context capabilities natively. Each is well-built within its own ecosystem. None of them works outside it. If your warehouse is exclusively on one platform and your agents only need to reach data that lives in that platform, native context is a defensible choice.
If either condition fails, you have an architecture decision to make.
A cross-platform context layer sits outside any one warehouse or BI tool. It ingests semantic definitions from dbt MetricFlow, AtScale, Cube, and platform-native semantic models. It enriches them with governance, lineage, and policy that apply consistently regardless of where the data is stored. And it exposes that enriched context to any agent runtime through open protocols.
You need to think about what happens when your second warehouse, second BI tool, or second agent runtime arrives, and your governance lives inside the first one.
When should you extend your semantic layer with a context layer?
Permalink to “When should you extend your semantic layer with a context layer?”The semantic layer is necessary for AI agents and is not sufficient on its own.
Atlan’s own controlled experiment, measured across 522 query evaluations against a Formula One dataset, found that enriching schema-only metadata with glossary terms, SQL patterns, and domain hints produced a 38% relative improvement in AI SQL accuracy with statistical significance at p<0.0001. Medium-complexity queries, which made up roughly 27% of the dataset, saw a 2.15x improvement.
Anyone selling “replace your semantic layer” is selling a migration. Anyone selling “you don’t need a context layer” is selling whatever ecosystem they already own. It’s advisable to ask these questions to get clarity on what you’d sign up for:
- Does this require us to rebuild our semantic definitions in your tool? If the answer is “rebuild inside our tool,” the vendor is selling a migration, not a context layer.
- Which data platforms does this context layer work across? If the answer is “ours,” the architecture is a platform-native context. That is a real category, but it is not the same as a cross-platform context layer.
- Which agent runtimes can consume this context, through which protocols? MCP, SQL, APIs, or proprietary? “Our agent only” or “our protocol only” is the lock-in pattern in a new vocabulary.
- Does it enforce policy at runtime, or only describe policy in metadata? Descriptive governance is documentation. Runtime governance is enforcement. Agents need the second.
The defensible architecture for an enterprise running AI agents across multiple data platforms is to keep the existing semantic layer, extend it with an open context layer, and expose the results to your agents via MCP and APIs.
Learn more about implementing a cross-platform context layer in your enterprise.
Read the Guide →FAQs about context layer vs. semantic layer
Permalink to “FAQs about context layer vs. semantic layer”Can a context layer replace a semantic layer?
Permalink to “Can a context layer replace a semantic layer?”No. A context layer consumes semantic definitions from dbt MetricFlow, Cube, AtScale, or platform-native semantic models and adds governance, lineage, and policy on top. Replacing the semantic layer means rewriting metric definitions inside one vendor’s tool, which is a migration, not a context layer.
What is the difference between a context layer and an ontology?
Permalink to “What is the difference between a context layer and an ontology?”An ontology is a formal specification of concepts, properties, and relationships in a domain, often expressed in OWL or RDF. It is a design-time model. A context layer consumes ontologies along with semantic definitions, lineage, and policy, then exposes the combined context to agents at runtime.
Does dbt have a context layer?
Permalink to “Does dbt have a context layer?”dbt MetricFlow is a semantic layer, not a context layer. It is generally available with native MCP server support and exposes governed metrics through SQL, JDBC, GraphQL, and Python. A context layer like Atlan ingests dbt definitions and wraps them with governance, lineage, and policy.
Do I need a context layer if I use Snowflake Cortex Analyst or Databricks Genie?
Permalink to “Do I need a context layer if I use Snowflake Cortex Analyst or Databricks Genie?”Platform-native context works well within that platform. If your data, agents, and BI tools all live on one platform and will continue to, native context can be sufficient. Across multiple warehouses, BI tools, or agent runtimes, you need an open cross-platform context layer.
How does the Model Context Protocol relate to the context layer?
Permalink to “How does the Model Context Protocol relate to the context layer?”MCP is the transport. The context layer is the source. MCP standardizes how agents discover and consume context from external systems, but it does not produce that context. APIs and SQL also work as delivery mechanisms. The dial tone is not the network.
How long does it take to build a context layer?
Permalink to “How long does it take to build a context layer?”Extending an existing semantic layer with a cross-platform context layer typically takes 4 to 8 weeks for the first production agent. Standing up a platform-native context inside one warehouse takes 8 to 16 weeks. Building a custom context layer from scratch typically takes 6 to 12 months.
