What is parent-document (small-to-big) retrieval?
mediumAnswer
- Retrieve at small-chunk granularity (200-400 tokens) for precise matching, but return the larger parent chunk / whole document to the LLM for context.
- Strategies: (1) hierarchical: store both small and big chunks, link them, retrieve small → return big.
- (2) window expansion: retrieve small, then include N chunks on each side.
- Solves the precision (need small chunks) vs context (LLM needs surrounding text) trade-off.
- Standard in LangChain, LlamaIndex.
Check yourself — multiple choice
- One chunk size fits all
- Retrieve small chunks for precision, return parent chunk / doc for context — resolves precision vs context trade-off
- Same as reranking
- Only for images
Parent-doc retrieval: small chunks index / big chunks return → precision + context.
#rag#retrieval
Practise LLMs & GenAI
214 interview questions in this topic.