Ontology vs. Semantic Layer vs. Context Layer: Which One Does AI Need In 2026?
A data ontology names the things a business is made of (customers, contracts, products) and how they relate; a semantic layer defines how to compute metrics over them; a context layer is what an AI agent reads to decide which definition a question means. Most analytics teams need context first, a semantic layer for metrics that must match everywhere, and an ontology only when entities span many systems or drive operational actions.
Buyers mix these up: one parcel logistics customer asked, in one question, about Snowflake semantic views, a semantic layer, an ontology and a business glossary. Here they are side by side.
The short answer
Ontology | Semantic layer | Context layer | |
|---|---|---|---|
Answers | What kinds of things exist, and how do they relate? | How do we compute this metric? | Which metric, table or definition does this question mean? |
Made of | Classes, properties and relationships, often in OWL or RDF | Metrics, dimensions, joins and access rules in Malloy, LookML, DAX or YAML | Glossary, table docs, caveats, owners, trusted example questions |
Breaks when | Someone needs a number: "revenue" as a concept is not a formula | The question isn't modeled | It goes stale or contradicts itself |
Typical tools | Palantir Foundry Ontology, Microsoft Fabric IQ ontology, OWL editors and triple stores | Malloy, LookML, dbt Semantic Layer, Cube, Power BI semantic models, Snowflake semantic views | Agent instructions and notes, catalog glossaries, Databricks Genie Ontology (despite the name), GetDot's notes |
What is a data ontology?
A data ontology is a formal model of a domain: the classes of things (Customer, Contract), their properties and how they relate. The W3C standard is OWL, built on RDF, which stores every fact as subject, predicate and object:
ex:Customer a owl:Class .
ex:Contract a owl:Class .
ex:signed a owl:ObjectProperty ;
rdfs:domain ex:Customer ;
rdfs:range ex:Contract .
It describes what a customer is, not any real customer.
Ontology vs knowledge graph
The ontology is the schema; the knowledge graph is the data shaped by it, such as ex:acme ex:signed ex:contract_881. People often say "knowledge graph" for both.
Ontology vs taxonomy vs data model
A taxonomy is a hierarchy that only knows "is a kind of". A data model describes how one system stores data. An ontology describes business concepts across systems, such as one customer in a CRM, billing and a warehouse.
What is a semantic layer?
A semantic layer defines metrics once in code and compiles them into SQL for every tool, so "churned accounts" means the same in a dashboard and in an AI agent. A measure in Malloy, the semantic layer we recommend:
source: accounts is duckdb.table('analytics.dim_accounts') extend {
primary_key: account_id
dimension: churn_quarter is churned_at.quarter
measure:
#" Accounts whose last paid contract ended without renewal
churned_accounts is count() { where: churned_at is not null }
}
More in our semantic layer guide and semantic layer tools comparison.
What is a context layer?
A context layer is everything an agent reads before it queries: what each metric means, which table is the source of truth, known quirks, owners, and questions with checked answers. It is what an analyst would tell a new hire. More in what is a context layer.
One question, three layers
Take "Which enterprise customers churned last quarter, and why?"
As an ontology, it becomes a graph pattern over facts like these:
ex:acme ex:inSegment ex:Enterprise .
ex:acme ex:signed ex:contract_881 .
ex:contract_881 ex:status ex:Churned .
ex:contract_881 ex:lossReason ex:PriceIncrease .
An agent can walk from customer to contracts to loss reasons across systems, but nothing says what "last quarter" means or how to count.
As a semantic layer, it is a query against the measure above:
run: accounts -> {
where: segment = 'Enterprise', churned_at ? @2026-Q3
group_by: account_name
aggregate: churned_accounts
}
The count is deterministic and matches the dashboard, but it can't answer "why" or know that Sales defines "enterprise" by ARR while Finance uses the segment field.
As a context note, it is plain prose:
Churn (enterprise accounts)
- "Enterprise" means segment = 'Enterprise' in dim_accounts.
Sales sometimes means ARR over $100k; ask which one if unclear.
- Churned = last paid contract ended without renewal within 30 days.
Downgrades are not churn.
- For "why": count cancellation reasons in support_tickets.cancel_reason
and CRM loss notes. Report them as stated reasons, not causes.
- Owner: RevOps.
It says which definition to use, when to ask and where the "why" lives, but computes nothing. Together: context picks the definition, the semantic layer computes it, and the ontology connects entities across systems.
Vendor ontologies, decoded
In 2026 marketing, "ontology" often means a semantic layer, an entity graph or a context layer.
- Palantir Foundry Ontology. Palantir calls it "an operational layer for the organization": datasets map into object types, properties and links, and action types define how objects change. The actions are the point: it runs operational apps, not just answers.
- Microsoft Fabric IQ ontology. A preview item that defines entities and relationships (Customer places Order) once above OneLake tables, eventhouse streams and Power BI semantic models (Microsoft Learn); Fabric data agents can use it. See our Fabric IQ guide, Power BI Copilot and Power BI Copilot vs GetDot.
- Databricks Genie Ontology. Announced at Data + AI Summit in June 2026, generally available since November 2026. Databricks calls it an automatic context layer for Genie: it gathers context from tables, queries, dashboards and connected apps, ranks it, applies permissions, and writes nothing to Unity Catalog until a person approves. A context layer, not an OWL ontology, for data governed in Unity Catalog; see our Databricks Genie guide and Genie vs GetDot.
- TextQL Ontology. TextQL calls it its semantic layer: Markdown plus
.tqlfiles that compile to SQL, and since Ontology 3.0 its former context library too. A semantic layer plus a context layer; see our text-to-SQL tools comparison.
Zoho rebuilt Ask Zia on semantic and ontology layers in October 2026 (Zoho Analytics pricing), and Alation added Ontologies in early access in September 2026 (data governance tools). For definitions that must travel between products, watch Open Semantic Interchange (now Apache Ossie).
Does an ontology help AI? What the evidence says
- Knowledge graphs beat raw schemas. In a 2023 data.world study by Sequeda, Allemang and Jacob, GPT-4 answered 16.7% of enterprise questions correctly over a raw schema and 54% over a knowledge graph of the same database (the authors sell knowledge-graph tooling). LinkedIn's SQL Bot went from 9% to 53% correct or near-correct with its knowledge graph.
- Semantic layers help on the questions they cover; see our semantic layer guide.
- Neither is required. In our Business Analytics Bench, the agents worked from written notes and declared joins, with no metrics defined for anyone and no ontology. GetDot Frontier scored 88.0 on real analyst work. We built the benchmark, so read it with that in mind.
Format matters less than meaning being written down, current and owned.
Which one does your AI analytics need?
- Start with context. It is cheap and fixes the most common failure: the agent picking the wrong metric. See the semantic layer solves the wrong half.
- Add a semantic layer when a number must match everywhere: the board deck, finance. Use Malloy if starting fresh; keep a trusted LookML or Power BI model.
- Add an ontology when you resolve the same entity across many systems, or when the model must drive operational actions (reassign a shipment, flag a contract).
Formulas go in the semantic layer; terminology, caveats and source rules stay in context.
How GetDot uses each
GetDot reads your existing semantic layer (Malloy, Looker, Power BI, Azure Analysis Services, dbt, Cube and Steep), so its numbers match the tools your team trusts. Its context layer is notes, docs and table relationships; relationships declare joins, which covers the entity links most analytics questions need. Notes are files in a git-backed model repository; the Context Agent drafts changes from dbt, BI tools and docs for review. GetDot does not ingest OWL, RDF or vendor ontologies. Their definitions can go into notes, but GetDot won't reason over the graph.
FAQ
No. A semantic layer models measurement (how to compute a metric); an ontology models the world (what exists and how it relates). Semantic layers hold some relationships as joins, which is why the two get confused.
Palantir says no: its architecture docs say combining data, logic, actions and security needs more. Its core is actions that change objects, closer to an operational app model than a metrics layer.
No. RAG is the retrieval mechanism; a context layer is the content retrieved, plus its ownership and review.
Rick Radewagen
Rick is a co-founder of Dot, on a mission to make data accessible to everyone. When he's not building AI-powered analytics, you'll find him obsessing over well-arranged pixels and surprising himself by learning new languages.