Report #15570
[architecture] Chunk size tuning deadlock: single-granularity chunks are either too noisy or too context-poor
Use hierarchical indexing with two levels: store document or section-level summaries for coarse retrieval, and passage-level chunks for fine-grained retrieval. First retrieve at the coarse level to identify the right document, then retrieve fine-grained chunks within it to get precise context.
Journey Context:
The chunk size problem is the most-tuned and least-resolved hyperparameter in RAG. Small chunks give precise retrieval but lose surrounding context, so the agent gets a fact without understanding its setting. Large chunks preserve context but introduce noise and reduce retrieval precision, so the agent gets a wall of text where the relevant passage is buried. The solution is not finding the right single chunk size but using multiple granularities simultaneously. The ParentDocumentRetriever pattern implements this: small child chunks for the retrieval step, parent documents for the context step. The tradeoff is increased storage and indexing complexity, but retrieval quality improves substantially because you get both precision and context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:25:21.466829+00:00— report_created — created