Ontology Design
Definitions
An ontology is the formal model of a domain: entity types, attributes, and the relationships permitted between them. A knowledge graph is that model populated with instances. The model is inexpensive to define. Maintaining its accuracy as the domain changes is the central challenge.
Production maturity is low. Drift, hallucinated relationships, and the absence of generation-time rule enforcement remain unsolved at industry scale. As of late 2025, around 27% of organisations operated knowledge graphs in production (Google Cloud).
This page covers construction approaches, risks, mitigations, and the cases where an ontology is not warranted. The schema languages themselves (RDF, OWL, RDFS, Schema.org) are catalogued on Knowledge Graphs.
Construction Approaches
Three viable approaches. Each fits a distinct domain profile.
Defined upfront in a formal language such as RDF or OWL. Classes, properties and constraints are set by hand before anything is populated.
Predictable and auditable. Supports formal logical inference, because the axioms were written deliberately and can be checked.
Brittle and costly to maintain. When the domain shifts, the model does not, and the mismatch surfaces as wrong answers rather than errors.
Generated by a language model from raw data, with structure proposed at runtime rather than fixed in advance.
Flexible and scales to unstructured input. Surfaces relationships that were not anticipated.
No symbolic reasoning. Hallucinates relationships and is unreliable under inference, so conclusions can violate the constraints the schema claims to enforce.
Mapped onto an existing published standard: SKOS for taxonomies, Schema.org for common entities, OASIS for agent systems as it matures.
Externally maintained, so the modelling effort is largely pre-solved and the result interoperates with anything else using the same standard.
Constrained by the standard’s design decisions. Extending it to fit your domain reduces the portability that justified choosing it.
Risks
None of these raise an error. Retrieval and inference quality degrade while the system continues to answer.
As the ontology evolves, internal consistency erodes silently. Concepts begin to overlap, relationships duplicate each other, and terms shift meaning without anyone recording that they did.
How you find out: Inference or retrieval quality degrades. By the time it is measurable, the cause is months of small changes and there is no single commit to revert.
Language models cannot reliably apply formal axioms. Subclass inheritance, equivalence and cardinality are asserted probabilistically, not derived, so conclusions can contradict the schema that is supposed to govern them.
How you find out: A valid query returns a result that the ontology itself forbids. The graph is internally inconsistent and nothing in the pipeline noticed.
Facts are stored without qualification for when they held true. The graph accumulates relationships that were correct once and are now stale, with no marker distinguishing them from current ones.
How you find out: The system answers confidently with a fact that expired. Nothing about the assertion looked different from a live one.
When multiple sources make conflicting claims about the same entity, there is no principled basis for arbitration. Both assertions enter the graph and whichever is retrieved first wins.
How you find out: Manual curation does not scale beyond the pilot dataset.
Mitigations
| Control | What it does | Why it holds |
|---|---|---|
| Source data control | Curate and scope what is allowed to feed construction in the first place. | Entity quality is bounded by source quality. No downstream control recovers what was wrong on the way in. |
| Construction-time quality scoring | Score candidate entities and edges, and reject anything below threshold before it enters the graph. | Language models are systematically overconfident, so the threshold must be set high. Tuned deployments sit around 85%. |
| Relevance decay | Reduce the weight of facts over time rather than deleting them. | Preserves history without letting it misrepresent the current state. Deletion loses the record of what was once true. |
| Governed schema emergence | Follow a predefined structure by default. Permit new entity or relationship types only where existing ones genuinely cannot fit. | Keeps the flexibility of learned construction without the schema forking into synonyms of existing types. |
Residual Problems
Two problems survive the controls above. Each requires an architectural change rather than a tighter threshold. The extraction and validation split is the general pattern described on Neuro-Symbolic.
Relationship chains carry meaning that flattening destroys. A node reachable from another is not thereby related to it in the sense the query intended, and scoring each node and edge in isolation cannot detect the difference.
Quality scoring must evaluate whole paths rather than their components. Reject links that are reachable but semantically wrong.
Stating rules to a model does not ensure compliance. It asserts relationships probabilistically whatever the prompt says, and supplying the full graph as context to constrain it runs into window size and cost long before it runs into correctness.
Separate extraction from validation. The model extracts, and a symbolic layer decides what is admitted.
Customer-Facing Knowledge
For customer-facing knowledge, product information, policy, FAQs, ontology construction is disproportionate. These domains rarely require formal inference across entities.
The alternative is tool-based search: retrieval exposed as a tool the agent calls, reasoning over vector and graph results and reissuing refined queries based on what comes back, rather than a single fixed query as in static RAG. This is covered as a pattern on RAG Architecture.
Introduce an ontology later, only if cross-agent consistency or formal reasoning becomes a requirement.
Recommendations
Reuse an existing standard where one fits. Lock a custom static schema where the domain is stable and genuinely unique. Use governed-adaptive construction where it evolves rapidly.
Adopt an ontology only when cross-agent consistency or formal reasoning becomes a hard requirement, not in anticipation of one.
Language models extract candidates. A symbolic layer governs which assertions are allowed into the graph. These are different jobs and should not share a component.
Preserve relationship chains through scoring and reject links that are reachable but semantically wrong.
Versioning, relevance decay, drift detection, and first-class temporal and provenance metadata belong in the design from day one. Retrofitting them means reprocessing everything already ingested.
