Chunking Documents

Retrieval works on chunks

A whole handbook is too broad to search as one item. Chunking splits it into smaller, focused passages before embeddings are created. Large chunks mix several topics. Tiny chunks lose the explanation around a sentence. A little overlap, where neighboring chunks repeat some text, can preserve a sentence across a boundary but also creates repeated results.

Prefer structure-aware boundaries such as headings and paragraphs. Preserve source path, heading, chunk index, and document version in metadata.

Analogy: Searching a book by returning the entire book is not useful. Returning one isolated sentence may be misleading. A well-sized section gives the answer and enough surrounding explanation.