When chunks are not enough
Plain vector RAG retrieves isolated passages, which struggles when an answer depends on relationships spread across many documents. A question like how are these two people connected needs links, not just similar text. Graph RAG builds a knowledge graph of entities and relations, then retrieves over that structure.
Building the graph
- An extraction step reads the corpus and pulls out entities such as people, places, and concepts as nodes.
- It records relations between them, like works at or located in, as edges.
- Overlapping entities across documents merge, weaving separate sources into one connected web.
Retrieving over structure
Given a question, the system finds entry node entities, then traverses edges to gather a connected neighborhood of facts. This multi hop traversal assembles evidence that no single passage contained, following a chain of relations to reach the answer.
Community summaries
Some graph RAG systems cluster the graph into communities and pre summarize each, so broad questions about themes can be answered from summaries instead of scanning every node.
Costs
Extraction is expensive and imperfect, and the graph must be rebuilt or updated as the corpus changes. In return graph RAG excels at global and relational questions where flat retrieval scatters the evidence.
Key idea
Graph RAG builds a knowledge graph of entities and relations and retrieves by traversing edges, assembling multi hop relational evidence that flat passage retrieval cannot connect.