Skip to content
RAG Explained Better

Recursive Retrieval

Recursive retrieval follows summaries and IndexNode references down to the passages or table engines that answer.

Recursive retrieval first hits compact references (summaries, small chunks, or index nodes) then follows those references down to the fuller text nodes that actually answer, instead of returning only the first similarity hits. DataCamp’s LlamaIndex tutorial describes the pattern as retrieving relevant summaries first, then drilling into the linked chunks. LlamaIndex’s Recursive Retriever documentation calls the same idea traversing node relationships to fetch nodes based on references. Pondhouse Data (2024) frames the need as modeling relationships between chunks, especially when tables and surrounding text must stay linked. This mechanism is not separator-hierarchy chunking (an ingest-time separator hierarchy) and not RAPTOR ingest trees (a recursively built summary tree at ingest). The parent map of retrieval choices is retrieval in RAG.

How does recursive retrieval follow references?

Recursive retrieval follows references in a graph of nodes: the first hit is often a pointer, and the retriever expands that pointer into the text the generator should read. Pondhouse states the pattern as two required pieces: a way to identify relationships between document chunks, and a way to recursively retrieve related chunks. Flat top-k similarity stops after the first list; recursion keeps walking edges until a depth or score budget says stop.

Four-step loop. One, index leaves and reference nodes together: leaf nodes hold the passages you may eventually return, and reference nodes store a pointer to those leaves. Two, first retrieval returns references: similarity search can surface a summary or child chunk instead of the long leaf text. Three, traverse and fetch: a recursive retriever walks the reference edges and loads the pointed-to nodes. Four, stop on a depth or score budget, since without a hop cap, follows can fan out through every cited page or linked summary in the graph. A dashed return arrow marks that traversal can repeat before the budget stops it.
Recursion is the mechanism, not a metaphor: step three can fire again on whatever it just loaded, so step four is the only thing standing between one hop and an unbounded walk.

Index leaves and reference nodes together. Leaf nodes hold the passages, tables, or sub-documents you may eventually return. Reference nodes (summaries, smaller chunks, or LlamaIndex IndexNode objects) store a pointer to those leaves, which is the pattern in LlamaIndex’s Recursive Retriever and Node References guide. First retrieval often returns a reference whose embedding matches the query better than the long leaf text would. A recursive retriever then walks the reference edges and loads the pointed-to nodes. The LlamaIndex PDF-tables demo extends the same idea: an IndexNode can point at a Pandas or SQL query engine over a table, so fetching the node also runs that engine.

Stop on a depth or score budget. Without a hop cap, follows can fan out through every cited page or linked summary in the graph. DataCamp motivates the whole path for large collections where direct chunk retrieval returns unclear or incomplete context; summary-first then drill-down is the corrective. Once the walk is clear, the next question is which reference shapes the graph is allowed to use.

What kinds of node references does recursive retrieval use?

Recursive retrieval uses different reference shapes for the same follow-the-pointer walk. LlamaIndex documentation groups two engineering patterns; Chia Jeng Yang (Jan 2024 Medium article on three types of recursive retrieval) groups three intent types. Both taxonomies describe when a first hit is a pointer rather than the final passage.

LlamaIndex chunk references link smaller child chunks to a bigger parent chunk so search stays precise while generation can expand. That pattern is related to, but not identical to, one-shot parent expansion, which expands child to parent once without an arbitrary multi-hop reference walk. LlamaIndex metadata references use summaries and generated questions that point at a bigger chunk: the query matches the metadata node, then recursion loads the source text. The PDF-tables recursive-retriever demo adds a third engineering shape: table summary nodes that point at structured query engines rather than only at text leaves.

Yang’s three recursive-retrieval types (2024) name the intent of the walk. Page-based recursion follows explicit page or exhibit citations in manuals the way a reader flips to “see page 10,” which Yang illustrates with manufacturing manuals and Hrishi’s Greywing ship-manual demo of cited pages as navigation nodes. Information-centric recursion fixes a seed concept and keeps retrieving information that attaches to that node, which Yang describes as a look-up that is easier to stop because the target is known. Concept-centric recursion lets the model propose next concepts (n+1 nodes) and walk until the answer is grounded, which is harder to stop cleanly than a look-up because new concepts keep appearing.

Those families decide when the mechanism is worth the hop cost, which is the next measurement question.

What does recursive retrieval cost?

Recursive retrieval’s cost is structural: every follow-up hop is another retrieval, and sometimes another sub-query engine call, and building summary or question reference nodes at ingest adds LLM calls before any user query. There is no universal dollar figure that transfers across stacks. AI Engineer’s recursive multi-step RAG guide (Medium) warns qualitatively that recursive processes can be resource-intensive and raise scalability issues; that warning applies even more when each hop also fans out to table engines.

Query-time hops scale latency and token assembly with depth and fan-out. Each recursive expand hits the index or a linked retriever again, so p95 grows with max depth even when early hops already held the answer. Ingest-time reference construction is the other bill: summary-index and question-metadata patterns, as in DataCamp’s LlamaIndex walkthrough, pay generation cost once per document or chunk when those reference nodes are created. That cost is amortized across queries only if the reference graph is reused.

Depth must be capped as a product control. Yang notes that concept-centric search can keep discovering nodes without a clear “done” signal. Treat max hops and max nodes as hard budgets, not optional debug flags. Do not paste RAPTOR’s QuALITY scores onto this mechanism: Sarthi et al. (2024) publish large QuALITY gains for RAPTOR’s recursive summary tree, which is a different architecture whose numbers stay on the RAPTOR profile. Recursive retrieval here means reference-following at query time.

Knowing the cost structure decides when the hops are worth paying, which is a product-fit question rather than a framework default.

When should you use recursive retrieval?

Recursive retrieval earns its hops when the answer sits behind a reference the first hit only points to, not when a flat top-k already returns a complete passage. DataCamp positions the pattern for large collections where direct chunk retrieval is unclear. Pondhouse positions it when relationships between chunks matter, especially tables whose semantic meaning lives in surrounding text rather than in the table cells alone.

Use it for citation-heavy manuals. Page-based recursion matches corpora that say “see section 4.2” or “refer to page 20” (Yang, 2024). Use it when summaries retrieve better than raw chunks: large collections where chunk embeddings are noisy benefit from summary-first then drill-down (DataCamp). Use it for tables linked to surrounding text: Pondhouse and LlamaIndex’s PDF-tables recursive-retriever demo attach table nodes and query engines behind references so the table is not orphaned from its caption text.

Prefer a simpler sibling when one expand is enough. If you only need child-to-parent expansion once, start with parent-document retrieval or auto-merging retrieval instead of a multi-hop reference walk. Prefer query decomposition when the failure is a multi-part question that needs rewritten sub-queries across documents, which is query decomposition and multi-hop RAG, not document-reference following. Prefer sentence-window or contextual retrieval when the failure is lost local context around a matched sentence, which lives under sentence-window retrieval and contextual retrieval.

The safe default is flat retrieval until a labeled set shows that gold answers systematically sit behind references the first list never expands. That is also when the naming collision with recursive chunking and RAPTOR starts to matter.

How is recursive retrieval different from recursive chunking or RAPTOR?

The word “recursive” names different mechanisms on this site and on the organic results for this head query as of September 2026. Recursive retrieval is the query-time reference walk; the siblings below are not drop-in synonyms.

Recursive character chunking splits text at ingest with a separator hierarchy (paragraph to line to space to character). Its URL is recursive character chunking; the content file is chunking-recursive.html. This node’s file is retrieval-recursive.html for the same last URL segment under /retrieval/. Mixing the two in search results is a filename collision, not a shared algorithm.

RAPTOR recursively embeds, clusters, and summarises chunks into a multi-layer tree at ingest, then retrieves from those layers (Sarthi et al., 2024). Chucri et al. (arXiv:2410.01736, Oct 2024) address maintaining recursive-abstractive trees when datasets change over time: that line of work is still ingest-time tree maintenance, not LlamaIndex-style reference following at query time. Depth stays on the RAPTOR profile. Parent-document retrieval expands child hits to parents once; it does not walk an arbitrary reference graph hop by hop. Multi-hop RAG rewrites or decomposes the query across documents; recursive retrieval follows document references. Loop depth for query rewriting is at multi-hop architectures.

Plain English’s “Recursive Contextual Retrieval” (2025 extract) combines contextual windows with recursive reasoning loops that rewrite queries until context suffices. That is closer to iterative multi-step RAG than to IndexNode reference graphs, so treat it as a border case routed to multi-hop and sentence-window siblings rather than as a synonym for this node.

How do you implement recursive retrieval?

Implementing recursive retrieval is a handoff checklist: build the reference graph, attach retrievers, wrap a recursive retriever with caps, and benchmark against flat top-k before keeping the hops in production.

Build reference nodes first. Create summary, question, child-chunk, or table IndexNode objects that point at leaf text, following the LlamaIndex Recursive Retriever and Node References pattern. Attach per-subgraph retrievers next: a top-level summary index plus document-level or table-level retrievers, as in DataCamp’s and Pondhouse’s LlamaIndex guides. Wrap with a recursive retriever and set similarity top-k plus a maximum recursion depth so follows cannot unbounded-walk the graph. Evaluate against a flat baseline on the same queries, especially on manuals and table-heavy PDFs.

Store placement follows the site rule when a vector collection must answer both keyword and semantic needs behind the leaf nodes: Weaviate, Pinecone, Qdrant, and similar stores can hold the leaf embeddings while the framework owns the reference graph. Weaviate is the default worked-example store on this site when hybrid BM25F plus vector search is required inside one collection, as documented in Weaviate’s hybrid search guides as of September 2026. That does not make Weaviate required for recursive retrieval; any store that returns ranked leaves can sit under IndexNode pointers. LlamaIndex ships the recursive retriever pattern; runnable end-to-end wiring belongs on building the pipeline.

Keep observability on hop count, fan-out, and answer quality with and without recursion. AI Engineer’s multi-step RAG guidance recommends tracing recursive steps and testing multi-step scenarios so depth increases do not silently degrade latency or accuracy. Escalate to RAPTOR summary trees when the product need is ingest-time summary trees, to parent-document expansion when one child-to-parent hop is enough, and to multi-hop query loops when the question itself must be rewritten across documents. The parent map remains the retrieval hub.

Recursive retrieval is query-time reference following: hit a summary, child chunk, or IndexNode first, then walk to the leaf text or table engine that answers. Flat top-k fails when gold answers sit behind citations, summaries, or table links; LlamaIndex chunk and metadata references plus Yang’s page, information, and concept-centric types name the shapes of that walk. Cap hops, do not borrow RAPTOR QuALITY numbers for this mechanism, keep the name clear of recursive character chunking and multi-step query rewriting, and measure against a flat baseline before paying the ingest and latency cost.