What is a knowledge graph?

A knowledge graph is a structured representation that stores entities such as people, organisations, products and contracts, along with the relations between them, as nodes and labelled edges.

It differs from a knowledge base in structure: a knowledge base is a general term for any structured or unstructured information, while a knowledge graph holds it as entities and relations. It does not replace a vector database: vector search finds textual similarity, while the graph follows chains of relations.

Topic
Embeddings, document processing and RAG
Also known as
KG, entity graph

How a knowledge graph works

  1. Entity and relation types are defined in a schema or ontology.
  2. Entities and relations are extracted from structured records and documents through entity recognition and information extraction; different names for one entity are merged.
  3. Graph query languages such as SPARQL or Cypher query multi-step relation paths and indirect links.
  4. Graph Retrieval-Augmented Generation feeds relations and community summaries from the graph to the language model as context.

In more detail

RDF triple stores versus labelled property graphs

Enterprise knowledge graphs follow one of two dominant paradigms: RDF (Resource Description Framework) triple stores excel at web-scale interoperability and formal OWL reasoning; labelled property graphs (LPG) attach key-value attributes directly to nodes and edges for high-speed path traversal. RDF stores are queried with W3C SPARQL; property graphs use Cypher or ISO/IEC 39075 (GQL), published in 2024.

Temporal edges and validity intervals

Unlike static encyclopaedic graphs, business facts change over time: a supplier contract expires or an employee changes departments. Bitemporal or temporal knowledge graphs attach valid-from and valid-to intervals to edges so historical queries remain accurate without overwriting current state.

GraphRAG indexing cost and when it is worth it

In GraphRAG, building the graph with an LLM requires extracting entities, resolving duplicates and summarising hierarchical communities, which consumes orders of magnitude more indexing tokens and compute than standard chunk-and-embed RAG. Organisations therefore reserve GraphRAG for global sensemaking and multi-hop queries where flat vector search fails.

Commonly confused terms

TermHow it differs
OntologyAn ontology defines the formal schema, classes, properties, hierarchies and logical constraints, governing a domain, whereas a knowledge graph populates that schema with concrete entity instances and facts.
Relational databaseA relational database organises records into normalised tables joined at query time via foreign keys, whereas a knowledge graph stores connections as first-class edges for fast multi-hop traversal and flexible schema evolution.

Why a knowledge graph matters for on-premises AI

It answers relation questions such as which contracts mention this supplier, or which customers this fault affects, in a clear and auditable structure; how well depends on the query type and what the graph covers. A graph is only as good as its schema, ontology and data quality; automatically extracted relations should be checked. Built in-house, relation data stays inside and permissions can be set at node and edge level.

ON-PREMISES EXAMPLE

A defence body stores relations between suppliers, contracts and components in an in-house knowledge graph and uses it to answer which contracts a component fault affects.

Common questions

Does a knowledge graph replace vector search?

No. Vector search finds textual similarity while the graph follows relation chains. Approaches such as GraphRAG use both.

How is a knowledge graph kept up to date?

Entities and relations are extracted regularly from new records and documents, merged and checked; changes are versioned and stored with their source.

Sources

In the glossary: Glossary, D to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.