ParentDocumentRetriever indexes small child chunks (for precise retrieval) but returns their larger parent documents (for full context) to the LLM.
There is a tension between retrieval precision and context sufficiency: small chunks improve semantic matching but lose surrounding context. ParentDocumentRetriever solves this by splitting documents into small child chunks (e.g., sentences) for indexing, while linking each child to a larger parent chunk (e.g., paragraph or whole document). During retrieval, it first finds relevant child chunks, then fetches and returns the corresponding parent chunks, providing enough context for the LLM.
This pattern provides the best of both worlds: high retrieval precision from small chunks and enough context from the larger parent for the LLM to generate informed answers.