Why Language Models Need an Ontology to Remember What They Know

Simon Tyrrell

Hatched by Simon Tyrrell

May 05, 2026

10 min read

86%

0

The Strange Gap Between Knowing and Knowing Where to Look

What if a language model already knows the answer, but still gets it wrong because it cannot find the right shelf in its own mind?

That possibility changes the way we should think about artificial intelligence. We often describe model errors as ignorance, as if the system simply lacks the fact. But a more unsettling explanation is that the fact is present, encoded somewhere inside the network, yet inaccessible through the path the model happened to take in that moment. The failure is not always absence. Sometimes it is misretrieval.

This matters because it shifts the central question from “Does the model know?” to “How does the model decide what to retrieve?” Once you ask that, a deeper pattern emerges. Large language models do not appear to store meaning as a chaotic soup. At least for some facts, they use surprisingly simple linear functions to decode relational knowledge. In other words, the machine may be carrying around a structured internal library, but the index is thinner than we assumed.

That makes the second idea crucial: if you want a model to turn text into useful knowledge, you need more than text. You need an ontology, a deliberate map of the categories and relationships you care about. Knowledge without an organizing scheme remains latent, while an ontology gives it shape, direction, and queryability. The real tension, then, is not between data and intelligence. It is between stored knowledge and retrievable knowledge.


The Hidden Architecture of Recall

Human beings usually imagine memory as a filing cabinet, but modern models are closer to a vast city with many overlapping roads. A fact may exist in several neighborhoods at once, and the route that retrieves it can matter as much as the fact itself. If the right path is activated, the answer appears cleanly. If the wrong path is activated, the model can produce something plausible but false.

The striking discovery is that some of this retrieval may be far simpler than expected. Instead of needing a complicated, context specific search mechanism for every fact, the model often relies on a simple linear transformation to recover relational information. Think of it like a compass rather than a map. A compass does not contain the destination, but it points in the direction that makes destination finding possible.

That simplicity is not a weakness. It is a clue.

It suggests that beneath fluent language lies a more structured substrate. When the model learns that Paris is the capital of France or that a particular company was founded by a certain person, it may encode that relationship in a way that can be projected through a relatively stable function. This implies that the model is not merely improvising from token to token. It is often looking up internal representations.

And yet the lookup process can fail. A model may answer incorrectly even when the correct information is somewhere inside it. That is not just a funny bug. It reveals a profound asymmetry: storage is easier than access. The same asymmetry exists in human cognition. We often “know” something only after the right cue brings it to mind. The model, like a person under stress or distraction, may have the answer but not the route.

This is where the question gets interesting. If knowledge inside a model is accessible through predictable transformations, then errors are not random noise. They are signals. They point to where the retrieval system is brittle, where the internal map is missing, and where a better organizing principle could help.


Why Ontology Matters More Than Raw Text

Text is abundant. Meaning is not.

A corpus can contain millions of sentences, but unless those sentences are organized around a schema of entities and relationships, they remain a forest of fragments. A knowledge graph addresses this by making structure explicit. It says, in effect: here are the entities, here are the relations, and here is the ontology that tells us what counts as relevant.

This is why text to knowledge graph systems matter. They do not just extract facts. They impose a navigable form on information. An ontology is the difference between a pile of index cards and a library catalog. Both contain words, but only one lets you ask, with precision, “Show me all the suppliers connected to this product through ownership and dependency relations,” or “Which researchers are linked by coauthorship and shared methods?”

The hidden connection to model retrieval is this: an ontology is an external answer to the same problem that linear decoding solves internally. Both are ways of organizing knowledge so that the right relation can be recovered when needed. The model’s internal linear functions are like private shortcuts. The knowledge graph is a public structure of shortcuts.

A model without ontology may contain knowledge, but it cannot reliably tell you what kind of knowledge it has.

That distinction matters because retrieval is always filtered by categories. If you do not know whether you are asking about people, organizations, events, causes, or causal chains, you will not know how to search. Ontology does not just label data. It trains attention.

Consider a practical example. Suppose you ingest hundreds of product support articles into a system. The raw text may mention bugs, fixes, hardware models, regions, and customer outcomes all mixed together. A knowledge graph built with a well chosen ontology can separate these into typed entities and relations. Suddenly, you can ask not just “What do these documents say?” but “Which bug reports cluster around one component?” or “Which fixes were applied only in enterprise deployments?” That is not merely extraction. That is retrieval design.

This is the same challenge inside a language model. The network may compress vast quantities of text into internal vectors, but unless those vectors line up with the right conceptual axes, the answer may surface in the wrong shape. Ontology is what gives shape a name.


A New Mental Model: Knowledge Has Two Layers

The most useful synthesis here is to stop treating knowledge as a single thing. It has at least two layers.

1. Latent knowledge

This is what the system has absorbed. It is compressed, distributed, and often difficult to inspect directly. In a model, latent knowledge may sit in activations and parameters. In a corpus, latent knowledge sits in unstructured text.

2. Addressable knowledge

This is knowledge that can be retrieved, queried, and acted on. It depends on an index, a schema, or a function that routes you to the relevant representation.

The difference between the two is not cosmetic. It determines whether intelligence is usable.

A helpful analogy is a warehouse versus a store. A warehouse can contain far more goods than a store, but if the goods are not labeled, shelved, and connected to a retrieval system, they are effectively invisible to customers. The warehouse is not less rich than the store. It is less addressable.

This is why some model errors are so frustrating. The model may have latent knowledge, but the prompt does not activate the right retrieval path. In human terms, the answer is on the tip of the tongue. In machine terms, the representation is inside the network but the decoding function fails to surface it.

A knowledge graph does the opposite. It sacrifices some of the implicit richness of raw text in exchange for addressability. You lose a bit of ambiguity, but you gain a lot of control. And when paired with language models, that control becomes powerful. The model can extract candidate facts, while the graph can normalize, type, and connect them. Together, they create a loop between compression and structure.

This suggests a productive design principle: do not ask whether you should use a language model or a knowledge graph. Ask which layer should do which job.

Use the model for:

  • discovering candidate relations in messy text
  • paraphrasing and generalization
  • mapping across semantically similar phrases

Use the graph for:

  • enforcing entity types
  • preserving relational consistency
  • supporting precise retrieval and reasoning

The strongest systems will not choose between neural fluidity and symbolic order. They will stage them.


From Diagnosis to Repair

The most exciting implication is not just that we can observe where knowledge lives, but that we may be able to correct where it goes wrong.

If a model can answer incorrectly while storing the right fact, then the failure is potentially editable. This is a radically different repair strategy than simply collecting more data and hoping the model becomes better by exposure. It means you can inspect the internal pathways that connect question type to answer type, identify the misleading transformation, and then intervene.

That resembles debugging software more than training a mystic oracle. Imagine a medical AI that knows a drug interaction but sometimes retrieves the wrong dosage when the prompt contains a rare brand name. The problem may not be the underlying knowledge. It may be that the model’s retrieval cue is poorly aligned with the category of question. An ontology can help here by telling the system which entities are drugs, which are dosages, which are contraindications, and how those concepts should be linked.

In other words, structured external knowledge can compensate for fragile internal recall. And internal analysis can tell us where the structure should be added.

This is the deeper unity between the two ideas. Linear probing of models and knowledge graph construction are often treated as separate worlds, one diagnostic and one practical. But they are really two sides of the same agenda: making knowledge legible.

One asks, “What does the model already encode?” The other asks, “How should we organize text so knowledge can be used?” The first is about hidden representation. The second is about explicit representation. Both are methods for turning diffuse information into something that can be found again.

Intelligence is not just the possession of facts. It is the ability to place facts inside a structure that makes them retrievable under pressure.


The Real Frontier: Building Systems That Know Their Own Shape

The most interesting future systems will not merely answer questions. They will understand the shape of their own knowledge.

That means they will know, at least probabilistically, whether a fact is stored, how confident the retrieval path is, what ontology applies, and whether a graph or a latent representation should be consulted first. This is a very different vision from today’s default use of LLMs as all purpose text generators.

Imagine a research assistant that reads thousands of papers. It does not just summarize them. It builds a knowledge graph with typed entities, then uses internal probes to detect which claims are robustly stored and which are weakly supported. When a user asks a question, it can answer through a blended pipeline: retrieve from the graph for precision, consult the model for synthesis, and cross check the result against internal consistency signals.

That would be more than a smarter chatbot. It would be a system with epistemic self awareness.

The key design insight is that structure is not an afterthought added to intelligence. Structure is what makes intelligence useful. A model that stores a fact but cannot find it is a library without a catalog. A knowledge graph without a model is a catalog without a reader. Put them together, and you get something closer to a mind.

Key Takeaways

  1. Separate storage from retrieval in your mental model. A system can “know” something internally and still fail to access it reliably.
  2. Use ontology to make knowledge queryable. If you care about specific relationships, define the categories and relation types explicitly.
  3. Treat errors as diagnostic signals, not just mistakes. Wrong answers may indicate a retrieval problem, not missing knowledge.
  4. Pair language models with knowledge graphs. Let the model extract, generalize, and paraphrase, while the graph enforces structure and precision.
  5. Design for addressability, not just accumulation. More information is not enough if it cannot be routed, typed, and retrieved under pressure.

Conclusion: Knowledge Is Not What the System Contains, But What It Can Reach

We tend to celebrate intelligence as accumulation. More parameters, more documents, more training. But the more profound question is whether a system can turn what it has absorbed into something it can actually use.

That is why the discovery of simple internal decoding functions is so important. It suggests that beneath the complexity, there may be elegant routes to recall. And that is why ontologies and knowledge graphs matter. They give text a shape that retrieval can follow. One insight comes from inside the model, the other from outside it. Together, they point to the same truth: knowledge becomes powerful only when it is addressable.

The next generation of AI will not be defined merely by how much it knows. It will be defined by how well it can answer a harder question: what, exactly, is the path from stored information to usable thought?

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣