knowledgesdk.com/glossary/ontology
Knowledge & Memoryadvanced

Also known as: domain ontology, knowledge ontology

Ontology

A formal representation of a domain's concepts, categories, and relationships used to structure knowledge bases and improve reasoning.

What Is an Ontology?

In knowledge engineering and the semantic web, an ontology is a formal, explicit specification of the concepts, categories, properties, and relationships that exist within a domain. It defines the vocabulary and rules that structure a knowledge base — the "schema" for how knowledge should be represented and what inferences are valid.

The word comes from philosophy (the study of what exists), but in computer science it has a precise technical meaning: a machine-readable model of a domain that enables structured reasoning, data interoperability, and knowledge sharing across systems.

Components of an Ontology

A well-formed ontology typically includes:

  • Classes (Concepts): Categories of things that exist in the domain — Person, Organization, Product, Event.
  • Individuals (Instances): Specific members of a class — OpenAI is an instance of Organization.
  • Properties: Attributes of classes — Organization has foundingDate, headquartersLocation, numberOfEmployees.
  • Object Properties (Relations): Relationships between classes — Person worksAt Organization, Product developedBy Organization.
  • Axioms: Logical rules and constraints — "If A acquiredBy B, then B owns A"; "A Person cannot be an Organization".
  • Hierarchy (Taxonomy): Classes organized in subclass relationships — SaaSCompany is a subclass of TechCompany which is a subclass of Organization.

Ontology Languages

The W3C has standardized two ontology languages:

  • RDFS (RDF Schema): Defines basic class hierarchies and properties. Simple but limited reasoning.
  • OWL (Web Ontology Language): Full-featured ontology language with description logic. Supports automated inference, consistency checking, and rich constraints.

OWL ontologies are used in domains requiring rigorous formal semantics: biomedical informatics (Gene Ontology, SNOMED CT), legal knowledge systems, and enterprise data integration.

Ontologies in AI Systems

Ontologies serve several roles in modern AI:

  • Knowledge graph schema: An ontology defines what types of nodes and edges are valid, ensuring the graph is consistent and queryable in predictable ways.
  • Entity disambiguation: When extracting entities from text, an ontology helps resolve ambiguity by constraining what types of entities can appear in what contexts.
  • Reasoning and inference: OWL reasoners can derive new facts from existing ones without explicit storage — if A is a subclass of B, all instances of A are automatically instances of B.
  • Cross-system interoperability: Two systems using the same ontology can exchange data without custom mapping logic.

Lightweight vs. Heavyweight Ontologies

Ontologies exist on a spectrum:

Type Description Example
Taxonomy Simple class hierarchy Product category tree
Thesaurus Synonyms and related terms WordNet
Formal ontology Full OWL with axioms and reasoning Gene Ontology
Upper ontology Abstract foundational concepts DOLCE, BFO

Most AI application developers work with lightweight ontologies — simple class hierarchies and a defined set of relationship types — rather than full OWL specifications.

Practical Consideration

Building an ontology well requires significant domain expertise and is one of the most time-consuming parts of a knowledge graph project. A common pragmatic approach is to start with an existing upper ontology or industry standard (e.g., Schema.org for general web content) and extend it with domain-specific classes rather than designing from scratch.

Related Terms

Knowledge & Memoryintermediate
Knowledge Graph
A graph-structured database that represents real-world entities as nodes and their relationships as edges, enabling structured reasoning.
Knowledge & Memoryadvanced
Triple Store
A database optimized for storing subject-predicate-object triples (RDF), the fundamental unit of knowledge in semantic web and knowledge graphs.
Knowledge & Memoryintermediate
Entity Extraction
The NLP task of identifying and classifying named entities — people, organizations, locations, concepts — in unstructured text.
Multi-Agent SystemOrchestrator Agent

Try it now

Build with Ontology using one API.

Extract, index, and search any web content. First 1,000 requests free.

GET API KEY →
← Back to glossary