A platform lead at an insurer has a semantic layer. Revenue, loss ratio, and retention are defined once, in a metrics file, and every dashboard agrees. Then the first AI agent goes live, and its first question is one the file cannot answer: which records count as a customer? The semantic layer vs ontology question starts there, on the warehouse side, for people who never planned to search the word "ontology".
A semantic layer, as the market ships it, defines metrics and the dimensions you slice them by. An ontology defines the concepts those metrics are about: what a customer is, what it has, how it relates to a policy, and which records qualify. The first says how much. The second says what. An agent needs the second before it can trust the first.
A metrics file can say how much. It cannot say what. An ontology says what a customer is, who agreed that, and which records qualify. The semantic layer that holds up for AI is built on it, with the definition and the calculation on one governed record.
From the warehouse side the difference is the unit of record. A semantic layer's unit is a metric with its dimensions. An ontology's unit is a concept with its properties, relationships, and rules. In our post What Is a Semantic Layer? we set out the four things a layer has to hold. This article is about the first of them, the concept.
| Question | Semantic layer, as shipped | Ontology |
|---|---|---|
| What is the unit of record? | A metric and its dimensions | A concept, with its properties, relationships, and rules |
| What is "customer" in it? | A join key between logical tables | A class with a definition, a scope, and the records that qualify |
| Who can say it is wrong? | Whoever reviews the pull request | A named owner, with a date and a version on the record |
| How is a rule tested? | A test on a column | A SHACL shape (W3C Shapes Constraint Language), run on the data |
| What does an agent get? | The formula and the declared joins | The meaning, then the joins it may take, then the formula |
The answer is in the vendors' own documentation. dbt's page on entities (last updated 2026-07-20) opens with this: "Entities are real-world concepts in a business, such as customers, transactions, and ad campaigns." Then: "In our Semantic Layer models, these entities serve as a join key across semantic models." The four entity types it lists are primary, unique, foreign, and natural (dbt documentation). Every one of them is a kind of key.
That is an exact description of a useful product. The file can say that customer_id is the primary key of dim_customer. It cannot say whether a prospect with a quote and no policy is a customer, or whether a lapsed policyholder still is. The file holds the result of that decision and drops the reasoning.
Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes that file apart row by row. Ask the file what a customer is and it returns a column.
An ontology is the formal model of a business's concepts, written so a machine can read it and a person can own it. Our post What Is an Ontology? defines it in full. Here is what the model holds about one concept.
| Part | What the record says | Why a warehouse team should care |
|---|---|---|
| Class | Customer: a party that holds at least one policy that has been in force | The sentence every customer metric rests on |
| Properties | Legal name, primary contact, risk rating | The columns a customer dimension may carry |
| Relationships | A Customer holds a Policy; a Claim is made against a Policy | The only join paths an agent may take |
| Rule | Every Customer holds at least one Policy; a Prospect holds none | A SHACL shape, so the data is tested against it on load |
| Owner | A named underwriter; approved 2026-03-14, version 3, review due 2027-03-14 | Who settles a disagreement, and when the answer expires |
| Scope | Retail lines; the commercial division models Customer as an Organisation | Where the definition holds, and where another applies |
A customer table is a data model, scoped to one system. The class above is scoped to the business, and the rule travels with it. Our post Ontology vs. Data Model draws that line. Keeping the model owned and current is the subject of our post What Is Ontology Management?.
A dashboard user carries the concept in their head. An agent carries nothing. It composes a query from what was written down for a machine. If the layer holds customer_id and no definition, the agent infers one from the column name and the sample values. Inferred context is a guess with good grammar.
Our post A Semantic Layer for AI Agents: What the Agent Needs Before It Asks for Revenue covers the full list. Our post Ground Truth: SME-Approved vs Inferred Metadata covers the approval that makes the first answer citable.
We read six competing pages. The catalog vendors concede the distinction in their own words. A catalog vendor's own comparison page (published 2026-01-30, updated 2026-10-09) says: "A semantic layer tells you what your revenue is. An ontology tells you what a customer is." On where the semantic layer stops: "The ceiling, though, is conceptual depth." The same page then says "Building a full OWL-based ontology requires specialized skills that most data teams don't have" and that "A business glossary is a lightweight ontology." A second catalog vendor's page (2026-05-06) says "An ontology is the semantic layer, plus operational logic", then adds a third layer of its own above both.
| Page | Says a semantic layer answers | Says an ontology answers | Where it stops |
|---|---|---|---|
| Catalog vendor, updated 2026-10-09 | "what your revenue is" | "what a customer is" | A glossary stands in for the ontology; the catalog sits above both |
| Catalog vendor, 2026-05-06 | Metric definitions | "the semantic layer, plus operational logic" | Adds a third layer the vendor sells |
| TextQL, "Semantic Layers Are a Patch. Ontologies Are the Fix.", 2026-05-26 | A scoped set of questions | Questions that "outpace what the data team has gotten around to modeling" | Its ontology is a file format of its own |
| decube, updated 2026-09-09 | "how the business measures things" | "the business itself" | Routes the reader to one, both, or neither |
| datus, updated 2026-10-30 | "what does this metric mean, and how is it computed?" | "what business entities exist, how are they related" | Semantic layer first, ontology second |
| timbr, modified 2026-07-20 | Business-friendly definitions | "the deeper meaning behind the data" | Its own SQL-queried ontology is the answer |
Three things recur. Each page ends in "both". Each puts the vendor's own product where the two meet. Each treats the standards as a cost: OWL is for specialists, and the work takes months. None asks who owns the definition once it exists, or what tests the data against it.
A common search beside this one is Palantir's ontology, where the word means an operational layer of object types, link types, and action types, in a vocabulary Palantir maintains. It works, inside that platform. Our post What Palantir Means by "Ontology" covers what it costs to move the meaning out. A semantic layer built on that ontology rests on one vendor's vocabulary, and the same test applies to a metrics file.
Yes to both. The order is the argument. Every competing page says semantic layer first, because the metrics file is quicker to ship. It is also where the confusion gets automated. A metrics layer can define a calculation. It cannot define a concept. Every metric is a calculation over concepts someone defined first. The choice is where that definition lives: on a record with an owner, or in the heads of whoever wrote the SQL.
| Start with | What you have after a quarter | What the agent gets |
|---|---|---|
| The metrics file | Revenue, margin, and churn defined once; "customer" as a key | A formula and a guess |
| The concept model | Customer, Policy, and Claim defined with owners; the same metrics attached | A definition it can cite, the joins it may take, and the formula |
The better answer is one asset. The definition and the logic sit on the same governed record, with one owner and one version, so "what is a customer" and "how much did customers spend" cannot drift apart. Our post How to Build a Semantic Layer: Platform-Neutral Steps and What Each Native Layer Leaves Out gives the sequence.
TQ Data Foundation holds the ontology and the semantic layer on one governed record. What a customer is lives as a class on open standards, RDF, OWL, and SHACL, with a named owner, a version, and a review date. The metric that counts customers is defined on that class, so the definition and the calculation live on the same governed asset. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, and MCP. The join paths come from the ontology, so an invented join is unavailable. AI proposes the model and the mappings; your experts confirm them. Every definition is validated with SHACL, a standard TopQuadrant helped author, so the record exports whole. We maintain 300 reusable standards-based models, so "customer" starts from governed structure. Your catalog stays and syncs. Definitions resolve before generation, and our agent-ready semantic layer page shows it.
A metrics layer answers how much. An ontology answers what. TQ Data Foundation holds both answers on one record, with a name on it. Ask your semantic layer what a customer is. If the answer is a column, you have found the gap.