Knowledge graphs explained: from knowledge management to AI

What knowledge graphs are, how they relate to knowledge management and ontologies, how to build one, and why they matter again in the age of large language models.

4 min read. Published

A knowledge graph represents knowledge as a network. The nodes are entities, such as people, organisations, places, products and concepts. The edges are typed relationships between them: works for, located in, cites, is a type of. Because the relationships are explicit and machine-readable, computers can answer questions, find connections and reason over the data in ways that are hard with documents or ordinary tables.

Google popularised the term in 2012 when it announced that search would understand “things, not strings”. The ideas are older, though. They grew out of decades of work on knowledge management, semantic networks and the Semantic Web.

From knowledge management to knowledge graphs

Knowledge management (KM) asks how organisations create, share and use what they know. A classic framework is Ikujiro Nonaka and Hirotaka Takeuchi’s SECI model. It describes knowledge moving between tacit forms (skills and experience in people’s heads) and explicit forms (documents, procedures, databases) through four processes: socialisation, externalisation, combination and internalisation.

Early KM projects often failed because they focused on document repositories that nobody maintained. Knowledge graphs address one part of the problem, the combination of explicit knowledge, by linking facts from many sources into a single structure. They do not solve the human part. People still need reasons and time to share what they know.

Building blocks

  • Entities with unique identifiers, so that “Apple” the company and “apple” the fruit are different nodes.
  • Relationships with defined types and directions.
  • Attributes such as dates, amounts and names in several languages.
  • An ontology or schema, which defines the types of entities and the relationships allowed between them. Schema.org is a lightweight example that websites use to describe their content to search engines. Domain ontologies in medicine, law and finance are much richer.
  • Provenance: where each fact came from and when. Without it, a graph cannot be trusted or maintained.

Two technical approaches dominate. RDF (the W3C standard) represents everything as subject–predicate–object triples with web identifiers and is queried with SPARQL. Labelled property graphs (used by Neo4j and similar databases) attach properties to both nodes and edges and are popular in industry. Wikidata, the open knowledge base behind Wikipedia, is the largest public example. It holds over a hundred million items, editable by anyone.

How to build a knowledge graph

  1. Start from questions. What should the graph answer? “Which of our suppliers share owners with sanctioned companies?” defines the entities and relationships you need.
  2. Design a minimal schema. Reuse existing vocabularies (schema.org, Wikidata properties, domain standards) where possible.
  3. Extract entities and relationships from structured sources (databases, registries) and unstructured ones (documents, news). Named-entity recognition and relation extraction, now often done with language models, do much of the work.
  4. Resolve entities. Decide when two records refer to the same thing, such as name variants, transliterations or subsidiaries. This is usually the hardest step and the one that most affects quality.
  5. Record provenance and confidence for every fact.
  6. Validate and maintain. Use constraints (for example, a person cannot be born after they died), human review of samples, and a plan for keeping the graph up to date.

What knowledge graphs are used for

  • Search and recommendation: search engines, e-commerce and media platforms use graphs to understand queries and connect related items.
  • Intelligence and investigations: linking people, companies, addresses and transactions to reveal hidden ownership, fraud networks or sanctions evasion.
  • Research: mapping concepts, genes, drugs and diseases, or linking papers, authors, funders and patents.
  • Digital humanities and heritage: connecting historical people, places, events and sources, including maritime, legal and archival evidence.
  • Enterprise knowledge: linking products, customers, documents and experts so that employees can find who knows what.

Knowledge graphs and large language models

Large language models (LLMs) seemed at first to make knowledge graphs obsolete. Why build a structured graph when a model can answer questions in natural language? In practice the two complement each other:

  • LLMs help build graphs. They extract entities and relationships from text far more cheaply than earlier methods, although their output needs validation.
  • Graphs ground LLMs. Models can invent facts. Retrieving facts from a curated graph and asking the model to answer from them improves accuracy and makes answers traceable. Approaches such as Microsoft’s GraphRAG use graphs built from document collections to answer broad questions that simple document retrieval handles poorly.
  • Graphs make content legible to machines. Websites that describe their entities with structured data (schema.org) are easier for search engines and AI assistants to understand and cite.

Knowledge graphs offer explicit structure, provenance and consistency. Language models offer flexibility and natural language. Organisations that combine them get systems that are both fluent and accountable.

Sources

  1. Hogan et al.: Knowledge Graphs (ACM Computing Surveys, 2021; arXiv preprint)
  2. Google: Introducing the Knowledge Graph: things, not strings (2012)
  3. W3C: RDF 1.1 Primer
  4. Wikidata
  5. Edge et al.: From Local to Global: A Graph RAG Approach to Query-Focused Summarization (Microsoft Research, 2024)
  6. Schema.org

More in this topic