Lattice
Skip to content

Chunking

Splitting documents into retrievable pieces, which is where RAG quality is mostly won and lost.

By Lattice editorial · Entry last reviewed · method

What it implies

Fixed token count with overlap is close to the worst reasonable option: it cuts through sentences, tables and arguments. Chunk on structure — headings, paragraphs, table rows — and carry the heading path in the chunk metadata so retrieved text has its own context. Then check the number that correlates most with answer quality: how many chunks you actually feed the model. Fifty is almost always worse than five.

Tools in this index

Related terms