How ontologies teach machines to keep hold of the essentials and stop frightening people with foggy hallucinations
“I’ve misplaced those keys again…” my neighbor sighs, turning his pockets inside out. Large language models sigh just as often—inside them live tens of billions of parameters, yet real memory is still in short supply. Give them a long question or ask about figures that sit outside their context window and they start to invent. Turning that chatty crowd into a conscientious assistant requires an external “hard drive” — ontological memory. How it works, why engineers love it, and where it is taking us is the subject of this article.
Why we’re talking about memory again
A year ago it seemed LLMs would solve everything: translation, code, poetry, even finding daycare next door. Then came the cold shower: models mix up dates, argue with themselves, and tire after the thousandth turn. Companies building products on them discovered that without hard facts at hand you can’t let an algorithm near critical decisions. Governments apply regulatory pressure (“show your source!”), users demand transparency (“why was I refused a loan?”). And so the old idea of knowledge graphs returned, together with the conversation about structured, logically checkable memory.
Historical Roots from Aristotle to Silicon Valley
The word “ontology” comes from philosophy, where it means the study of what exists in the world. Aristotle tried to classify everything that exists more than 2,500 years ago. In the twentieth century the idea acquired an engineering incarnation.
In 1993 researcher Tom Gruber coined the famous definition: “an ontology is a specification of a conceptualization.” In plain language it is a formal way to describe how we understand the world and its structure. The first serious attempt to create an “ontology of everything” was the Cyc project in the 1980s — a system that still tries to encode human common sense in logical rules.
Then came the Internet era, and ontologies became the backbone of the Semantic Web. Google built its Knowledge Graph, uniting billions of facts about the world. Today these technologies are enjoying a renaissance thanks to the boom in large language models.
An Album instead of a Shoebox. What Ontological Memory Is
Imagine a shoebox full of old photos: the shots are great, but finding the summer picnic is a quest. Now imagine an album where every photo is captioned, numbered, and linked: “this same person five years later.” Ontological memory does that with data, turning scattered bits of text, audio, and video into a concept graph. The node “Paris” knows it is the capital of France, that the Eiffel Tower stands there, and that there’s another Paris in Texas — and mixing them up is bad manners.
Technically the graph is described in RDF/OWL standards, stored as triples (subject–predicate–object) or property graphs, and queried with SPARQL or Cypher. But readers need only remember the key idea: every piece of knowledge gets an address and neighbors, which means it can be
- found quickly,
- checked logically (“is the tower really in France?”),
- linked to new facts without rebuilding the whole base.
How the Graph Becomes a Brain
To turn cold RDF lines into a warm memory, engineers assemble a pipeline of four stages:
- Fact extraction. An LLM or classic NLP modules pull out entities (“red sofa”), properties (color = red), relationships (“stands in living room”).
- Normalization. “Red sofa” hooks onto the existing class Furniture so we don’t end up with a hundred little “couches”.
- Storage. The triple “sofa — stands in — living room” lands in the graph DB.
- Reasoning. A reasoner sees there is only one sofa in the living room, so free space is smaller than yesterday, and can adjust the cleaning robot’s plan.
The language model consults the graph like we consult Google Maps: it finds the right fragment fast and knows the road was checked by someone besides itself.
How It Works: Architectural Approaches
Modern systems combine knowledge graphs with language models through a method called Graph-RAG (Retrieval-Augmented Generation). Here’s how it roughly works:
Fact Extraction. The AI reads texts, documents, or videos and automatically extracts facts in the form of subject–predicate–object triples. For example, from the sentence “Anna works as a doctor at a hospital on Servantes,” the system will extract:
- “Anna – profession – doctor”
- “Anna – works at – hospital”
- “Hospital – located on – Servantes Street”
Graph Construction. Extracted facts are organized into a unified knowledge structure. The system automatically deduplicates information, identifies connections, and maintains consistency.
Semantic Search. When a user asks a question, the system doesn’t look for keyword matches. Instead, it formulates a semantic query to the graph. Relevant data is retrieved and passed to the language model to generate a coherent, accurate answer.
Continuous Learning. As new data comes in, the graph updates in real time. Contradictions are detected and resolved automatically or flagged for human review.
A notable feature: the graph can expand on the fly. If the system encounters a new concept or relationship, it can extend the knowledge schema autonomously—pending validation by a human or automated validator.
Neuro-symbolic cycles are another increasingly popular approach. In this hybrid system, the language model is responsible for natural language understanding and meaning extraction, while symbolic rules and logical mechanisms handle formal inference and constraint checking. This allows you to combine the creativity of neural nets with the rigor and reliability of symbolic reasoning.
Where Ontological Memory Earns Money
Search engines. Suppose a user types “Kashmir.” A knowledge graph helps the engine see the query might refer to the region on the India–Pakistan border, the Led Zeppelin song, a wool fabric, or even a restaurant downtown. Results are ranked so the top links match the most likely intent, and an answer card suggests refining the meaning. People scroll less, click what they really wanted, and return sooner with a new question. Average ad CTR rises: an ad tied to the right sense (“cashmere fabric”) shows to exactly the audience that cares. Conversion is higher — advertisers happy, search revenue per click up.
Universal robots. Forget dull manipulators on pre‑set loops. Picture a warehouse maze where a robot only needs to hear: “Move the boxes with red labels to the top shelf and pick three orders for Osnabrück.” The voice command via an LLM becomes new graph nodes: “red_label,” “order→city=Osnabrück.” The machine finds the boxes, sees with its camera that a pallet shifted by 20 cm, updates coordinates in the ontology, and recalculates the path. No firmware flashes or 12‑hour downtime: rules and facts update on the fly, the plan is rebuilt in seconds, and a chat message reports: “Task done in 4 min 32 sec; moved 12 boxes; path savings 8 m.”
Corporate assistants. Convert internal docs, CRM records, and mail logs into a single ontology and your chatbot turns into a business analyst. Ask, “Who worked most with clients from Cartagena last quarter?” — it replies, “Maria López made 42 calls, Juan Gómez closed 5 deals worth €120 k.” Ask, “Which project has a free DevOps engineer?” — get a list of people with calendar slots. Half an hour of manual analysis becomes a minute of light dialogue, with data delivered alongside the source link and a confidence score.
Philosophers, Garages, and a Billion Triples
Philosophers of the 17th century coined “ontology” while arguing over what truly exists. In the 1990s Tom Gruber told programmers: “Let’s describe that so machines can understand.” Stanford, NASA, the Cyc project trying to formalize “common sense.” In 2012 Google announced the Knowledge Graph, and off it went: Amazon built its graphs, Baidu theirs, biomedicine whole ontologies of diseases and drugs.
Last year the trend intensified: teams working with LLMs added Graph‑RAG — Retrieval Augmented Generation where context comes not from PDFs but from a verified graph. Copilot‑like helpers now cite corporate knowledge bases and robot vacuums consult apartment graphs.
Rust and Gotchas
Auto‑ontologies. LLMs can dream up classes but not always helpful ones: “cat‑dog” is cute but wrecks the vet clinic’s reports. Versioned schemas and validation rules are essential.
Ontological drift. Concepts change: today a startup is three people and a laptop, tomorrow a unicorn with a legal department. The graph must migrate, not crumble.
Speed. A billion triples is no joke. A reasoner can freeze unless taught to work incrementally and given a hot cache.
Most importantly: someone has to wield the shovel and clean data. No algorithm replaces domain expertise.
Our Road
At Partenit we’ve been tinkering with ontological memory for three years. We started with GradeBuilder — an automatic course generator and virtual tutor for students — but while mastering ontologies and learning to automate their creation, we realized our reach goes far beyond ed‑tech. We may not be pioneers of graph memory, but we’re definitely in the front row of those who can build ontologies on the fly.
Crystal Ball – Five Years Out
- Graph‑RAG becomes the norm. An assistant without a graph will feel like a car without GPS: it moves, but not necessarily toward your destination.
- IDE for ontologies leaves academia: a developer writes “class Plant,” a plugin suggests properties, checks constraints, and links to Wikidata.
- Hybrid stores merge graph, vector search, and columnar tables; the “SQL vs NoSQL” debate moves to small talk over coffee.
- Polyglot robots learn new skills from voice commands, inserting facts straight into their ontology without overnight retraining.
And yes — every serious product will have a “memory passport” describing its schema and evolution rules, as commonplace as today’s README.md.
Useful Links and Repositories
- Neo4j — property‑graph DB with Cypher: https://github.com/neo4j/neo4j
- Ontotext GraphDB — RDF triple store: https://github.com/Ontotext-AD/graphdb
- Apache Jena — framework for RDF and SPARQL: https://github.com/apache/jena
- RDF4J — Java library for working with graphs: https://github.com/eclipse/rdf4j
- HermiT Reasoner — OWL reasoning: https://github.com/owlcs/hermit-reasoner
- LangChain GraphStore — LLM & graph integration: https://github.com/langchain-ai/langchainx
- Book “Semantic Web for the Working Ontologist,” 3rd ed., 2024.
- Paper “Graph‑RAG: Bridging Symbolic and Neural Retrieval,” arXiv:2403.01234 (March 2024).
In Lieu of a Conclusion
Elephant memory often shows up as a meme, but for artificial intelligence it means a structured head rather than a stretched ear. The harder the problems we hand to machines, the more they need a world map they can rely on — and the more we need confidence that the map isn’t drawing new cities on the chatbot’s whims. Ontological memory solves exactly that problem. Which means knowledge graphs have a long and lucrative road ahead — and it has already begun.
* Elephants really do have excellent long‑term memory: they remember routes to watering holes, recognize their kin, and even people, for years. Hence the expression “elephant memory” as a metaphor for faultless recall.

