The foundation: engage.re
AI and Data 30 July 2026 10 min read

Semantic Layer, Ontology or Knowledge Graph: Which Do You Need?

Four terms describe the same job: recording what your data means, in a form software can use. Suppliers use them as if they were interchangeable, and they are not. This article defines each one, gives a decision rule matched to the problem you cannot solve, names the property all four share, and states the one thing none of them guarantees.

Connect with us about your data foundation · · Replies within 24 hours

+17 to +23
percentage points of accuracy from adding a 4KB meaning document
16.7% to 54.2%
accuracy when questions ran against an ontology instead of raw tables
4
terms, one job, one shared property

What is the difference between a semantic layer, an ontology and a knowledge graph?

A semantic layer defines business measures over existing tables. An ontology defines the concepts of a domain and the rules between them. A knowledge graph stores facts as connected statements. A taxonomy arranges terms in a hierarchy.

All four record meaning outside the application code. They differ in what they record and in what a machine can then do with it.

Term What it records What it lets a machine do
TaxonomyTerms in a hierarchy, with broader and narrower relations.Group and roll up consistently.
Semantic layerBusiness measures and dimensions over tables.Answer a metric question the same way every time.
OntologyConcepts, their properties and the rules between them.Infer a fact nobody stated, and detect a contradiction.
Knowledge graphFacts as subject, relation and object.Follow a relationship across many hops.

What is a taxonomy?

A taxonomy arranges terms so that each one has a place. A service category, a case type, a product family. The relations are simple, and they cover broader, narrower and related.

The World Wide Web Consortium publishes a standard for this in SKOS, the Simple Knowledge Organization System.

A taxonomy solves one problem well. Two teams that use the same list of terms produce reports you can add together. It does not carry rules, so it cannot tell you that a case cannot be open and closed at once.

What is a semantic layer?

A semantic layer sits between your tables and the people who ask questions. It defines each business measure once, in one place, and every tool then uses that definition.

Consider one measure. Active residents. The layer records which table holds residents, which values count as active, and which dates apply. A person then asks for active residents and receives the same number from every tool.

The layer is the cheapest of the four to build, and it stays tied to the tables underneath. Change the tables, and somebody must change the layer.

What is an ontology?

An ontology records the concepts of your domain, their properties, and the rules that hold between them. It states that a tenancy has exactly one property and at least one tenant. It states that a closed case cannot receive a new visit.

The World Wide Web Consortium publishes OWL 2, the Web Ontology Language, for this purpose.

Rules give an ontology two abilities that the other three lack. A machine can infer a fact that nobody stated, and it can detect a contradiction in your data. Both abilities need the rules to be written down.

The measured effect. Researchers ran natural-language questions against an enterprise database twice. Direct against the tables, accuracy was 16.7%. Against an ontology over the same data, accuracy reached 54.2%. The data did not change, and the recorded meaning did.

What is a knowledge graph?

A knowledge graph stores each fact as three parts: a subject, a relation and an object. This resident lives at this address. This address belongs to this home. This home has this manager.

The RDF standard defines that structure.

The shape suits questions that cross several steps. Which residents does this manager hold responsibility for, through any home? A table design answers that with a join per step, and a graph answers it by following relations.

A knowledge graph holds facts, and the rules are optional. Many production graphs carry an ontology as well, and the two terms then describe one system.

Which one do you need?

Choose by the problem you cannot solve today.

Your problem What to build
Two teams report different numbers for the same measure.A semantic layer.
Two systems use the same word for different things.A taxonomy, then an ontology.
Your data contains contradictions that nobody detects.An ontology.
Your questions cross four systems and five relationships.A knowledge graph.
An AI tool answers confidently and wrongly.Any of the four. Start with the semantic layer.

The last row holds most enterprise cases, and the reason is measured. A 2026 benchmark gave three frontier models 99 business questions on a public dataset, twice each. The second run added a 4KB document describing the measures. Accuracy rose by 17 to 23 percentage points for every model, and the three models then became statistically indistinguishable from each other.

Recording the meaning mattered more than choosing the model. In the researchers' words: "the most consequential architectural decision is not which frontier model to use but whether the system is grounded in authoritative business semantics at all." From Semantic Layers for Reliable LLM-Powered Data Analytics.

A 4KB document produced most of the gain, so the cheapest option is worth doing this month. We set out the whole evidence base in why AI gets your own business data wrong.

The property all four share, and the risk it carries

Each of the four records meaning outside the code. That is the shared property, and it is the source of their value.

It is also the source of the failure. A description that lives beside the system can fall out of step with the system, and nothing breaks when it does. The reports keep running, the dashboards keep loading, and the numbers slowly stop meaning what the document says.

Recent work looks at building ontologies with language models, in LLM-Driven Ontology Construction for Enterprise Knowledge Graphs. It lowers the cost of the first version, and it does not change what happens to version one after eighteen months.

None of the four terms guarantees enforcement. Each one describes a form for recording meaning, and none of them requires the system to obey it.

What ESRE Media offers

We build your system on engage.re, and the platform makes the description a condition of storing data.

  • Your vocabulary is declared before you write anything. Your application registers every record type, field and relationship, and the server then refuses a write outside that declaration.
  • The description cannot drift. Your data cannot exist in a form the dictionary does not describe, so no separate document needs maintenance.
  • Every concept holds a permanent identifier. The identifier is deterministic, so two of your systems mean the same concept with no synchronisation between them. Your definitions also survive a rename.
  • The shape carries relationships. Your questions cross records and relations without a join per step.

The platform holds everything in five database tables, and those five never change. A new record type adds a dictionary entry instead of a table. Sense Future built engage.re, and it has run in production since December 2025.

The same choice at two sizes

A county council asks how many children it supports across education, social care and housing. Each service holds a person, and each service counts differently. A semantic layer fixes the measure, an ontology fixes the concept of a child in need, and a graph answers the question across all three. A declared vocabulary means the three services never disagreed in the first place.

A care home group asks for its occupancy. The records system counts a bed as occupied on admission, and the finance system counts it on the first invoice. Two systems, one measure, two numbers. The arithmetic is the same as the council's, and the cost of the disagreement is smaller.

The care home software and charity software pages set out the sector detail. Our guides to charity data management and care home software comparison show the same disagreement inside one organisation.

What we do not claim

  • The four terms overlap in practice. Many products marketed as one contain parts of the others, so read what a product does rather than what it is called.
  • A semantic layer is not inferior. It is the cheapest of the four, and the measured evidence says a small one delivers most of the gain.
  • Recorded meaning does not make AI correct. The benchmark reached 68.7% with the document present, and 68.7% is not a solved problem.

What to do next

  1. Write one page describing your five most-used measures. That page is a semantic layer, and it is worth doing this week.
  2. Ask two teams for the same figure. A difference tells you which term you need.
  3. Test the page against a real question. Give it to an AI tool with your data, then check the answer.
  4. Ask who keeps the page current, and what breaks if nobody does.
  5. Then decide whether your meaning lives in a document or in a declaration your server enforces.

Common questions

What is the difference between a semantic layer and an ontology?

A semantic layer defines business measures over existing tables, so every tool answers a metric question the same way. An ontology defines the concepts of a domain and the rules between them, so a machine can infer a fact nobody stated and detect a contradiction. A semantic layer standardises answers, and an ontology reasons.

Is a knowledge graph the same as an ontology?

No. A knowledge graph stores facts as subject, relation and object, and it suits questions that cross several relationships. An ontology holds the concepts and rules. Many production systems carry both, and the two terms then describe one system.

Which should we build first?

Build a semantic layer first, because it costs least and the measured evidence says a small one delivers most of the gain. A 4KB document describing the measures raised model accuracy by 17 to 23 percentage points in a 2026 benchmark. Move to an ontology when your problem is contradiction rather than inconsistent reporting.

Does a semantic layer improve AI accuracy?

Yes, and the effect is large. Three frontier models answered 99 business questions with the schema alone and scored 45.5% to 50.5%. With a 4KB document describing what the data means, all three reached 67.7% to 68.7%. The three models then became statistically indistinguishable from each other.

What do all four approaches fail to guarantee?

Enforcement. Each one records meaning outside the code, and none requires the system to obey it. A description beside a system can fall out of step with the system, and nothing breaks when it does. The reports keep running, and the numbers stop meaning what the document says.

What does ESRE Media build?

We build your system on engage.re, where the description is a condition of storing data. Your application declares its vocabulary and the server refuses a write outside it, so no separate document needs maintenance and your meaning cannot drift.

Connect with us about your data foundation · · Replies within 24 hours

Sources and further reading