An ontology is an explicit specification of the concepts in a domain, their properties, and the relationships among them, written so that both people and computers can interpret it. For example, it may define concepts such as "customer," "contract," and "plan" and relationships such as "a customer holds a contract" and "a contract has a plan." Ontologies developed in knowledge representation research and the Semantic Web and are described in standard languages such as OWL and RDF.
In AI, an ontology serves as the backbone of a knowledge graph: while the knowledge graph contains the actual entities and relationships, the ontology defines the vocabulary and relationship types used in it. By unifying the different names that separate databases use for the same thing into a single concept, it helps LLMs and agents interpret the structure and business logic of enterprise data correctly. In philosophy, ontology refers to the study of being and the nature of existence.