In plain words
Most data sits in tables or plain text. A knowledge graph stores it differently: as dots for things and arrows for how they relate. "Taj Mahal" is a dot. "Agra" is a dot. An arrow between them says "is in".
Each arrow is a small fact, and facts link up into chains. Taj Mahal is in Agra, Agra is in India, so a computer can answer "Which country is the Taj Mahal in?" by following two arrows, even though nobody typed that exact sentence.
This is how a search engine knows that "Taj Mahal" can mean a monument, a musician or a restaurant, and shows a box of facts about the right one. Google launched its Knowledge Graph in 2012 under the slogan "things, not strings". It belongs to the symbolic tradition of AI: knowledge written down explicitly, rather than learned as hidden patterns.
Everyday example
The family tree at a wedding
At a big Indian wedding, an aunt explains who everyone is: "She is my cousin's daughter, married to the boy from Pune, whose father went to school with your uncle." She is walking a web of people and relationships. Draw it on paper with names as dots and "daughter of", "married to" as arrows, and you have a small knowledge graph.
Where the example breaks: The aunt fills gaps from memory and gossip. A knowledge graph only knows the links someone has stored, and a wrong or missing link gives a wrong or missing answer.
How it actually works
Researchers define a knowledge graph as a graph of data meant to capture knowledge of the real world, where nodes are things and edges are the relations between them.
Facts as triples
The basic unit is a triple: subject, relation, object, such as (Taj Mahal, located in, Agra). Millions of triples join into one big network, because the same thing appears in many facts.
Every thing gets one identity
Each node has a unique ID, so Taj Mahal the monument and Taj Mahal the musician are two different nodes with the same name. This is what lets a search engine tell them apart.
A schema says what links are allowed
A shared vocabulary, often called an ontology or schema, defines types such as Person or City and relations such as born in. It lets the system check facts and infer new ones, for example that anything in Agra is also in India.
Built from many sources
Graphs are filled from encyclopedias, databases and text, by people and by automatic extraction. Google's first version drew on Freebase, Wikipedia and the CIA World Factbook. Wikidata is a large open knowledge graph edited by volunteers.
Working with language models
Language models store knowledge as patterns in numbers, which can go wrong. Feeding them facts from a knowledge graph, a form of retrieval-augmented generation, gives them checkable facts with a clear source.
- Made popular by
- Google's Knowledge Graph, announced in May 2012
- Size at launch
- More than 500 million things and more than 3.5 billion facts and relationships
- Basic unit
- A triple: subject, relation, object
- Open example
- Wikidata, a volunteer-built knowledge graph that complements Wikipedia
Questions people ask
What is a knowledge graph in simple words?
It is a way of storing facts as things connected by labelled links: a person, a city, a company, and arrows like "born in" or "works at". Computers follow the links to answer questions and find connections.
What is the Google Knowledge Graph?
The database of things and facts Google uses to understand what you search for. It powers the fact box beside search results, for example a monument's location or a person's date of birth. Google announced it in May 2012.
What is the difference between a knowledge graph and a database?
A normal database keeps data in fixed tables. A knowledge graph puts the relationships themselves at the centre, so it is easy to add new kinds of links and to follow chains of facts across many hops.
Is a knowledge graph the same as a vector database?
No. A knowledge graph stores explicit facts and named relations. A vector database stores embeddings, lists of numbers that capture rough similarity of meaning. Some AI systems use both together.
Do chatbots use knowledge graphs?
Not inside the model itself, which learns patterns from text. But apps built around a chatbot can look up facts in a knowledge graph and pass them to the model, to make answers more accurate and traceable.
Was this clear?
1 is confusing, 5 is crystal clear. One tap, no account needed.
Spotted something wrong, or know a better example? Suggest a change