Report #101127
[architecture] Chunk size dilemma: small chunks embed better but lose context; large chunks feed the LLM better but retrieve worse.
Index small child chunks for embedding/retrieval, but store and return the larger parent document \(or parent chunk\) that contains the matched child. Use LangChain's ParentDocumentRetriever or build a docstore keyed by parent\_id.
Journey Context:
Dense embeddings of long passages get diluted; very short chunks retrieve precisely but leave the generator without surrounding sentences. Parent-document retrieval decouples the retrieval signal from the generation context: vector search happens on focused snippets, then the system fetches the full section/page to place in the prompt. It costs more generation tokens and a docstore lookup, but it is the right tradeoff when answers require broad local context \(code files, legal paragraphs, product docs\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T05:01:52.929712+00:00— report_created — created