Ontology (knowledge representation)
A formal specification of the concepts in a domain and the rules governing how those concepts relate. The schema — not the data. A knowledge-graph is built on top of an ontology: the ontology defines what kinds of things exist and what relationships between them are valid; the knowledge graph populates those slots with actual entities and facts.
Ontologies and LLMs
LLMs can now draft an ontology schema from a prose description — a task that previously required specialist knowledge engineers (ontologies-knowledge-graphs-ai). More practically: feeding that schema back as a constraint on a second LLM extraction pass reduces hallucination. The ontology limits what the model can assert, turning open-ended generation into constrained extraction. Schema as guardrail.
This is the semantic-web analog of the agent-guardrails discipline: formal constraints on output structure rather than on actions.
History
Ontologies originate in philosophy (the study of what exists); in computer science they were formalized for the Semantic Web (W3C OWL, RDF Schema) as machine-readable domain models. The field predates LLMs by decades — LLMs change who can build them, not what they are.
Related
knowledge-graph · ontologies-knowledge-graphs-ai · retrieval-augmented-generation