Knowledge graphs: connecting the facts
A knowledge graph stores facts as connections — people, places and ideas become dots, and the links between them become labelled lines. That structure lets AI connect the dots across several facts at once, and it is what GraphRAG uses to ground answers. Explore the graph, walk a multi-hop question, and see where GraphRAG beats plain vector search — right here on the page.
01What a knowledge graph is
The AI Governance Charter — establish ownership, scope, and accountability for AI.
Get the charter Browse all templatesYour purchase helps keep our hubs free to read.
Picture a whiteboard covered in sticky notes, with lines drawn between the ones that are related. Each note is a thing — a person, a place, an idea — and each line is a relationship between two of them. That is, almost exactly, a knowledge graph. The things are called nodes (or entities), and the labelled lines between them are called edges (or relationships). A single fact is just one connection: Marie Curie —discovered→ Radium. Store thousands of those connections together and you get a graph that does not just hold facts — it holds how the facts relate to each other.
- Nodes are the entities — the things, like people, places, or concepts.
- Edges are the relationships — labelled, directed lines that connect two nodes.
- A fact is one edge between two nodes; a knowledge graph is a big web of them.
02Explore the graph — and connect the dots
Here is a small, fixed knowledge graph built from well-known facts. Click any entity to highlight everything it is directly connected to, and read off the facts as triples. Then press Answer a multi-hop question to watch the system walk the edges — chaining several facts to reach an answer that no single fact states on its own. That edge-walking is exactly what a plain similarity search would miss.
Click an entity
Each circle is a node (an entity); each line is an edge (a relationship). Click a node to see its facts written out as triples — subject, predicate, object.
✕ Plain vector search
Finds passages that look similar to the question. If the answer spans several separate facts, no single passage states it — so the link gets missed.
✓ Walking the graph
Follows labelled edges from one entity to the next, chaining facts together — so a multi-hop answer that no single passage contains can still be reached.
03Triples: the unit of a fact
Every edge you clicked above is really a triple — three parts that together state one fact: a subject, a predicate, and an object. The subject and object are entities (nodes); the predicate is the relationship (the edge label). Marie Curie (subject) —discovered→ (predicate) Radium (object). A whole knowledge graph is, at heart, a giant pile of triples — and that simple, repeated shape is what makes graphs easy to build from many sources and easy to walk when answering a question.
Subject, predicate, object
One fact, three parts. The subject and object are entities (nodes); the predicate is the relationship (the edge). Reverse the direction and the predicate usually changes too — relationships have a direction.
How a graph gets built
You extract entities and the relationships between them from your sources — from structured data, or increasingly from plain text using language models — then store each as nodes and edges, usually in a graph database (a database that keeps relationships natively, not as rows in tables).
How a graph gets queried
Instead of matching keywords or vector similarity, you traverse — start at an entity and follow its edges to connected entities, hop by hop. Because relationships are stored natively, following a chain of connections is fast and does not need expensive table joins.
04GraphRAG vs plain vector RAG
Ordinary RAG retrieves the text chunks most similar to your question from a vector store, then hands them to the model. GraphRAG swaps (or supplements) that step: it retrieves from a knowledge graph — following relationships and using graph structure — instead of, or alongside, the vector store. That makes it stronger for multi-hop questions (chaining facts) and global / summary questions about a whole corpus, at the cost of building and maintaining the graph. They are not rivals: many systems combine both.
Vector RAG — retrieve by similarity
Finds the chunks whose meaning is closest to the question and feeds them in. Simple to build and maintain, and strong for "what does this passage say?" fact-lookup. The catch: each chunk is retrieved in isolation, so links that span several documents can slip through.
GraphRAG — retrieve by structure
Retrieves connected entities and relationships by traversing a knowledge graph built from the corpus, so it can follow a chain of facts and summarize across everything. The trade-off is a higher build cost: you must extract and maintain the graph.
Which to use
Reach for vector RAG when answers live in a single passage and you want the simplest, cheapest setup. Reach for GraphRAG when questions require connecting facts across documents, or summarizing a whole corpus. Many real systems do both — graph traversal plus vector similarity (hybrid retrieval).
05Check your understanding
06Take it with you & go deeper
RAG — Retrieval-Augmented Generation
The retrieve-then-generate pipeline GraphRAG builds on — with the vector-store version explained end to end.
Open →Knowledge graph — AI Glossary
The concise definition, plus related terms, in the AI Glossary.
Open →Graph databases (deep dive)
Nodes, relationships and properties up close — how traversal works and why it beats joins for connected data.
Coming soonEmbeddings & vector search
The similarity-retrieval engine behind vector RAG — and how it pairs with graph traversal in hybrid systems.
Coming soon→Continue learning
⊕Concept map
The shape of this lesson at a glance — expand any branch to revisit how knowledge graphs, triples, and GraphRAG connect.
What a knowledge graph is
- Nodes are the entities — the things, like people, places, or concepts.
- Edges are the relationships — labelled, directed lines that connect two nodes.
- A single fact is one edge between two nodes; a knowledge graph is a big web of them.
Explore the graph — and connect the dots
- Click an entity to highlight everything it is directly connected to, then read the facts off as triples.
- A multi-hop question walks the edges — chaining several facts to reach an answer no single fact states.
- Plain similarity search finds passages that look alike but can miss links that span several facts.
Triples: the unit of a fact
- A triple is three parts — subject, predicate, object — that together state one fact.
- Subject and object are entities (nodes); the predicate is the relationship (the edge label), and it has a direction.
- Graphs are built by extracting entities and relationships into a graph database, then queried by traversing edges hop by hop.
GraphRAG vs plain vector RAG
- Vector RAG retrieves chunks by similarity — simple and cheap, strong for single-passage fact lookup.
- GraphRAG retrieves by traversing a knowledge graph — stronger for multi-hop and whole-corpus summary questions, at a higher build cost.
- They are not rivals: many systems combine graph traversal with vector similarity (hybrid retrieval).
→Related lessons
- → AI Alignment & RLHF Explained (2026 Guide)
- → What Are AI Coding Assistants? A 2026 Guide
- → AI Red Teaming Explained: A 2026 Guide
- → AI Regulation & Compliance Explained (2026)
- → AI Chatbots Explained: How They Work (2026)
- → Convolutional Neural Networks (CNNs) Explained 2026
- → RAG
- → Vector Databases Explained: A 2026 Guide
Published by Tech Jacks Solutions · Reviewed June 2026. This lesson explains established concepts and is grounded in the references below; figures shown in the interactives are illustrative and labelled as such.
- What is a graph database? — Neo4j
- Knowledge Graphs (survey) — Hogan et al. (2020)
- From Local to Global: A Graph RAG Approach to Query-Focused Summarization — Edge et al., Microsoft (2024)
- GraphRAG — Microsoft
Knowledge graphs & GraphRAG — in 5 minutes
Tech Jacks Solutions · AI Knowledge Hub · educational summary
What a knowledge graph is
A way of storing facts as connections. Entities (people, places, ideas) are nodes; the relationships between them are labelled, directed edges. One fact is one connection, e.g. "Marie Curie —discovered→ Radium".
Triples
Each fact is a triple: subject – predicate – object. The subject and object are entities (nodes); the predicate is the relationship (edge). A whole knowledge graph is a large collection of triples.
Why graphs: multi-hop reasoning
Plain text and vector similarity find passages that look alike but do not encode that A connects to B connects to C. Walking edges lets a system "connect the dots" across several hops to answer questions no single passage states.
Built & queried
Built by extracting entities and relationships from sources (structured data or text) and storing them as nodes and edges, usually in a graph database. Queried by traversing — following relationships from one entity to the next.
GraphRAG vs vector RAG
GraphRAG is retrieval-augmented generation that retrieves from a knowledge graph (and/or graph-structured chunks) instead of, or alongside, a vector store — better for multi-hop and global/summary questions, at a higher build and maintenance cost. Vector RAG is simpler and strong for single-passage lookups. Many systems combine both (hybrid retrieval).