RAPTOR - Recursive Summarization RAG

Open-source RAG Retrieval Method R Voice & Memory

Basic Information

  • Product Name: RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval)
  • Development Team: Stanford University
  • Country/Region: USA
  • GitHub: https://github.com/parthsarthi03/raptor
  • Paper: "RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval"
  • Type: Open-source RAG Retrieval Method
  • Academic Publication: ICLR 2024

Product Description

RAPTOR is an innovative RAG retrieval method that recursively embeds, clusters, and summarizes text chunks to build a tree structure with different levels of summarization from the bottom up. During inference, it retrieves from this tree, enabling the integration of information across long documents at various levels of abstraction. Unlike traditional RAG, which only retrieves short contiguous text chunks, RAPTOR understands the overall context of documents through hierarchical indexing.

Core Features/Characteristics

  • Recursive Clustering and Summarization:
  • Clusters text chunks based on vector embeddings
  • Generates text summaries for each cluster
  • Recursively builds higher-level summaries
  • Tree Index Structure:
  • Leaf nodes: Original document chunks (fine-grained)
  • Intermediate nodes: Cluster summaries (medium abstraction)
  • Root node: Global summary (high abstraction)
  • Multi-level Retrieval:
  • Retrieval possible from any level
  • Fine-grained retrieval for specific details
  • High-level retrieval for global overview
  • Integration with GPT-4: 20% improvement in best performance on the QuALITY benchmark

Technical Architecture

[Global Summary]
             /          \
      [Sub-topic Summary A]   [Sub-topic Summary B]
       /      \         /      \
   [Cluster1]  [Cluster2]  [Cluster3]  [Cluster4]
   / | \    / | \    / | \    / | \
  Original Document Chunks (Leaf Nodes)

Performance Data

  • QuALITY benchmark: 20% improvement in best performance when combined with GPT-4
  • Achieves state-of-the-art results on QA tasks requiring complex multi-step reasoning
  • Particularly suitable for long document scenarios requiring global document understanding

Business Model

  • Completely Open Source and Free: Academic research project
  • ICLR 2024 Publication: High-impact academic paper

Target Users

  • Long document analysis and QA applications
  • Scenarios requiring multi-level document understanding
  • Academic research and literature review
  • Intelligent QA for reports and books

Competitive Advantages

  • Tree structure enables multi-granularity document understanding
  • Addresses the limitation of traditional RAG, which can only retrieve short segments
  • Excellent performance in long document scenarios
  • Simple and elegant design philosophy
  • Published at ICLR 2024

Limitations

  • Index construction requires additional LLM calls (summary generation)
  • Not suitable for frequently updated documents (requires rebuilding the tree structure)
  • Clustering quality depends on the embedding model
  • Recursive processing may increase latency

Comparison with Other Solutions

DimensionRAPTORGraphRAGHippoRAGTraditional RAG
Index StructureRecursive Summary TreeKnowledge Graph + CommunitiesGraph + PageRankFlat Vector
Long Document UnderstandingExcellentGoodGoodPoor
Index CostMediumHighMediumLow
Real-time UpdatesDifficultMediumEasierEasy
Theoretical BasisHierarchical ClusteringGraph TheoryCognitive ScienceVector Similarity

Relationship with OpenClaw Ecosystem

RAPTOR provides OpenClaw with an excellent solution for handling long documents. When users upload lengthy reports, books, or extensive notes, RAPTOR's recursive summary tree can help OpenClaw agents understand document content at different levels of abstraction, supporting various needs from detailed queries to global understanding. RAPTOR can be integrated with engines like RAGFlow to further enhance OpenClaw's document understanding capabilities.