Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All

Knowledge Graph

nounRetrieval and Knowledge Systemsalso semantic network, entity graph, enterprise knowledge graph

In one line

A knowledge graph is a structured representation of real-world entities, such as people, places and concepts, and the relationships between them, stored as a network of nodes and labeled edges that machines can query and reason over.

A knowledge graph is a structured representation of real-world entities, such as people, places, organizations and concepts, and the relationships between them, stored as a network of nodes and labeled edges that machines can query and reason over. A statement such as Marie Curie was born in Warsaw becomes two nodes, Marie Curie and Warsaw, joined by an edge labeled born in. Because the facts are connected, a system can answer questions that follow links, such as which scientists born in Warsaw won a Nobel Prize. A knowledge graph is a particular kind of knowledge base and is widely used with large language models.

Core ideas

  • Entities: the things described, each with a unique identifier.
  • Relationships: typed links between entities, such as founded by, located in or treats.
  • Attributes: properties of an entity, such as a birth date or population.
  • Triples: the basic unit of a fact, written as subject, predicate and object.
  • Schema or ontology: definitions of the types of entities and relationships and the rules for using them.
  • Provenance: records of where each fact came from and when.

Data models

Two main models are used. The Resource Description Framework, or RDF, expresses facts as triples with web identifiers and is queried with the SPARQL language. Property graphs allow nodes and edges to carry attributes directly and are queried with languages such as Cypher and Gremlin. Both are stored in a graph database, and each fits some uses better than the other.

History

The idea builds on semantic networks proposed in the 1960s, on ontologies in artificial intelligence and on the semantic web vision of linked data in the early 2000s. Projects such as DBpedia, Freebase and Wikidata gathered structured facts at scale. The term knowledge graph entered wide use in 2012 when Google began presenting entity information in its search results. Large companies, including Microsoft, Amazon and LinkedIn, and many enterprises have since built their own graphs.

How knowledge graphs are built

  1. Define the scope and schema: decide which entities and relationships matter.
  2. Collect sources: databases, spreadsheets, documents, web pages and existing graphs.
  3. Extract facts: pull entities and relations from text with natural language processing and knowledge extraction methods, including language models.
  4. Resolve entities: decide when two records refer to the same thing, and merge them.
  5. Validate: check consistency against the schema and rules, and review uncertain facts.
  6. Store and index: load the graph into a graph or triple store and add indexes, see database indexing.
  7. Maintain: update facts as the world changes and track provenance.

Uses

  • Search and question answering: showing facts about entities and answering direct questions.
  • Recommendations: finding related products, people or content through connections.
  • Fraud and risk analysis: detecting suspicious networks of accounts, companies and transactions.
  • Drug discovery and biomedicine: linking genes, proteins, diseases and compounds.
  • Enterprise data integration: giving a shared meaning to data scattered across systems.
  • Compliance and supply chains: tracing ownership and dependencies.
  • AI assistants: supplying verified facts, as discussed below.

Knowledge graphs and language models

Language models are fluent but can make mistakes and cannot cite exact sources from their weights. Knowledge graphs hold explicit, checkable facts. Combining them can improve accuracy: a system can retrieve facts about the entities in a question, give them to the model and ask it to answer using only those facts. This supports grounding and helps with multi-step questions that follow links, which plain similarity search may miss. Approaches that retrieve connected subgraphs for a model are often called graph retrieval-augmented generation, an extension of retrieval-augmented generation. Language models can also help build graphs by extracting entities and relations from text, although their output needs validation.

Strengths and limitations

Knowledge graphs make relationships explicit, support precise queries and explanations and integrate varied sources. They require upfront design, costly curation and ongoing maintenance. Coverage is always incomplete, facts can be wrong or outdated and entity resolution is hard. Complex queries can be slow on very large graphs, and the rigid schema can be difficult to adapt. Bias in sources carries over to the graph.

A worked example

A pharmaceutical company builds a graph with nodes for drugs, genes, diseases and clinical trials. Edges record that a drug targets a gene, that a gene is linked to a disease and that a trial tested a drug for a condition. A researcher asks for approved drugs that target genes associated with a rare disease but have never been trialed for it. The graph query follows the links and returns a short list in seconds, a task that would take days of manual searching across spreadsheets and papers.

Querying a knowledge graph

Queries describe a pattern of nodes and edges and ask the system to find all matches. In SPARQL, a query might ask for every person who works at a named company and was born in a given country. In Cypher, the same idea is drawn as a pattern with arrows between labeled nodes. Because the engine follows links directly instead of joining large tables, queries that hop across several relationships stay readable and often quick. Many products also offer natural-language interfaces in which a language model translates a question into a graph query and then explains the result.

Reasoning and inference

A knowledge graph with a formal ontology can support reasoning. If the schema says that every capital city is a city and that a particular place is a capital, the system can infer that it is also a city without being told. Rules can derive new relationships, such as that two people who share a parent are siblings, and consistency checkers flag contradictions, such as a person who died before being born. These abilities distinguish a knowledge graph from a plain collection of links.

Quality and governance

Graph quality depends on accurate, current and complete facts. Teams measure precision by sampling facts for review, track freshness by comparing against authoritative sources and monitor coverage against a list of entities that should be present. Governance defines who may edit, how changes are approved and how disputed facts are handled. Provenance and confidence scores let users and downstream systems decide how far to trust each statement.

FAQs

Is a knowledge graph the same as a graph database? No. A graph database is a storage technology, while a knowledge graph is a body of connected knowledge that is often stored in one.

Do I need a knowledge graph for a chatbot? Not always. Document retrieval is enough for many assistants, while graphs help when relationships and exact facts matter.

How does a knowledge graph differ from a relational database? A relational database stores records in tables, while a knowledge graph stores entities and relationships as a network, which makes link-following queries natural.

Key facts

  • Google introduced its Knowledge Graph in 2012 with the slogan things, not strings, to answer queries about entities directly.1
  • Knowledge graphs are commonly built on the Resource Description Framework, a W3C standard that expresses facts as subject, predicate and object triples.2
  • Wikidata, a collaboratively edited knowledge graph launched in 2012, supplies structured data to Wikipedia and many other services.3

Related concepts

Quick checkWhat is a knowledge graph?Show answer

It is a structured network of entities and the relationships between them, stored as nodes and labeled edges, that software can query and use to reason about connected facts.

Sources

  1. Google, Introducing the Knowledge Graph: things, not strings, https://blog.google/products/search/introducing-knowledge-graph-things-not/
  2. W3C, RDF 1.1 Concepts and Abstract Syntax, https://www.w3.org/TR/rdf11-concepts/
  3. Wikimedia Foundation, Wikidata: Introduction, https://www.wikidata.org/wiki/Wikidata:Introduction

Editorially reviewed by Specialty Digest Editorial TeamLast reviewed November 17, 2026Researched and drafted with AI assistanceReport an issue