Introduction
Retrieval-Augmented Generation (RAG) has become a standard for enhancing Large Language Models (LLMs) with external knowledge. However, traditional RAG systems often struggle with "abstractive" queries that require synthesizing information across long contexts. While hierarchical summarization methods like RAPTOR have been proposed to address this, they often suffer from high redundancy and a "one-size-fits-all" approach that builds massive, static trees regardless of the specific query.
DTCRS (Dynamic Tree Construction for Recursive Summarization) addresses these inefficiencies by introducing a query-aware, dynamic tree construction framework. By aligning the summarization process with specific questions and document structures, DTCRS achieves superior accuracy while drastically reducing computational overhead.
Methodology
The DTCRS framework operates through a four-stage pipeline designed to make summarization both dynamic and context-sensitive.
- Question Classification: An LLM first determines if a query is complex enough to require a summary tree. Simple extractive or boolean questions bypass the tree construction entirely to avoid "hallucination-lite" and unnecessary computation.
- Document Structuring (ToC): For complex queries, the system generates a Table of Contents (ToC) to map the document's logical flow.
- Question Decomposition: The original query is broken into multiple sub-questions grounded in the ToC, ensuring the retrieval process aligns with both user intent and the document's structure.
- Dynamic Clustering: Using sub-question embeddings as initial centers for a Gaussian Mixture Model (GMM), DTCRS clusters text chunks into query-relevant nodes. This recursive process creates a lean, focused hierarchy of summaries.
Evaluation
The system was evaluated on three prominent long-context benchmarks:
- NarrativeQA: Ultra-long contexts involving entire books and movie scripts.
- QASPER: Scientific research papers featuring extractive and abstractive question types.
- QuALITY: A multiple-choice challenge requiring reasoning over long stories.
Results and Discussion
DTCRS demonstrates significant improvements in both performance and efficiency over the state-of-the-art RAPTOR baseline.
Performance Gains
On the QASPER dataset, DTCRS achieved an F1 score of 58.5, outperforming RAPTOR's 55.7. Similarly, on QuALITY, accuracy reached 74.7%, a notable jump from the baseline's 67.6%. Qualitative analysis indicates that DTCRS provides more concise and relevant evidence by filtering out the noise inherent in static trees; it generates 92.2% fewer summary-layer nodes than RAPTOR.
Efficiency and Speed
A core advantage of DTCRS is its reduced node generation. By focusing only on query-relevant information, the system achieves a massive speedup in tree construction.
As shown in the figure above, the time required to build the summary tree is reduced by approximately 80.95% compared to RAPTOR. This efficiency gap becomes increasingly pronounced as document length (character count) grows, making DTCRS particularly suitable for ultra-long context applications.
Conclusion
DTCRS proves that query-awareness is the key to efficient hierarchical RAG. By dynamically constructing summary trees, the framework avoids the redundancy of static methods while improving the quality of retrieved evidence. While the method relies on the LLM's ability to generate accurate document structures, it represents a significant step toward more scalable and intelligent long-context reasoning. Future work will explore hybrid caching strategies to balance the costs of dynamic construction in high-volume production environments.
Summary updated