
Two tales of knowledge
An in-depth analysis of two philosophies for inducing context & knowledge for Agents: Ontology and Wiki
The views and opinions expressed in this article are my own and do not represent the official positions of Amazon Web Services (AWS).
Enterprises are racing to put AI agents in front of their data. Ask a question in plain language, get back a correct query and a correct number. That's the pitch behind almost every "chat with your data" product shipping right now.
The part that keeps breaking is context. An agent can read a schema. It can list every table and column in your warehouse in seconds. What it can't do on its own is know that the
status column means five different things depending on who you ask, or which of your twelve "active users" definitions is the one finance actually reports on. The question is: How do you get an agent to actually understand your data, not just see it?This matters more than it used to. Agents don't just translate a question into a query anymore. They decide what to do with the answer. Flag a record. Trigger a workflow. Take an action, no human in between to catch a misunderstanding before it happens. Enterprises adopting agents are betting their agent understands the data well enough to be trusted with that autonomy. For most, that bet isn't safe yet.
Two philosophies have emerged for giving agents that help. One induces a structured ontology. The other writes a wiki. We built one of each, for the same problem, and tested what happens as the model doing the reading, and the deciding, gets less capable.
One expectation to set before the numbers: this comparison isn't about crowning a winner. It's about showing the trade-offs clearly, so you can choose the layer that fits what your organization needs its agents to do.
Two philosophies for closing the gap
The ontology philosophy treats this as a modeling problem. Represent the business as a graph, made of entities, relationships, and typed facts. Each one is explicit and checkable. An agent doesn't read prose and infer what a metric means. It looks up a metric-definition object and gets a formula back. This is the older tradition in AI, closer to expert systems and the semantic web. It treats knowledge as structure you can query and validate, not as text you have to interpret.
The wiki philosophy takes a newer, and in some ways simpler bet. LLMs are good at reading documentation written for humans. So the fix is to generate great documentation, and let the agent read it the way a new hire would. This pattern showed up first for code. Point a tool like DeepWiki at a GitHub repo, and it writes a browsable wiki explaining the codebase, for humans and agents alike. Open Knowledge Format (OKF) applies the same idea to data. A harvester agent reads your catalog and existing documentation, and writes a wiki of markdown docs explaining what your tables and columns actually mean.
Both philosophies chase the same goal. Get an agent from "I can see your data" to "I understand your data, and can act on it." They just disagree about what that understanding should look like once it's written down.
What we tested
We wanted to see how the two philosophies actually compare, not just on accuracy. We looked at how well each holds up as the model gets less capable, how heavily each leans on tool calls, and how consistent each is from run to run.
For the wiki philosophy, we used sample-okf-llm-wiki , the OKF harvester we open sourced recently. For the ontology philosophy, we used a closed-source solution built in-house, which induces a bottom-up ontology from a data source's catalog and any unstructured data available.
Disclaimer: Everything measured here compares the output of these two specific tools on this dataset: the wiki our harvester generated and the ontology our in-house tool induced. A similar tool, or a wiki or ontology built with heavy human curation, could produce a knowledge layer of different quality, and the results may vary accordingly.
We pointed both at the same dataset, Formula 1 from the BIRD mini_dev benchmark. The wiki produced a bundle of markdown docs. The ontology produced a populated graph. We handed the result to an agent as its only source of knowledge about the data.
The consumer agent reached both the wiki and the ontology through a set of tools behind an MCP server. To answer a question, it had only the short evidence hint that ships with every BIRD question, and whichever knowledge layer was under test. Nothing else.
Then we ran the benchmark's 66 questions against both. We used four model configurations, from most to least capable, three runs each. Every answer was graded with BIRD's own exact-match evaluator.
Accuracy
Before testing how each layer holds up under pressure, we wanted a ceiling. Push both knowledge layers as hard as they'd go, paired with the most capable model available, and see what the best case actually looks like.
At peak capability, Opus 4.8 running at high reasoning effort, the wiki scored 68.2 on exact-match accuracy (EX). The ontology scored 67.7. Half a point apart, on 66 questions run three times each. Call it a tie. If your agent always runs at that tier, either knowledge layer gets you there.

Regression
Peak capability isn't where most agents live day to day. Step down through less capable models and lower reasoning effort, and the two layers separate.
Model tier | Wiki | Ontology | Wiki's lead |
|---|---|---|---|
Opus 4.8, high effort | 68.2 | 67.7 | +0.5 |
Opus 4.8, low effort | 64.7 | 63.1 | +1.6 |
Sonnet 4.6, medium effort | 62.1 | 59.1 | +3.0 |
Sonnet 5, medium effort | 58.6 | 53.5 | +5.1 |

The wiki loses 9.6 points from top to bottom. The ontology loses 14.2, nearly half again as much. Any single row of that table sits inside run-to-run noise, the same noise that makes the top row a tie. The pattern doesn't. The gap widens at every step, always in the same direction, and ends at 5.1 points.

Here's our take on why. The two layers don't just differ in what they contain. They differ in what they ask of the model on every lookup. Reading the wiki is close to what a model already does best. Skim a document, find the relevant paragraph, use it. The ontology asks for something closer to writing a small program against an API. First, recognize which of several specialized tools applies, node lookup, column similarity, fact lookup, graph traversal. Then form the right call. Then correctly parse a typed object back into the reasoning.
Each call carries more decision points than a document read does. A less capable model has more chances to get one of those decisions wrong. A wrong paragraph skim in a wiki is usually still partially useful. A wrong tool call, or a misread field on the object it returns, tends to just be wrong.
Note: One result surprised us. Sonnet 4.6 outperformed Sonnet 5 on both knowledge layers. On the wiki, 62.1 against 58.6. On the ontology, 59.1 against 53.5. We expected the newer model to hold its own at worst. It didn't, on this task, at this tier. It's a reminder that newer isn't always more capable for a given job, and one more reason not to design a knowledge layer around whichever model tops the leaderboard this month.
Tool usage
Getting to an answer isn't free. Every lookup the agent makes, a table, a business term, a metric, is a tool call, and tool calls add latency and cost. On this measure the ontology is leaner: 2.60 knowledge calls per question, against 2.75 for the wiki. It also extracts slightly more accuracy out of each call, 28.1 points of EX per call against 25.5. On round trips, the ontology wins.
Volume tells the other half of the story. The ontology's replies are heavier, roughly 1,500 tokens per call against 1,200 for the wiki. Per question, that adds up to about 3,900 tokens of knowledge payload for the ontology and about 3,300 for the wiki. So the ontology takes fewer trips but comes back heavier each time, and ends up feeding the model slightly more context overall. The wiki reads in more, lighter pieces.

The distribution of those calls makes the difference concrete. The wiki funnels 91% of its traffic through two simple operations, reading a page and browsing folders. The ontology spreads the same work across its whole toolkit: its most-used tool, node lookup, carries only 39% of calls, and five more tools each carry a meaningful share. That spread is the per-lookup decision cost from the regression section made visible. Every ontology lookup starts by choosing the right tool from a menu; most wiki look-ups are just another read..

Consistency
Run the same question three times and you'd hope for the same answer. Neither layer is perfectly steady. The wiki's run-to-run spread averaged 2.60 points. The ontology's averaged 2.67. Both numbers are higher than we'd like, and close enough to each other to call this dimension a wash. It's also the caveat to carry back to the accuracy table: differences smaller than a couple of points don't mean much on their own. The trends across tiers do.

Putting it together
Four dimensions, and the results split cleanly. On accuracy, it's a tie at the top and a widening wiki lead below it. On regression, the wiki degrades less as the model gets less capable. On tool usage, the ontology takes fewer, heavier calls and gets more accuracy out of each one; the wiki takes more, lighter ones and feeds the model slightly less context in total. On consistency, neither is as steady as we'd like, with the wiki marginally steadier.
Beyond the benchmark
No single benchmark captures everything either system is built for.
The ontology's strength is structure. It's a property graph, built on Amazon Neptune in our implementation, with the graph itself for relationships, a vector index for semantic search over it, and a facts layer holding the assertions extracted from documents and conversations. Above the graph sits an RDF ontology layer, where a second agent converges the raw data with the business concepts. None of it is hand modeled. It's induced bottom-up, straight from real patterns in your catalog and your data. That structure is what lets it map complex relationships, joins, hierarchies, and term equivalence across tables in a way a flat document can't.
The wiki's strength is portability. It's markdown files with YAML frontmatter, stored in S3, served to any agent through an MCP server with a handful of simple tools: read, grep, list, and its own semantic search. There's no database to stand up and no graph to model. A new agent, or a new team, can point at the bundle and start reading in minutes.
Maintenance tells a similar story. A wiki is just markdown, so reviewing a change means reading a diff, the same process any team already uses for documentation or code. An agent can propose an edit and a person can approve it in minutes. An ontology is harder to review by inspection. A single change to a node or a relationship can ripple through the graph in ways a diff doesn't show. That's why an ontology needs guardrails on the knowledge itself, ones a wiki doesn't. Constraints like SHACL define what a valid shape of the graph looks like. Automated reasoning catches violations before they land. The wiki's simplicity is its own safety net. The ontology has to build that safety net on purpose.
There's a flip side to that, though. Guardrails on the agent's behavior are a different story. Once an ontology is modeled, constraining the agent that reads it gets easier, not harder. A rule like "never report a metric without its verified definition" is just a check against a field that already exists as structured data. Doing the same with a wiki means first pulling that rule out of prose, then finding a way to enforce it against an agent that's just reading text end to end. The ontology pays its structuring cost early. The wiki defers that cost, and pays it again, less cleanly, the moment someone needs to constrain what the agent does with what it reads.
Conclusion
Two philosophies, tested against each other, on the same data, with the same questions. Neither comes out strictly better.
The wiki holds up better as the model gets less capable, and it's simpler to stand up. The ontology brings more structure, gets more accuracy out of each call, and keeps knowledge in a shape other systems can plug into.

If you're choosing between them, the honest question isn't which one scores higher. It's what your agent actually needs to do, and whether you can guarantee the model behind it stays strong. An agent that only needs to answer a question, on a model you don't fully control, is better served by a wiki it can just read. An agent that sits inside a larger system, where knowledge has to wire into other tools and hard guardrails have to constrain what the agent does, is better served by an ontology.
The short version: choose by purpose, not by score. The wiki is the lighter choice: minimal infrastructure, a shorter path to value, and the safer bet for straightforward question-answering, especially on models you don't control. The ontology is the heavier investment that buys flexibility: structured knowledge other systems can plug into, and much stronger governance over what an agent does with it.
Co-authored with:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article