Module 1 · Building the index · Lesson 2
Chunking structured documents
How to cut contracts, records, reports and correspondence into retrievable units along their own structure, and how contextual retrieval and late chunking give each chunk back the context it lost.
By the end of this lesson you can
- Explain the trade-off between small and large chunks for retrieval precision, recall and citation
- Implement a structure-aware chunker that splits on clause and schedule boundaries and keeps provenance to page and block
- Compute the cost of contextual retrieval for a long contract with and without prompt caching
- Compare contextual headers, contextual retrieval and late chunking, and choose one for a given corpus