Paper commentary
From Local to Global: A Graph RAG Approach to Query-Focused Summarization
Graph RAG builds community summaries to answer corpus-wide questions
- Problem Standard RAG retrieves a few passages, so it fails on questions about a whole corpus, such as its main themes. Earlier query-focused summarization methods could not scale to the text volume RAG indexes.
- Method GraphRAG has an LLM build an entity knowledge graph and split it into nested communities. It writes a summary for each community, then answers a question by summarizing partial answers from those summaries.
- Results On podcasts, GraphRAG won 72% to 83% of comprehensiveness comparisons against vector RAG.
Why vector RAG stops short of corpus-wide questions
Vector RAG retrieves a fixed number of records whose embeddings sit closest to the query and then answers from those records alone. That design works when the answer is localized in a few passages, because the retrieved records can hold the answer. A question about the main themes of a whole collection has no small set of records that contains its answer, so retrieval has nothing sensible to return.
The authors frame such questions as query-focused summarization, where the output is a summary shaped by the query rather than a lookup of facts. Earlier query-focused summarization methods could not handle the volume of text that typical RAG systems index, which leaves a gap between the two families. GraphRAG is aimed at that gap: it is meant to answer questions over private corpora at the scale RAG handles while keeping the generality needed for corpus-wide questions.
Building the graph index
The corpus is first split into text chunks, and chunk size is a design choice: longer chunks mean fewer extraction calls but weaker recall of material near the start of a chunk. For each chunk, the LLM extracts entities, relationships and claims, and writes a short description for each entity and relationship. Prompts can be adapted to a domain through few-shot exemplars, so specialized fields can get entity types suited to them.
Each extracted instance becomes a node or an edge in the knowledge graph, and repeated extractions are merged by exact string matching of names. The number of duplicate extractions of a relationship becomes that edge's weight, and entity descriptions are summarized per node. Duplicate entities that slip past exact matching are tolerated because they tend to cluster together during the later summarization steps.
Leiden community detection is then applied recursively, so each community is split into sub-communities until no further partition is possible. Each level of this hierarchy partitions the nodes exclusively and exhaustively, which gives a divide-and-conquer structure for summarization.
From communities to summaries
For a leaf community, element summaries are added in order of prominence, where the prominence of an edge is the combined degree of its two endpoint nodes, until the token limit is reached.
For a higher-level community, all element summaries are used when they fit within the token limit; otherwise sub-community summaries replace element summaries, starting with the sub-communities that have the most element summary tokens. Because lower-level summaries are shorter, this substitution lets each higher-level summary incorporate the detail below it while staying inside the context window.
Answering a global query in two stages
At query time the community summaries of a chosen level are shuffled and split into chunks of a fixed token size, so relevant material is spread across chunks instead of landing in one window. In the map step, the LLM writes a partial answer from each chunk in parallel and also gives it a helpfulness score from 0 to 100, and answers scored 0 are dropped.
The LLM then writes the global answer from that packed context, so the choice of community level sets the level of detail that the reduce step sees.
Generating questions and judging answers
Test questions are generated by prompting an LLM to describe personas of potential users, then tasks for each persona, then questions for each task that need the whole corpus and no specific fact. With K, N and M each set to 5, the procedure yields 125 questions per dataset. Table 1 shows how this framing works for podcast transcripts and news articles.
Because no gold answers exist, each pair of answers is compared head-to-head by an LLM judge on a given criterion, and the judge either picks a winner or returns a tie. Comprehensiveness and diversity are the main criteria, and empowerment is also scored. Directness is included as a control, since it is expected to pull against comprehensiveness and diversity, so no method is expected to win on all four criteria.
Each comparison is repeated with several replicates, and the results are averaged across replicates and questions to offset the randomness of generation.
Datasets and compared conditions
The podcast transcripts of Behind the Tech with Kevin Scott form one corpus, divided into 1669 chunks of 600 tokens with 100-token overlaps, about 1 million tokens in total. The news articles benchmark, covering September 2013 to December 2023, is divided into 3197 chunks of 600 tokens with 100-token overlaps, about 1.7 million tokens in total.
Six conditions are compared: four GraphRAG levels (C0, C1, C2 and C3), text summarization (TS) that runs map-reduce directly over the chunks, and semantic search (SS), a vector RAG condition. C0 uses root-level summaries, the fewest in number, and each lower level adds finer communities, so C3 uses the most summaries. All six conditions share the same context window size and answer prompts, so they differ only in what fills the window.
The context window is 8k tokens for community summaries, community answers and global answers, and indexing the Podcast dataset with a 600-token window took 281 minutes.
Head-to-head results against vector RAG
On the Podcast transcripts, the global approaches won comprehensiveness comparisons against SS 72% to 83% of the time, with p<.001. Diversity win rates on the same dataset ranged from 75% to 82%, with p<.001.
On the news articles, comprehensiveness win rates against SS ranged from 72% to 80%, with p<.001, and diversity win rates from 62% to 71%, with p<.01. Directness favored vector RAG across these comparisons, which the authors read as the expected trade-off with comprehensiveness and diversity.
Empowerment results were mixed, both for the global approaches against SS and for GraphRAG against TS. The authors attribute part of this to the value of specific examples, quotes and citations for an informed reader, and they suggest that tuning element extraction prompts could keep more such detail in the index.
Community level, cost and the comparison with map-reduce over text
Against TS, community summaries generally gave a small but consistent gain in comprehensiveness and diversity, except at the root level. Intermediate-level summaries on Podcast transcripts reached a comprehensiveness win rate of 57% (p<.001) and a diversity win rate of 57% (p=.036), while low-level summaries on News articles reached 64% (p<.001) for comprehensiveness and 60% (p<.001) for diversity.
Token cost differs sharply by level: on Podcast transcripts C0 uses 26657 tokens, against 1014611 tokens for TS. Low-level C3 summaries needed 26-33% fewer context tokens than TS, and root-level C0 needed over 97% fewer. Root-level summaries trade some performance for this efficiency, yet they still held a 72% comprehensiveness and a 62% diversity win rate over vector RAG.
Claim-based checks on comprehensiveness and diversity
Claimify was applied to each answer, and after duplicate removal 47,075 unique claims remained, averaging 31 claims per answer. Comprehensiveness is the average number of claims per answer, and diversity is the average number of clusters, formed by agglomerative clustering with complete linkage and a distance of 1 - ROUGE-L at several thresholds.
Every global condition and TS extracted more claims than SS on both datasets, and each difference was significant at p<.05. For diversity, every global condition beat SS across all thresholds on Podcast transcripts, while on News articles only C0 did so at every threshold. Across both datasets, the global conditions did not differ significantly from one another or from TS on either measure.
Exact ties were rare in the claim-based data, and tie thresholds gave results that were sensitive to the threshold chosen, so the authors kept only the non-tie cases.
Limitations
Fabrication rates were not compared with a method such as SelfCheckGPT, so the accuracy of generated content was not checked against that baseline.
Paper info
- Authors
- Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, Jonathan Larson
- Venue
- arXiv · Preprint
- First published
- 2024-4-24
- Added
- 2026-11-12
- Updated
- 2025-2-19
- Version
- v2
- arXiv
- 2404.16130
- Category
- cs.CL · cs.AI · cs.IR
- Original paper terms
- CC BY 4.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, Jonathan Larson (2024). From Local to Global: A Graph RAG Approach to Query-Focused Summarization. arXiv:2404.16130v2. https://arxiv.org/abs/2404.16130v2
BibTeX
@misc{edge2024from,
title = {{From Local to Global: A Graph RAG Approach to Query-Focused Summarization}},
author = {Darren Edge and Ha Trinh and Newman Cheng and Joshua Bradley and Alex Chao and Apurva Mody and Steven Truitt and Dasha Metropolitansky and Robert Osazuwa Ness and Jonathan Larson},
year = {2024},
eprint = {2404.16130},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2404.16130v2}
}