Data substrate

Chunking

Splitting documents into retrieval-sized pieces — small enough to search precisely, large enough to keep their meaning — before embedding them for search.

Operating principle

Production AI is a system: context, tools, permissions, traces, evals, and feedback loops around the model.

What it is

Retrieval systems don't search whole documents; they search chunks. Chunking is the decision of where to cut: by heading, by paragraph, by token count with overlap, by table row. Each chunk gets embedded and indexed with metadata about where it came from.

Why it matters

Bad chunking is one of the most common causes of bad AI answers. Cut too small and the retrieved text lacks context; too large and the relevant sentence drowns in noise while burning the context budget. Chunk boundaries that split a table or separate a caption from its figure produce confidently wrong citations.

How it works

Strategy follows content type: long-form documents split on structure with token-bounded overlap; transcripts split on speaker turns; tables stay whole or split by row groups; code splits on functions. Chunk size, overlap, and metadata are eval-set parameters — measured against real queries, not guessed.

Related resources