Muse stress test14 minA hands-on trial of Meta's Muse personal agent found unprompted lookups, a mistitled Walmart order, and a marketing pitch heavy on reservations. Checked against Meta's own safety post, Time's reporting and Meta's model announcement, here is what holds up and what is a gag.Read now →

Your AI Agent Found the Right Data and Still Gave the Wrong Answer. The Fix Has a Strange Old Name
In one test, 11 AI models answered the same database question 57 times and got it wrong 27 times, not because they couldn't find the data, but because they didn't know what it meant. The missing layer is an ontology. Here's a jargon-free guide to triples, OWL, SHACL, SPARQL, GraphRAG and how to start building one.
Ask your company's AI agent a simple question: Who owns this customer account, and what did we build for them?
Today's agents are genuinely good at the mechanics. They search your files, query your databases and remember what you told them last week. And yet the answer is often wrong.
In one recent test, 11 different AI models were asked the same question against the same database across 57 runs. 27 answers were wrong. The models found the right tables. They just joined the wrong ones.
That's the problem in one line: finding the data is not the same as knowing what it means.
Databricks CEO Ali Ghodsi has made the same point bluntly: the models are smart enough; what they lack is the context that lives inside every organization. That context has a name, and it's an old one: ontology.
(Not oncology. They do sound alike.)
This guide explains what an ontology is, every piece of the stack that makes one work, and how AI changed the economics of building one, without assuming you've ever touched a graph database.
What "ontology" actually means
The word comes from Greek: onto (being) and logos (an account). An ontology is an account of what exists.
In practice, for a business, it's a shared, machine-readable map of the things you care about (customers, contracts, projects, people) and how they connect.
Your team carries this map in their heads. "Account owner" means the salesperson, not the support rep. A "project" belongs to a "client," which might be a subsidiary of another client. An AI agent has none of that. It sees column names and guesses.
To make this concrete, we'll build a tiny ontology for one family, the Riveras, and then map each step back to business data.
Meet them:
- Elena is the grandmother. Her husband is Jorge.
- Elena's children are Marco and Sofia.
- Marco's son is Leo. Sofia's daughter is Ava.
Three generations, six people. Simple. Watch how quickly a computer gets it wrong.
Step 1: One real thing, one ID
Elena shows up in the family's data under five different names:
- "Abuela" in the family group chat
- "E. Rivera" in Marco's spreadsheet
- "Rivera, Elena" on her passport
- "E. Castillo" in a 1951 census record, before she married
- "Mom" in Sofia's photo album
You know these are one person. The computer finds zero matches. It compares text letter by letter, and "Abuela" and "E. Rivera" aren't the same string. To the machine, that's five people.
The fix: give every real thing one ID. Elena becomes elena-rivera, and a "who's who" table points all five names at it.
In business terms: "Acme Corp," "ACME," "Acme Inc." and customer #4471 are the same client. Until they share one ID, your agent is counting four customers.
Step 2: Facts in one shape (triples, RDF and Turtle)
Elena has one ID now, but her facts still come in different shapes: a spreadsheet row, passport fields, a photo caption.
So we give every fact the same tiny shape, a triple:
thing → link → another thing
For example: elena-rivera → hasChild → marco-rivera.
This is RDF, the Resource Description Framework, a W3C standard for writing facts any program can read. The three parts are the subject, the predicate and the object.
Think of triples as Lego bricks. Every brick has the same shape, so any two snap together. The IDs are the studs. Marco's file says Elena has child Marco. Sofia's photo says Elena has child Sofia. Same ID, so they snap together: one Elena, one family graph.
To save the bricks, we write them in Turtle, a plain-text format where each line is a fact.
Step 3: Teaching the computer what words mean (RDFS)
The computer still doesn't know what "Elena" is. A person? A place? A hurricane?
RDFS (RDF Schema) adds vocabulary: kinds of things and which kinds belong inside which. Grandmother is a kind of parent, which is a kind of person. A tree of kinds like this is a taxonomy.
Now say "Elena is a grandmother," and the computer follows the tree: she's also a parent and a person. Nobody had to write that down.
But a taxonomy only says what is a kind of what. It doesn't say how things relate.
Step 4: Writing down the rules everyone knows (OWL)
OWL, the Web Ontology Language, captures relationship rules every family takes for granted:
- Symmetric: if Elena is married to Jorge, Jorge is married to Elena.
- Transitive: Marco is Leo's ancestor, Elena is Marco's ancestor, so Elena is Leo's ancestor.
- Inverse: "has parent" is just "has child" read backwards. Elena has child Marco, so Marco has parent Elena.
In business terms: "is a subsidiary of" is transitive. "Is a partner of" is symmetric. "Manages" and "reports to" are inverses. Write these once, and every query benefits.
Step 5: The reasoner, a detective that connects dots
Rules on a page don't do anything by themselves. Something has to apply them. That's the reasoner.
Think of a detective: it doesn't guess, it follows clues. We gave it five facts:
- Elena has child Marco.
- Elena has child Sofia.
- Marco has child Leo.
- Sofia has child Ava.
- Elena is married to Jorge.
From three rules, the reasoner derives 11 new facts: Jorge is married to Elena; four "has parent" facts; and six ancestor relationships, including Elena as ancestor of both grandchildren. Every one is a fact nobody typed.
Step 6: Stopping bad data at the gate (SHACL)
What if a fact is wrong to begin with?
Marco's spreadsheet lists Elena's birthday as 03/04/31. Is that March 4 or April 3? 1931 or 2031?
The reasoner doesn't check. It takes data as given. So we need a gate.
That's SHACL, the Shapes Constraint Language. Think of an online form that turns the birthday box red and won't let you submit until the format is right. SHACL does the same for data: a "shape" says a birth date must be a real date in a specific format, like 1931-04-03. The ambiguous entry is stopped at the gate until someone fixes it.
In business terms: a contract without an end date, a customer without an owner, a price with the wrong currency. Catch them before your agent reasons over them.
Step 7: Your own if-then rules
OWL rules work for any family. For logic specific to you, you write custom rules. For example: if someone has a child who has a child, they're a grandparent.
The rule fires, and the graph now knows Elena is grandparent of Leo and Ava.
In business terms: "If an account has spent over $50,000 in 12 months, it's Tier 1." Write it once, centrally, instead of in five dashboards.
Step 8: Asking questions nobody planned (SPARQL)
Rules run ahead of time. But what about questions no one anticipated?
Try this: who is Leo's cousin? You'll say Ava instantly. But how did you get there? From Leo up to his dad Marco, up to grandma Elena, across to her other child Sofia, down to Sofia's child Ava. Nobody wrote "cousin" anywhere. You followed links.
SPARQL lets a computer do the same. It's the query language for RDF, essentially SQL for graphs. You draw the path, leave a blank at the end, and the graph fills it in: Ava.
Step 9: When links need details (property graphs and Cypher)
Look at a bare link: Elena married to Jorge. That's all it says. But a marriage has details: when, where, and what's the proof?
In basic RDF, a link can't easily hold those. Property graphs, the other big family of graph databases, can. The link itself carries data: married since 1952, in Toronto, source: marriage certificate. Property graphs have their own query language, Cypher.
Step 10: Seeing the whole map (graph algorithms)
Some questions need the whole graph, not one path.
Picture an airline route map. Zoom in on one airport and you learn little. Zoom out and the hubs jump out. Graph algorithms do the zooming out.
In the Rivera family, Elena is the hub: every path between Leo and Ava runs through her. That measure is called betweenness centrality.
In business terms: the one engineer every project depends on, or the one supplier every product line touches. That's your risk, and your leverage.
Step 11: Using your real data without moving it
So far we've used small, tidy files. Real data lives in databases, spreadsheets, web sources, photo captions and old letters in a drawer.
You don't have to copy everything into a graph. Instead, you write a short mapping that says what your existing columns mean: each row is a person, the birth_date column is a birth date, the parent column means "has parent." Then the database can answer graph questions without moving the data.
Step 12: Linking to the world (Wikidata and IRIs)
Elena was born in Toronto. But which Toronto? Canada, or the small city in Ohio?
Wikidata, a free public knowledge graph, already knows the difference. Link your "Toronto" ID to Wikidata's, and your graph inherits that knowledge.
This works because every ID is an IRI, a global identifier that looks like a web address. Any graph can point to any other. That's the foundation of what people are starting to call the agentic web.
Step 13: One definition per metric (the semantic layer)
Even with clean data, people count the same thing differently.
How much did the Riveras spend on the holidays? Marco says $2,000: he counts flights. Sofia says $3,000: flights plus gifts. Both are right by their own definition.
Every business has this problem. Ask "how many active customers?" and Sales counts anyone who paid in the last 90 days, while Delivery counts anyone with an open project.
A semantic layer writes each definition down once. Holiday spend = flights + gifts. Active customer = paid in the last 90 days. Every report and every AI uses that one definition.
Step 14: Plugging it into AI (GraphRAG and MCP)
Now put it together.
GraphRAG (graph retrieval-augmented generation) means that before an AI answers, it looks up facts in the graph.
Ask a bare model "Who are Elena's grandchildren, and where was she born?" and it can't answer. Connect it to the graph, and it says: Leo and Ava; born 1931-04-03 in Toronto, Canada. Same model, same question, right answer, and it can trace each fact back to its source.
The connection itself typically runs over MCP, the Model Context Protocol, which lets AI models call external tools and data sources in a standard way.
The context graph
Step back and you have three layers:
- The ontology says what things mean (kinds, links, rules in RDFS and OWL).
- The graph says what's true (Elena, Marco, Sofia, each with one IRI, stored as triples).
- The tools work on both: the reasoner infers, SHACL validates, SPARQL queries wherever the facts live.
Together, that's a context graph: exactly the context your AI was missing.
Step 15: Keeping it trustworthy (governance and provenance)
Once an AI depends on the graph, you can't break it. You need governance:
- Ownership: who can change what.
- Review: changes go through a pull request, tests and approval before going live. Adding Elena's birth name is a reviewed change, not a casual edit.
- Provenance: every fact records where it came from. "E. Castillo" came from the 1951 census. When two sources disagree, you can see who said what.
Life changes too. Say Leo gets a baby sister, Nina. Her birth certificate is a new source. Her facts pass the SHACL gate, the reasoner runs again, and now Nina has a parent (Marco) and an ancestor (Elena), and Ava has a new cousin. Nobody typed those.
And if a marriage ends, you don't delete it. You add an end date. Old facts aren't wrong; they were true for a while.
Step 16: Fresh or fast? (materialized vs. virtual graphs)
How current is the graph? Two approaches:
- Materialized graph: copy all facts into a graph database and refresh nightly. Queries are fast, but baby Nina only appears after the next refresh.
- Virtual graph: leave data where it lives. A mapping turns each question into live SQL. Nina shows up immediately, but each query is slower.
Many teams use both: a copy for facts that rarely change, live queries for ones that do.
Where to start
You don't have to start from nothing:
- Reuse existing ontologies. Schema.org covers people, organizations, products, events and more.
- Pick an editor to build and maintain your ontology. Free, open-source options exist.
- Pick a store. Open-source graph databases and managed cloud services both work.
Why everyone suddenly cares
Building ontologies used to be brutal: expert teams, workshops and months of hand-modeling. That's why most companies never did it.
Generative AI changed the math. An ontology is just a text file, and language models are good at writing text files. A model can draft an ontology from your tables, map columns and pull facts from documents. Humans still need to review it; models will confidently invent relationships. But the cost has collapsed.
The counterpoints
- It's not free. Even with AI drafting, someone has to own definitions and settle disputes. That's organizational work, not technical work.
- Over-modeling is a trap. Teams can spend months perfecting a taxonomy nobody queries. Start with the questions your agents actually get wrong.
- Graphs don't fix bad data. SHACL can block malformed entries, not wrong-but-valid ones.
- Not every problem needs a graph. If your agent only answers from a handful of documents, plain retrieval may be enough.
Practical takeaways
- Collect the questions your agents get wrong. Those are your ontology's requirements.
- Fix identity first. One ID per customer, product and person solves a shocking share of errors.
- Write down your five most-argued metrics in a semantic layer.
- Let AI draft, let humans approve.
- Connect it through MCP so every agent uses the same context.
(For a broader view of building agent systems, see our guide to an AI operating system for your life and why some agent stacks fail.)
FAQ
What is an ontology in AI? A shared, machine-readable map of the things a business cares about and how they relate, with rules that let software infer new facts.
What's the difference between a taxonomy and an ontology? A taxonomy says what is a kind of what. An ontology also defines relationships and rules, like "married to" being symmetric.
Do I need a graph database? Not necessarily. With virtual graphs, a mapping can answer graph questions directly from your existing database.
What is GraphRAG? A technique where an AI looks up facts in a knowledge graph before answering, so its answers are grounded and traceable.
Can AI build my ontology for me? It can draft one quickly from your tables and documents, but you need humans to review and govern it.
The bottom line
The next leap in workplace AI may not come from a smarter model. It may come from finally telling the models what your words mean.
Agents fail at business questions for the same reason a brilliant new hire does in week one: they don't know who's who, what counts as "active," or which table is the real one. An ontology is the onboarding document, written for machines.
The race in enterprise AI is turning into a race for context. The companies that write theirs down first will get the agents that actually work.





