Schema eines Wissensgraphen: beschriftete Kreise für Marie Curie, Warschau, Polen und Nobelpreis, verbunden durch benannte Pfeile wie \"geboren in\", \"liegt in\" und \"erhielt\".

Knowledge Graph

A knowledge graph is a collection of facts stored as a network of things and their relationships. Search engines, voice assistants, and enterprise databases use it to look up connections rather than just matching individual keywords.

A knowledge graph stores knowledge as a network. The nodes in this network are things: people, places, companies, movies, diseases. The connecting lines between the nodes are relationships. A single entry might read: Marie Curie – was born in – Warsaw. Such triples, made up of two things and one relationship, are the basic building block. Put together, millions of them form a map of knowledge that you can traverse from point to point.

What a network of facts has over a table

Classic databases are usually tables. Every table has fixed columns, and everything must fit into this grid. That works well for things that can always be described the same way, such as account balances. For knowledge about the world, this grid quickly falls apart. A person has a place of birth, a movie has a runtime, a medication has side effects – the columns would be different for every case.

A graph doesn’t have this problem. You can add a new type of relationship at any time without restructuring the existing data. That’s exactly why knowledge graphs have an advantage with highly diverse knowledge. They grow along with the data instead of constantly needing to be restructured.

The second advantage is multi-step questions. “Which movies were made by directors born in the same city as me?” can be answered in a network by following the connections. In separate tables, this would be a laborious calculation. There’s another point that matters for language models: a graph delivers verifiable facts with a source, while a language model generates answers from probabilities and can make things up in the process.

How the facts get into the graph

At the beginning stands a blueprint, known in technical jargon as an ontology. It defines which types of things exist and which relationships are allowed. A person can have an employer, a city cannot. This blueprint prevents the graph from turning into an unsorted heap.

Then the facts are collected. Some come from structured sources like Wikipedia infoboxes or official registers. Another portion is automatically extracted from running text. Programs search the text for names and match them to the correct entries. This is tricky: “Paris” can be the city or a first name. This step is called entity linking, and errors here contaminate the entire graph.

A knowledge graph is queried with its own query language, such as SPARQL or Cypher. This lets you describe a pattern in the network that you’re searching for. Some systems also derive new facts: if Berlin is located in Germany, and Germany is located in Europe, then Berlin is located in Europe. Nobody has to enter such inferences by hand.

From the Google infobox to drug research

The best known example is the Google Knowledge Graph. It fills the box to the right of search results with birth dates, movies, or company headquarters. Google introduced it in 2012, and today it comprises many billions of facts. Voice assistants also draw on it when answering questions like “How old is the Eiffel Tower?”

In companies, knowledge graphs connect data that would otherwise sit in separate systems. Customers, contracts, suppliers, and products then hang together in one network. Banks use this to detect suspicious flows of money between seemingly unrelated companies. In pharmaceutical research, graphs link genes, active substances, and diseases to find candidates for new medications.

In current AI news, the term usually appears alongside language models. The idea: the model looks up facts in the graph before answering and bases its response on verified facts. This approach is meant to reduce made-up answers. The price is maintenance effort, because a knowledge graph goes out of date as soon as the world changes.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.