DEV Community

Cover image for RAPTOR: A Novel Tree-Based Retrieval System for Enhancing Language Models – Research Summary
M Sea Bass
M Sea Bass

Posted on

RAPTOR: A Novel Tree-Based Retrieval System for Enhancing Language Models – Research Summary

This study introduces RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval), a novel tree-based retrieval system designed to enhance search capabilities for extended language models.

1. What is this study about?

RAPTOR complements the knowledge of large language models (LLMs) by learning hierarchical representations of text, enabling information retrieval at various levels of abstraction. Specifically, it clusters text chunks and recursively generates summaries to build a tree structure that encompasses everything from an overall summary to detailed information. During search, this tree structure allows for efficient retrieval of information at the appropriate level of granularity based on the query, producing more accurate and comprehensive answers.

2. How does it stand out from previous research?

Traditional retrieval-augmented methods typically target short, consecutive text chunks, limiting their ability to grasp the broader context of an entire document. RAPTOR, by leveraging a tree structure, captures both high-level themes and low-level details, effectively representing and utilizing large-scale discourse structures. This approach allows RAPTOR to handle complex, multi-step reasoning questions that are challenging for existing methods.

3. What are the key technical contributions?

  • Recursive Abstraction: RAPTOR constructs a tree structure by clustering text chunks and recursively generating summaries. In this tree, leaf nodes represent the original text chunks, while higher-level nodes represent more abstract summaries.

  • GMM-Based Clustering: Soft clustering using Gaussian Mixture Models (GMMs) is employed to group similar text chunks. This approach enables nodes to belong to multiple clusters, allowing for more flexible representation.

  • Summarization with Language Models: Powerful language models, such as GPT-3.5-turbo, are used to generate summaries of the clustered text.

  • Tree Traversal and Collapsed Trees: For retrieval, two strategies are used—hierarchical traversal of the tree (tree scanning) and collapsing the entire tree into a single layer for broader searches (collapsed tree). These strategies enable efficient retrieval of relevant information.

4. How was its effectiveness validated?

RAPTOR’s performance was evaluated using three question-answering datasets: NarrativeQA, QASPER, and QuALITY. UnifiedQA, GPT-3, and GPT-4 were used as readers, and RAPTOR was compared against existing retrieval methods such as SBERT, BM25, and DPR. The results showed that RAPTOR outperformed traditional methods across all datasets, particularly excelling in answering questions requiring complex reasoning.

When combined with GPT-4, RAPTOR achieved state-of-the-art results in several tasks, such as improving absolute accuracy on the QuALITY benchmark by 20%. Additionally, an analysis of the contribution of each tree layer demonstrated that higher-level nodes play a critical role in addressing thematic or multi-hop questions effectively.

Top comments (0)