Back to Glossary
RAG

Parent Document Retriever

Definition

Parent Document Retriever is a RAG pattern that embeds small chunks for precise retrieval but returns their larger parent documents for generation, balancing retrieval precision with context richness.

Why It Matters

Small chunks retrieve precisely but lack context. Large chunks provide context but retrieve imprecisely. Parent Document Retriever solves this trade-off: use small chunks to find the right location, then expand to the parent document for the full context needed for high-quality generation.

How It Works

  1. Indexing: Split documents into small chunks for embedding
  2. Store Mapping: Keep links from each chunk to its parent document
  3. Retrieval: Search finds relevant small chunks
  4. Expansion: Return the parent documents containing those chunks
  5. Generation: LLM uses the fuller context for better answers

When to Use

Use Parent Document Retriever when: small chunks lose important context, answers need surrounding information, you’re working with structured documents (sections, chapters), or generation quality suffers from fragmented context. This increases tokens sent to the LLM, so balance against context window limits and cost.