Spokes.wiki Search About
Defined Term mechanism updated Mon Jun 29 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

GraphRAG

A graph-based RAG method: instead of retrieving loose text chunks by vector similarity, it first builds a knowledge-graph from the corpus (LLM entity/relation extraction), detects communities in that graph, and summarizes each community — then answers a query by reasoning over those summaries. Introduced by Microsoft Research in [[from-local-to-global-graphrag|From Local to Global]] (Edge et al., 2024) — now the wiki’s canonical primary source for the method — and also seen here via the Rust implementation graphrag-rs.

What it adds over plain RAG

Ordinary vector RAG is good at local questions (facts findable in a few nearby chunks) but fails at global / corpus-sensemaking ones — “what are the main themes across the whole collection?” — because no single chunk contains the answer and top-k retrieval never sees the whole. GraphRAG’s fix:

  • Extract a knowledge graph over the entire corpus.
  • Cluster it into communities with the Leiden algorithm, chosen because it recovers a hierarchy of communities — levels C0 (root, coarse) → C3 (leaf, fine) (graphrag-rs additionally ranks with PageRank).
  • Summarize each community into a short report, at every level.
  • Answer globally by map-reducing over the community summaries — each yields a partial answer with a helpfulness score (0–100), then the top-scored are packed and synthesized; answer locally by traversing entities and their neighborhoods.

The level you summarize at is a cost/quality knob: the original paper finds the coarse C0 root level delivers most of the global-sensemaking quality at 9×–43× fewer tokens per query than summarizing the source text directly (see from-local-to-global-graphrag).

So it closes a gap distinct from the others the retrieval-augmented-generation page tracks: not exact-token (BM25), not temporal-validity (a temporal-knowledge-graph), but whole-corpus synthesis. It builds on the typed knowledge-graph substrate — the graph is the input; GraphRAG is the retrieval method layered over it.

The multi-level-summary idea isn’t unique to graphs: RAPTOR (Stanford, ICLR 2024) reached it a few months earlier with a recursive summary tree of text chunks — no entities, no communities — so GraphRAG’s community summaries have a non-graph cousin that targets the same global, whole-document questions.

Where it sits in the wiki’s KG tooling

sift-kg and gbrain build knowledge graphs; GraphRAG is what you do with one to answer global queries. graphrag-rs is the first source here to implement the full loop (extract → community detection → graph retrieval → synthesis) as one tool.

A named critique — semantic islands (leanrag)

LeanRAG (AAAI 2026) accepts GraphRAG’s premise but diagnoses two weaknesses in the community-summary design: semantic islands — the summary nodes summarize their own communities but carry no explicit relations between summaries, so cross-community reasoning has no path — and structure-unaware retrieval — searching the summaries by flat similarity ignores the graph topology and pulls redundant evidence. Its fix is to wire the summary layer into a navigable network (explicit relations among aggregated summaries) and retrieve bottom-up along that structure (anchor at entities, traverse upward), reporting ~46% less retrieval redundancy and an average 78.1% win rate over GraphRAG on its own benchmarks. So GraphRAG remains the substrate idea; LeanRAG is a refinement of how the summaries connect and how retrieval walks them.

When it actually helps — the neutral verdict (graphrag-bench)

The method papers all evaluate their own systems. The first third-party benchmark, graphrag-bench (“When to use Graphs in RAG”, ICLR 2026, proposing no method of its own), finds the honest answer is task-dependent: GraphRAG underperforms plain vector RAG on simple fact retrieval (~49–60% vs ~61–65% — the graph adds “logically relevant but redundant” context), and wins on multi-hop reasoning and summarization (e.g. HippoRAG2 ~54% vs RAG ~43% on complex reasoning). It also costs 1–2 orders of magnitude more tokens per query — Microsoft GraphRAG’s global mode up to ~4×10⁴ vs vanilla RAG’s ~900. So GraphRAG is a tool for genuinely global / multi-hop questions, not a blanket upgrade. This contradicts the broad “graphs beat vector RAG” framing of gbrain and the method papers — see synthesis.

The step before all of this (added 2026-08-03)

Everything above starts once the knowledge-graph exists — cluster it, summarize it, traverse it. memgraphrag argues the graph itself is where the losses come from, and supplies the mechanism: LLM extraction runs over chunks independently with no global state, so the merged graph is thematically noisy, internally contradictory and structurally fragmented (graph-construction-quality). Its sharpest number is that discarding 40% of low-frequency triples slightly improves accuracy — most of what the extractor emits is not load-bearing.

That reframes the recall-versus-relevance trade graphrag-bench measured. Graphs raise recall and depress context relevance not because retrieval over a graph is inherently noisy, but plausibly because the graph being retrieved over is. Plausibly, because one paper by one group is the whole of the evidence, and its own transplant experiment moves other frameworks by under a point.

Sourcing — gap closed

Originally grounded only via an implementation (graphrag-rs, T3), then a peer-reviewed competitor (leanrag, T2). The gap is now closed: from-local-to-global-graphrag (Edge et al., Microsoft, T1) is the method’s defining primary source, with its own local-vs-global evaluation (comprehensiveness win rates 72–83% over naive RAG) and the C0 token-cost finding above. One honest caveat carries across all three: the comparative results are LLM-judged on each paper’s own setup, so the method descriptions are solid but the win-rate margins are motivated.

from-local-to-global-graphrag · graphrag-bench · graphrag-rs · leanrag · leiden-algorithm · retrieval-augmented-generation · knowledge-graph · sift-kg · gbrain · temporal-knowledge-graph · hybrid-retrieval-rag · memgraphrag · graph-construction-quality