Ontology vs taxonomy vs knowledge graph: what each one is and when you need it

A taxonomy names and groups things, an ontology defines how they relate, and a knowledge graph stores the real data in that shape. A plain comparison with examples.

By Updated 5 min read

The three terms are often used as if they meant the same thing. They are layers, each built on the one before, and knowing which layer you are missing saves a lot of wasted work.

The short version

TaxonomyOntologyKnowledge graph
What it isA hierarchy of categoriesA model of entity types, relationships and rulesReal data stored as connected entities
Question it answersWhat is this called and where does it belong?What kinds of things exist and how can they relate?What is connected to this specific thing?
ExampleFootwear › Running › Trail shoesA Supplier provides a Material; a Material is used in a ProductSupplier 118 provides recycled mesh, used in 14 products on 320 open orders
Typical formA tree or a controlled vocabularyA schema with classes, properties and constraintsNodes and edges in a graph or relational store
Who builds itDomain experts and content teamsDomain experts with a data architectData engineers, from live systems

Taxonomy: agreeing on the words

A taxonomy is a classification. It organises concepts into categories and subcategories and settles which terms are synonyms. It answers where something belongs and what it is called, and nothing more. A taxonomy cannot tell you that a supplier provides a material, because it has no notion of relationships other than “is a kind of”.

Even so, a taxonomy removes a surprising amount of confusion. When the warehouse, the finance system and the website use three names for one item, an agreed vocabulary is the first fix.

Ontology: defining how things relate

An ontology is a formal model of a domain. It defines the types of entities, their properties, the relationships allowed between them and the constraints those relationships obey. Where a taxonomy has one kind of link, an ontology has as many as the business needs: provides, contains, is certified for, replaces, was ordered by.

Designing an ontology is mostly a conversation with the people who run the business. It forces decisions that were previously left vague, such as whether a product and its colour variant are one thing or two.

Knowledge graph: the model filled with data

A knowledge graph is what you get when the ontology is populated. Each real product, customer and order becomes a node, and each real relationship becomes an edge. The ontology is the blueprint and the graph is the building.

A graph needs pipelines that load it from production systems and resolve entities, so that one real-world thing is one node. Without that it goes stale or fills with duplicates.

Which one do you need?

  • Inconsistent naming and categories across systems: start with a taxonomy.
  • AI answers that miss related facts, or questions that span several records: you need an ontology and a graph.
  • A requirement to explain how an answer was reached: a knowledge graph gives you the path.
  • Simple lookups in a small set of documents: none of these. Hybrid search is enough.

How they fit into AI systems

In retrieval-augmented generation the graph is linked to vector search. A query enters through semantic search, lands on the right entities and follows relationships outward. The model then answers from connected, sourced facts. This is ontology-grounded RAG, and it is the approach I used for the AI knowledge layer at Metis Labs.

How I work on Knowledge graphs & ontology design

Reply within 24 hours

Facing this in your own system?

The first call is free and takes 30 minutes. You leave with a scope outline and a price range, whether or not we work together.

Or build a project brief in one minute