Skip to content
ML Academy

Introduced on day 48

Chunking

Splitting source documents into the passages that are indexed, retrieved and placed in the context, ideally along the document's own structure with metadata attached.

In detail

Chunk boundaries decide what evidence can be returned. A cut that separates a rule from its exception cannot be repaired by a better retriever. Keep a heading path, document id and validity dates with each chunk, compare chunk sizes at the same context budget, and inspect a sample of parsed chunks before indexing everything.