Hierarchical Parent-Child & Sentence-Window Chunking resolves the fundamental trade-off in RAG systems between retrieval precision and generative context completeness; standard fixed-size chunking forces a compromise (small chunks lack context for generation, while large chunks dilute embedding representations); hierarchical chunking decouples indexing from synthesis: 1) Parent-Child Chunking: slicing a large parent document (2,000 characters) into dense child chunks (200 characters); the vector database indexes only child chunks for high semantic matching precision, but upon retrieval automatically swaps children for full parent chunks via `parent_id` foreign keys before feeding the LLM; 2) Sentence-Window Retrieval: embedding individual sentences, then expanding a surrounding
±K sentence window dynamically around retrieved matches.