AI CompendiumA public chart of the language
Retrieval & Memory

GraphRAG

also called Graph retrieval

Retrieval over an entity graph, for questions about the whole corpus.

Definition

An approach that builds a graph of entities and relationships with community summaries, so questions like "what are the themes across these documents" become answerable. It complements chunk retrieval rather than replacing it.

The gap it fills is structural: similarity search returns the few most relevant passages, which is useless when the answer requires synthesising a hundred documents. Building the graph is expensive, so it earns its place on corpora that get asked aggregate questions repeatedly.

The cost is front-loaded: extracting entities and relationships and summarising communities is an indexing job that runs over the whole corpus, and it has to be rerun as the corpus changes. That is the reason it is worth it only where aggregate questions recur.

How people use it
A researcher asks about themes rather than a fact.
"No chunk is going to answer this. This is the query shape graph retrieval exists for."
Worked example

The question chunk retrieval cannot answer

A stakeholder asks what themes emerge across two years of incident reports.

Any set of retrieved chunks is a sample and the answer will be an artefact of which ones were selected. Community summaries over the whole corpus produce an answer that is actually about the corpus rather than about your retrieval settings.

Sources
Related terms