Data governance
7 min

A Semantic Layer for AI Agents: What the Agent Needs Before It Asks for Revenue

Key takeaways

  • A semantic layer for AI agents is the governed record of what the data means, served to a model in a form it can resolve: the concept, the permitted relationships, the owner and version, the entitlement, and then the metric.
  • The order is the point. An agent resolves what a customer is before it can compute anything about customers, and a metrics layer holds only the last item on the list.
  • The four pages competing for this query agree the model knows language and nothing about your business. None of them lists the approver's name and the review date among the things the agent receives.
  • A semantic layer and retrieval-augmented generation answer different questions. Text questions go to RAG; questions computed over live records under access rules go to the layer, and most agents need both.
  • Five asks test whether a layer is ready for an agent: what a customer is, which joins are allowed, who approved it and when it expires, the same question as two roles, and the record as a file in an open standard.
In this article
Share

A retailer's first analytics agent goes live. Its first request is for revenue at risk by customer segment. Before it can run that query it has to settle four things nobody wrote down for a machine. What is a customer, which records count, which tables may it join, and what may the person asking see? A semantic layer for AI agents is the governed record that answers those four questions before any calculation runs. The layer most teams already own defines the calculation. The agent needs what comes before it.

This post lists the five things the agent needs, in order, and checks the competing pages against that list. In our post What Is a Semantic Layer? we separate the dashboard problem from the agent problem. This post takes the agent problem on its own.

An agent needs the concept, the permitted relationships, the owner and version, and the entitlement before it needs the metric. A metrics layer holds the last of the five. A semantic layer built on an ontology holds all five on one governed record.

What is a semantic layer for AI agents?

It is the same layer with a different reader. For a decade its reader was a person with a dashboard. That person carried the concept in their head and chose a metric from a menu. An agent carries nothing in. It composes a query from what was written down for a machine, then acts on the answer.

What changes when the reader is a model

  • Nothing is implied. A column named cust_id is evidence. The agent infers the rest, and inferred context is a guess with good grammar.
  • Composition replaces selection. A dashboard user picks "revenue by region". An agent writes the join, and an unmodelled join path gets invented.
  • The answer is acted on. A wrong number in a report gets caught in a meeting. In an agent it becomes a credit decision, so it has to cite what it used, or refuse.

We call the discipline that keeps the record true context management, and the meaning it serves authoritative context. Our post Context Management: The Complete Guide covers the discipline. This post covers the record.

What does an AI agent need before it asks for revenue?

Five things, in this order. Each is a precondition for the next, and the metric is last. A metrics layer can define a calculation. It cannot define a concept.

Five needs, in resolution order

The agent needsWhat the record holdsWhat a metrics layer returnsWithout it
1. The conceptCustomer: a party with at least one billed account, in the scope where that definition holdsA join keyThe agent infers "customer" from a column name
2. The permitted relationshipsCustomer places Order; Order carries Invoice, held as modelled factsWhatever joins the model file declaresA plausible join nobody approved
3. The owner and the versionA named person in Finance; version 3; approved 2026-03-14; review due 2027-03-14Git historyThe agent cites a definition that expired, or one nobody approved
4. The entitlementRules on the concept, evaluated for the identity the agent acts forRow and column rules per modelThe agent returns what it can reach, and phrasing changes the result
5. The metric logicRevenue at risk, defined on Customer and Order, with its dimensions and filtersA formula over columns, defined onceThree agents, three numbers

Our post Semantic Layer vs Ontology: Which One Says What a Customer Is explains why the first row comes first. Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes the fourth column apart. Our post Semantic Layer vs Knowledge Graph: Where Meaning Lives and Where It Is Stored shows the agent reaching the five rows as hops in a graph.

What do the pages competing for this query say the agent needs?

We read four pages for this query: two from AWS, one from a metrics-layer vendor, and one from a catalog vendor. All four agree on the diagnosis. The AWS blog written with Stardog (Navin Sharma, JP Boreddy, Raghu Prabhu, and Sahil Thapar, 2026-07-10) says it in one line. "The model knows language, it doesn't know your business" (AWS Machine Learning Blog). They part on what goes in the layer and on who owns a definition.

Four pages, what each puts in the layer

PageWhat the layer holds, in its wordsWho owns a definition, in its wordsWhere it stops
AWS Prescriptive Guidance (Don Simpson, Taylor Riggan, and Chun Schiros, 2026-07-24)"formal ontologies, automated symbolic reasoning, and virtual knowledge graphs" on W3C standards, SHACL included"human-in-the-loop workflows for semantic governance""automated ontology induction from data catalogs"; no owner or review date on a definition in the summary
AWS blog with Stardog (2026-07-10)"an ontology-driven view of your enterprise data", with access gated by named graphWhich role may read which graph; no approver namedValidation and ownership
Cube, "Best Semantic Layer for AI Agents in 2026" (updated 2026-11-18)"metrics (revenue, active users, churn) with their exact definitions, dimensions and the entities they belong to, the join paths between them, and the access policies that govern them""a versioned semantic model owned by the data team"What an entity is lives outside the file
A catalog vendor's post (2026-06-29)"a governed layer of business meaning, the definitions, metrics, relationships and rules""owned and maintained"No owner or record named; accuracy figures with no link or method

Two things stand out. Every page puts what a customer is in the layer. No page lists, among what the agent receives, the name of the person who approved a definition and the date it expires. The two AWS pages are closest to our argument and sit on the W3C standards we use. Both are reference architectures: they show how to build the record and say little about who signs it. An ontology induced from a catalog is a draft until a person approves it. Our post Ground Truth: SME-Approved vs Inferred Metadata covers the approval that makes an induced model citable.

Is a semantic layer the same as RAG for an agent?

No, and most agents need both. Retrieval-augmented generation, or RAG, finds passages of text that match a question and puts them in the prompt. It answers "what does the policy say". A semantic layer answers "what is a customer, and how much did they spend", from live records, under access rules. The AWS blog with Stardog draws the same line: "A semantic layer doesn't replace RAG. It complements it."

Which one answers which question

QuestionRAGSemantic layer
What does the contract say about termination?Yes. The answer lives in textNo
How many active customers churned last quarter?No. The number is computed over recordsYes. The concept, the metric, and the entitlement
Which customers does this clause affect?Half. It finds the clauseHalf. It resolves the customers. Both, through one agent

The measured case is a public benchmark. Sequeda, Allemang, and Jacob (arXiv, 2023-11-13) put enterprise questions to GPT-4 on an insurance schema. With zero-shot prompts directly on the SQL database, accuracy was 16%. Over a knowledge graph of the same database, with an ontology and mappings, it was 54% (arXiv 2311.07509). The follow-up (Allemang and Sequeda, arXiv, 2024-05-20) checked each generated query against the ontology and repaired the failures. Accuracy rose to 72%, with a further 8% returned as "I don't know" (arXiv 2405.11706). Our post Semantic Layer vs Text-to-SQL: What a Refusal Is Worth is about that 8%.

How does the agent receive the five?

Over an interface it can call: an API, a SPARQL endpoint, or an MCP server. MCP, the Model Context Protocol, is the open standard agents use to call tools. What matters here is what arrives, in what order, and whether the record travels with it.

Four properties of a governed answer

  • Definitions resolve before generation. The agent gets the meaning of "customer" first and composes the query second.
  • Joins are bounded by the model. Only modelled relationships are traversable, so a plausible invented join is unavailable.
  • Entitlements resolve per request. One question, two roles, two correct answers, with no change to the warehouse and no filter in the prompt.
  • The answer carries its record. The definitions resolved, their versions, and the entitlements applied are retained, so a past question can be re-run against the definitions in force that day.

Our post Semantic Layer and MCP: What the Agent Actually Receives shows what a governed-meaning MCP server returns that a metrics MCP server cannot.

How do you test whether a semantic layer is ready for an agent?

Five asks, one per need. Put them to the layer you have.

Five asks, one per need

  1. Ask it what a customer is. A definition with a scope passes. A column passes nothing.
  2. Ask which tables it may join to reach an order. A modelled relationship passes. "Any key that matches" fails.
  3. Ask who approved the definition and when it expires. A name and a date pass. A commit hash is a start.
  4. Ask the same question as two roles. Two correct answers pass. One answer with a filter added in the prompt fails.
  5. Ask for the record as a file in an open standard. What comes back is what you own.

A layer that passes all five is a semantic layer run as context management, whatever its vendor calls it. A layer that passes only the last is a metrics layer, and it is still worth keeping for the dashboards. Who gets to be the owner in the third ask is the subject of our post What Is Data Governance for AI?.

Where does TopQuadrant fit?

TopQuadrant does not sell the model, the warehouse, or the agent framework. TQ Data Foundation is the governed semantic layer the agent reads from. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, MCP, and a Python SDK. The join paths come from the ontology, so an invented join is unavailable. Entitlements attach to governed concepts and are evaluated per request against the identity the agent acts for. Every served answer records the definitions resolved, their versions, the entitlements applied, and the data returned. AI proposes the models and the mappings; your experts confirm them. Every definition is validated with SHACL, a standard TopQuadrant helped author, so the record exports whole. Your catalog stays, and it syncs. Our agent-ready semantic layer page shows the five needs served in that order.

Ask your agent's semantic layer what a customer is before you ask it for revenue. If the answer carries a name and a date, the revenue number can be defended. TQ Data Foundation puts the name and the date on the record.

Give your AI the context it's been missing

See how the TQ Data Foundation turns your enterprise knowledge into trusted, Al-ready context.