liveBook · Manning

Leaf node

As explained in Retrieval Augmented Generation, The Foundational Ideas

A leaf node is a terminal node in a tree that has no child nodes.

A leaf node is a terminal node in a tree: nothing branches below it. In RAPTOR's hierarchical index, leaf nodes preserve the original text chunks and answer specific, granular questions. section 10.2 section 10.2.1

Leaf nodes serve several roles in a tree-organized retrieval system:

  • Store the corpus's original text chunks at the base of the hierarchy. section 10.2
  • Provide fine-grained evidence for questions about specific facts, clauses, or details. section 10.2
  • Enter embedding, clustering, and summarization steps that produce higher-level summary nodes. section 10.2.1
  • Complement summary nodes, enabling retrieval to move between granular evidence and broad themes. section 10.0

Specific contract evidence

For the question “What is the specific termination fee in the contract?”, retrieval can match a leaf containing the relevant text chunk. A broader question about termination conditions can instead match a summary node above it. section 10.2

Figure 10.2 Recursion.

Shows how short leaf chunks flow through embedding, clustering, and recursive summarization to form higher tree levels. section 10.2.1

How Retrieval Augmented Generation, The Foundational Ideas covers it

How deep it goes
Defines terminal structure and follows chunks through embedding, clustering, and summarization, but does not detail leaf storage implementation.
Examples
Uses contract clauses, 100-token chunks, and Cinderella story details to contrast granular leaf retrieval with thematic summaries.
What you can do after
Apply variable-resolution retrieval by selecting leaf nodes for precise evidence and summary nodes for broader questions.
How it connects
Connects tree structures with summary nodes, embeddings, clustering, summarization, and variable-resolution retrieval.

Also explained in

Compare how 14 books explain leaf node →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Retrieval Augmented Generation, The Foundational Ideas. The section links point to the parts of the book it draws on.