Ontology
An ontology is an orderly description of what things exist in a subject area and how they relate to one another. Computers use it to store terms not merely as words, but in a way that lets them grasp their meaning.
People know without thinking that a dachshund is a dog and a dog is an animal. A computer does not know that. To it, these are three different strings of characters with no connection. An ontology writes down exactly such connections explicitly, in a form that a machine can process. It defines what kinds of things exist in a domain, what properties they have, and what relationships hold between them. The term originally comes from philosophy, where it denotes the study of being. In computer science it means something more concrete: an orderly directory of terms and rules for a particular field.
When machines need meaning
Data alone is often ambiguous. In a hospital database, the same active ingredient might appear under three different brand names. A program that only compares letters will treat these entries as three different medications. An ontology links the names to a shared underlying concept. Only then can datasets from different sources be meaningfully merged.
A second advantage is automatic reasoning. If the ontology states that every dachshund is a dog, and that dogs are mammals, then software can derive on its own that dachshunds are mammals. This statement need not be stored anywhere. Such derivations are called reasoning. They are the reason ontologies are more than a sorted word list.
Traceability is also an important aspect. With a language model, it is hard to say why it gives a particular answer. With an ontology, every step of the derivation can be traced back. In fields such as medicine, law, or financial supervision, that is a strong argument in its favor.
Classes, relationships, and rules
An ontology consists of a few basic building blocks. Classes are categories such as “person,” “company,” or “medication.” Instances are concrete individual cases, for example a specific company. Relationships link the two together, for example “works at” or “is part of.” In addition, there are rules that define what is allowed and what is not.
Such rules can accomplish a surprising amount. One can specify that every person has exactly one date of birth. Or that the relationship “is a parent of” may never hold in both directions at once. If a dataset violates this, the software flags a contradiction. This makes errors visible that would otherwise go unnoticed.
Ontologies are written in dedicated languages. RDF and OWL are widely used, two standards from the W3C, the World Wide Web Consortium. They look rather unwieldy to humans but are unambiguously machine-readable. Related but not identical is the knowledge graph: it is the concrete collection of facts, while the ontology provides the blueprint for it. A common mistake is to treat the two as the same thing.
From the search engine to the factory floor
Anyone who searches Google for an actress sees a box on the right with her date of birth, films, and family. Behind this lies a knowledge graph whose structure is defined by an ontology. Voice assistants also draw on such structures when answering factual questions.
In industry, ontologies organize components, machines, and production steps. In medicine, the SNOMED CT system organizes several hundred thousand clinical terms. In biology, the Gene Ontology describes gene functions uniformly across laboratories and countries. Without such shared vocabularies, research data would hardly be comparable.
Ontologies currently appear frequently in news about language models. Companies combine the two: the model formulates the answer, the ontology supplies verified facts to go with it. This is meant to reduce freely invented answers. The price for this is effort, since a good ontology must be maintained by experts or it quickly becomes outdated.