An e-learning platform builds a RAG system for a technical Q&A assistant covering API documentation. The documentation chunks are 1,500 tokens each. Engineers observe that when users ask narrow questions (e.g., 'What is the default timeout for the connections API?'), retrieved chunks return surrounding context that buries the specific answer in irrelevant content, causing Claude to sometimes hallucinate the value or hedge excessively. What chunking strategy most directly addresses this retrieval precision problem?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — hierarchical (parent-child) chunking directly solves the precision vs. context tradeoff. Child chunks of 100-200 tokens contain atomic facts ('Default timeout: 30 seconds') that retrieve with high precision for narrow questions. When Claude needs broader context (understanding…
Full explanation below image
Full Explanation
Hierarchical (parent-child) chunking directly solves the precision vs. context tradeoff. Child chunks of 100-200 tokens contain atomic facts ('Default timeout: 30 seconds') that retrieve with high precision for narrow questions. When Claude needs broader context (understanding why the default is 30 seconds, what parameters affect it), the parent chunk is retrieved. This dual-index approach outperforms single-size chunking for documentation Q&A where both atomic fact retrieval and contextual understanding are needed. Option A (larger chunks) worsens the described problem — more irrelevant content per chunk makes the specific value harder to locate and increases hallucination risk. Option C (200 tokens universally) improves narrow-question precision but loses contextual continuity for multi-part questions, and important facts may be split across chunk boundaries. Option D (query expansion) is a retrieval strategy that may help find relevant chunks but doesn't address the within-chunk noise problem of large chunks burying specific values.