NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval

Parth Sarthi, Salman Abdullah, Aditi Tuli, Shubh Khanna, Anna Goldie, Christopher D Manning

Abstract

Standard Retrieval-Augmented Generation (RAG) systems often struggle with holistic or thematic queries because they rely on retrieving short, contiguous text chunks. We present RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval), a novel indexing and retrieval strategy that constructs a hierarchical tree of text summaries. By recursively clustering and summarizing document segments, RAPTOR enables Large Language Models (LLMs) to access information at varying levels of abstraction. Our evaluation shows that RAPTOR achieves state-of-the-art performance on complex, long-context reasoning tasks, significantly outperforming traditional retrieval methods.

Introduction

Retrieval-Augmented Generation (RAG) has become the standard for grounding LLMs in external knowledge. However, most RAG implementations suffer from a "granularity problem." They typically partition documents into small, fixed-size chunks and retrieve the top-$k$ most similar snippets to answer a query.

While effective for "needle-in-a-haystack" factoid retrieval, this approach fails on thematic or holistic questions that require integrating information across a large-scale discourse structure. For instance, answering a question about a character's development across a novel requires a "big picture" view that individual paragraphs cannot provide. RAPTOR addresses this gap by building a structure that represents the document's global context alongside its local details.

Methodology

RAPTOR moves beyond flat chunking by constructing a bottom-up hierarchical tree through a process of recursive clustering and summarization.

1. Recursive Clustering

The process begins with the initial text chunks (leaf nodes). These chunks are embedded and then clustered using Gaussian Mixture Models (GMMs). To handle high-dimensional vector spaces effectively, RAPTOR employs UMAP (Uniform Manifold Approximation and Projection) for dimensionality reduction. A key feature of this approach is "soft clustering," where a single chunk can belong to multiple clusters if it encompasses multiple topics, ensuring that nuanced information is preserved across different branches of the tree.

2. Recursive Summarization

For each identified cluster, an LLM (such as gpt-3.5-turbo) generates a concise summary. These summaries serve as the "parent nodes" for the underlying chunks. This process is repeated recursively—summaries are clustered and summarized again—until a single root node or a small set of high-level summaries is reached.

3. Retrieval Strategies

At inference time, RAPTOR offers two primary mechanisms for information retrieval:

  • Tree Traversal: A top-down approach where the system starts at the root and follows the most relevant branches based on query similarity.
  • Collapsed Tree: The authors found that flattening the entire tree into a single pool of nodes (combining original chunks and all levels of summaries) and performing a standard top-$k$ cosine similarity search often yielded superior results. This "collapsed" view allows the model to simultaneously retrieve high-level overviews and granular evidence as needed.

Experimental Evaluation

The researchers evaluated RAPTOR across three benchmarks requiring long-document comprehension:

  • NarrativeQA: Question-answering based on full-length books and movie scripts.
  • QASPER: Questions based on full-text NLP research papers.
  • QuALITY: A multiple-choice dataset based on medium-length stories, specifically focusing on the "HARD" subset where human performance is often challenged.

Key Results and Insights

RAPTOR demonstrated significant performance gains over traditional retrieval methods like BM25 and Dense Passage Retrieval (DPR):

  • State-of-the-Art Performance: When paired with GPT-4, RAPTOR improved the state-of-the-art on the QuALITY benchmark by 20% in absolute accuracy. On NarrativeQA, the combination of RAPTOR and UnifiedQA set a new record for the METEOR metric.
  • The Value of Summaries: An ablation study on NarrativeQA revealed that over 57% of the retrieved nodes came from non-leaf (summary) layers. This indicates that the LLM relies heavily on the synthesized summaries to answer complex, high-level questions.
  • Semantic vs. Positional Grouping: Unlike previous hierarchical methods that group adjacent paragraphs, RAPTOR groups by semantic similarity. This allows the system to capture "distant interdependencies"—thematic links that may be separated by hundreds of pages in the original text.
  • Scalability: Despite the recursive nature of the indexing process, the cost and time required to build the RAPTOR tree scale linearly with document length, making it a viable solution for large-scale corpora.

Discussion and Limitations

While RAPTOR represents a significant advancement in RAG, it introduces certain trade-offs. The primary "indexing tax" is the cost of summarization, as building the tree requires multiple LLM calls. Additionally, the authors noted a minor hallucination risk (approximately 4%) in the generated summaries, though this did not significantly impact downstream QA performance in their tests. Finally, searching a "collapsed tree" increases the number of nodes compared to searching raw text, which may necessitate the use of efficient vector search tools like FAISS to maintain low latency.

Conclusion

RAPTOR provides a powerful framework for multi-level document representation. By integrating recursive summarization into the retrieval pipeline, it allows LLMs to navigate the complexities of long-form discourse, bridging the gap between granular fact retrieval and holistic understanding.

Summary updated

BibTeX
@inproceedings{sarthi2024raptor,
  author = {Parth Sarthi and Salman Abdullah and Aditi Tuli and Shubh Khanna and Anna Goldie and Christopher D Manning},
  title = {{RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=GN921JHCRw},
}
Figure