Knowledge Graphs

A network of interconnected concepts where items are represented as nodes and the relationships between them are represented as edges --- encoding not just data, but meaning.


What is it?

A knowledge graph is a way of organising information as a network of connected things. Each thing (a person, a place, a concept, a product) is a node. Each connection between two things (works-at, is-part-of, requires, is-located-in) is an edge. Together, the nodes and edges form a web of meaning that captures not just facts, but how those facts relate to each other.1

This is fundamentally different from a flat list or a simple table. A spreadsheet can tell you that “Marie Curie” is in the “Scientists” column and “Physics” is in the “Field” column. A knowledge graph can tell you that Marie Curie won the Nobel Prize, which is awarded by the Royal Swedish Academy, which is located in Stockholm --- and that she won it twice, in two different fields, which are both branches of natural science.2 The relationships carry as much information as the entities themselves.

Knowledge graphs sit at the intersection of databases (which store data) and ontologies (which define meaning). The parent discipline --- knowledge-engineering --- is about capturing human knowledge and making it machine-readable. A knowledge graph is one of the primary outputs of that process: the structure that makes stored knowledge navigable, queryable, and useful for reasoning.3

The concept is not new, but the term gained mainstream traction in 2012 when Google launched its Knowledge Graph to power richer search results --- the information panels you see when you search for a famous person, a city, or a film.4 Today, knowledge graphs underpin recommendation engines, virtual assistants, fraud detection systems, and increasingly, the grounding layer that makes large language models more reliable.

In plain terms

A knowledge graph is like a corkboard covered in index cards with strings connecting them. Each card is a thing. Each string is a relationship. Unlike a filing cabinet (where things sit in isolated folders), the corkboard lets you follow connections: pull one string and see everything related to it.


At a glance


How does it work?

A knowledge graph has four essential components. Understanding each one explains why the structure captures meaning that simpler formats cannot.

1. Nodes (entities)

Every distinct thing in the graph is a node: a person, a city, a concept, a document, an event. Nodes carry properties --- a person node might have a name, a birth date, and a nationality. The node is the “what.”1

Think of it like...

A node is a Wikipedia article. It describes one thing in detail. On its own, it is useful but isolated.

Concept to explore

See nodes-and-edges for a deeper dive into how nodes and edges work as data structures, including directed vs undirected graphs and weighted edges.

2. Edges (relationships)

An edge connects two nodes and describes how they are related. The edge is the “how” --- it carries a label that gives the connection meaning. “Marie Curie” —[won] “Nobel Prize” is very different from “Marie Curie” —[rejected] “Nobel Prize”, even though the same two nodes are involved.2

Edges can be directed (one-way: A teaches B does not mean B teaches A) or undirected (two-way: A is a colleague of B implies B is a colleague of A). Most knowledge graphs use directed, labelled edges because direction and labels carry semantic meaning.1

Think of it like...

An edge is a hyperlink in a Wikipedia article. It connects one article to another and tells you why you might want to follow it (“born in”, “discovered by”, “capital of”). The links are what turn isolated articles into a navigable web.

3. Schema (the rules)

A schema (sometimes called an ontology) defines what types of nodes and edges are allowed in the graph. It is the blueprint: “A Person can have a birthDate. A Person can [won] an Award. An Award belongs to a Field.”3

Without a schema, a knowledge graph is a free-for-all --- anyone can connect anything to anything with any label. With a schema, the graph becomes consistent and queryable. You can ask “show me all Persons who won an Award in the Field of Physics” because the schema guarantees those types and relationships exist.

4. Triples (the statements)

The atomic unit of a knowledge graph is the triple: subject — predicate object. For example: Marie Curiewon Nobel Prize in Physics. Every fact in the graph is stored as a triple, and the entire graph is a collection of these small, composable statements.2

Triples are powerful because they are additive. You never have to redesign a table or add a column. To add a new fact, you simply add a new triple. This makes knowledge graphs flexible and extensible in ways that relational databases are not.

Think of it like...

A triple is a sentence with a subject, verb, and object. “Paris [is the capital of] France.” “France [is in] Europe.” “Europe [contains] 44 countries.” Each sentence is simple, but together they build a rich description of the world.


Why do we use it?

Key reasons

1. Capturing relationships, not just data. A database stores facts in isolated rows and columns. A knowledge graph stores facts and the connections between them. This makes it possible to answer questions that require traversing multiple relationships --- questions a flat table cannot answer without complex joins.1

2. Flexible and extensible. Adding new types of entities or relationships does not require restructuring the entire system. You add new triples. This makes knowledge graphs ideal for domains where the data model evolves over time.3

3. Powering intelligent search and discovery. When Google shows you a panel about a person alongside their birthplace, achievements, and related people, that is a knowledge graph at work. It connects entities so that a search engine can answer “who”, “what”, and “how are these related” --- not just match keywords.4

4. Grounding AI systems. Large language models generate fluent text but can hallucinate. Connecting an LLM to a knowledge graph gives it a structured, verifiable source of truth to reason over, reducing errors and improving trustworthiness.5


When do we use it?

  • When your data has rich, many-to-many relationships that a simple table cannot capture cleanly
  • When you need to discover connections between entities that were not explicitly queried (e.g., fraud detection, recommendation engines)
  • When building a search or Q&A system that needs to answer relational questions, not just keyword matches
  • When integrating data from multiple sources with different schemas into a unified view
  • When creating a learning or documentation system where concepts depend on and relate to each other

Rule of thumb

If you find yourself needing lots of JOIN operations in a relational database to answer a single question, or if the question is “how is X connected to Y?”, a knowledge graph is likely the better structure.


How can I think about it?

The city map

A knowledge graph is like a detailed city map.

  • Each building (museum, restaurant, school) is a node
  • Each road or path between buildings is an edge
  • The type of road (highway, footpath, one-way street) is the edge label
  • The map legend is the schema --- it defines what symbols mean
  • A flat list of addresses is like a phone book: you can look up one building, but you cannot see how to get from one to another
  • A tree (like a postal hierarchy: country > city > district > street) tells you where a building sits in a hierarchy, but not which buildings are connected by roads
  • The map shows all of it: location, hierarchy, and connections

The detective's evidence board

A knowledge graph is like a detective’s evidence board in a crime drama.

  • Each photo, document, or name pinned to the board is a node
  • Each piece of string connecting two items is an edge
  • The colour or label on the string tells you the relationship: “called on March 5th”, “employed by”, “lives at”
  • The detective does not just have a list of suspects --- they have a web of connections that reveals patterns invisible in a simple list
  • Adding new evidence is easy: pin a new item and connect it with strings
  • The board lets you follow connections: start at one person and trace paths to see who they know, where they went, and what links them to the crime

Concepts to explore next

ConceptWhat it coversStatus
nodes-and-edgesThe two building blocks of any graph: things and their connectionscomplete
taxonomiesHierarchical classification systems --- a specific type of graph structurestub
topological-sortOrdering nodes so that dependencies come before dependentsstub

Some cards don't exist yet

A broken link is a placeholder for future learning, not an error.


Check your understanding


Where this concept fits

Position in the knowledge graph

graph TD
    KE[Knowledge Engineering] --> KG[Knowledge Graphs]
    KE --> MRF[Machine-Readable Formats]
    KG --> NE[Nodes and Edges]
    KG --> TAX[Taxonomies]
    KG --> TS[Topological Sort]
    style KG fill:#4a9ede,color:#fff

Related concepts:

  • databases --- knowledge graphs are a specialised form of database optimised for relationships rather than rows and columns
  • machine-readable-formats --- the standards (JSON-LD, RDF, OWL) used to store and exchange knowledge graph data
  • apis --- the interfaces through which applications query and update knowledge graphs

Sources


Further reading

Resources

Footnotes

  1. Happy, S L. (2025). What Are Knowledge Graphs? A Comprehensive Guide to Connected Data. ML Digest. 2 3 4

  2. Ontotext. (n.d.). What Is a Knowledge Graph?. Ontotext Fundamentals. 2 3

  3. Knowledge Systems Authority. (2026). Knowledge Graphs: Structure, Use Cases, and Benefits. Knowledge Systems Authority. 2 3

  4. Chia, A. (2025). Knowledge Graphs: What They Are and Why They Matter. Splunk. 2

  5. Knight, M. (2025). What Is a Knowledge Graph?. Dataversity.