Chunking

Chunking is the way long documents are cut into pieces before indexing: the cuts decide what the search can find, so a good chunk is a self-contained passage that keeps its meaning when read alone.

Data & retrievaltext chunkingdocument splitting
§ 01DefinitionChunking

No jargon, no math

In plain words, what is it?

Why cut at all? Models read finite windows, and retrieval works with focused passages: an embedding computed over 80 pages becomes an average that resembles nothing. The main strategies: fixed-size splits, or structural cuts on headings, paragraphs or clauses (for contracts) and rows (for tables), with an overlap of a few lines so a sentence split at a seam stays whole on one side or the other. Too small and meaning dies (“unless otherwise stated” without the sentence that follows); too big and the embedding dilutes, and search loses the exact answer. Every chunk keeps metadata: document title, section, clause number. Where it breaks: a table cut from its caption, a liability clause separated from its exceptions.

§ 03

Want this running in your stack?

We design and ship AI systems with permissions, logs and human approval. It starts with a 30-minute scoping call.