Variable-resolution retrieval lets a RAG system answer at the level a query requires: a granular fact from a leaf node or a broad theme from a summary node. Flat retrieval may find a relevant detail while missing the relationships that explain the larger answer. section 10.0 section 10.2.2
RAPTOR builds this behavior through a recursive tree. Leaf segments are clustered, summarized into higher-level nodes, and synthesized again toward a root. The resulting summaries become synthetic retrieval targets for high-level questions, while leaves preserve detailed evidence. section 10.0
Two retrieval strategies expose the hierarchy differently:
- Collapsed Tree flattens roots, summaries, and leaves into one vector space. It uses one vector search, works with familiar vector stores, and suits corpora below roughly 100,000 chunks, but can return the wrong abstraction level or accumulate noisy matches beyond roughly one million nodes. section 10.5
- Tree Traversal searches the root, selects a branch, and descends through smaller subtrees. It restricts scope and can scale more gracefully, but adds sequential latency and depends on accurate top-level summaries. section 10.5
From Cinderella's facts to its theme
Leaf nodes contain details such as floor-scrubbing and the pumpkin's transformation. Intermediate summaries group domestic hardship and magical events, while the root summarizes rescue and recognition. A question about a glass slipper can reach a leaf; a question about divine justice can match the root summary. section 10.2.2
Figure 10.3 The Cinderella Tree.

Use the Cinderella tree to inspect how granular facts roll up through intermediate summaries into a thematic root. section 10.2.2
