Hierarchical & Memory-Augmented Retrieval: overview
- Source
- From the RAG & Agents Engineering course
- By
- Sourav Banerjee
- Last updated
- 8 Nov 2026
A passage index finds local evidence. A question about the whole handbook may need a representation assembled from several passages before retrieval begins. The T13.1 notebooks build on four ideas: abstraction levels, collapsed-tree retrieval, global memory and dual-level retrieval.
Larkspur Cloud's handbook supplies the running example. A customer asks how cancellation affects data access; an operations lead asks how the handbook manages service continuity. Both questions connect policies that live in separate sections. Source passages still decide what the answer may claim.
In short
- RAPTOR adds summaries at several levels to the retrieval corpus. Preserve their links to the passages they summarise.
- Collapsed-tree retrieval ranks leaves and summaries together. Tree traversal chooses a route through parent-child links; these are different retrieval algorithms.
- MemoRAG uses corpus memory to draft retrieval clues. Verify those clues against retrieved evidence before answering.
- LightRAG separates entity-focused retrieval from retrieval over thematic relationships, then assembles graph context and source passages.
- The lab uses four authored source passages and three representative summaries. At a two-node budget, the continuity query reaches one source identifier with leaves only and four through summary ancestry. These are fixture retrieval counts, not algorithm benchmark results.
Mental model
- Read the current authorised source passages.
- Build summaries, memory records or graph profiles.
- Store derived text with its source dependencies.
- Use the question to select derived records and passages.
- Check policy claims against their original passages.
- Answer with evidence that supports each claim.
Derived representations can make distributed evidence easier to find. They also introduce another place to lose an exception, merge unrelated entities or preserve a deleted policy. Keep source identifiers and versions through every transformation so a retrieved summary can lead back to its evidence.
Interactive lab
Search the leaves or the whole tree: open the file in a browser. Compare the thematic question in leaf-only and collapsed modes. Move the result budget and inspect which summary or source passage enters the context. Switch to the specific export question and check whether a broad summary displaces the precise evidence.
How it connects
Key Takeaways
- Choose a representation for the information need and compare it against the flat baseline.
- A summary's source coverage does not prove that every source fact survived compression.
- Distinguish a paper's algorithm from the simplified implementation in its teaching notebook.
- Measure retrieval, source support, update work and generation quality separately.