TokenPad

RAG

Chunk overlap

Chunk overlap repeats a portion of each chunk in the next one, so a sentence landing on a boundary appears whole in at least one of them.

Without it, a sentence split across two chunks appears complete in neither, so neither embedding represents it and it becomes effectively unsearchable — a silent hole in the index.

Ten to twenty percent is the usual range. The cost is duplicated storage and embedding, which is small compared to a retrieval failure.

In practice

Overlap rescues facts that straddle a boundary and duplicates everything else. Ten to fifteen percent is a common landing point; zero loses the sentence that spans the cut, and fifty pays to store and retrieve the same text twice. The cost is real at scale: 50% overlap on ten million chunks is five million chunks of duplication.

Common questions

How much chunk overlap should I use?

Ten to fifteen percent is a common landing point. Zero loses facts that straddle a boundary; fifty pays to store and retrieve the same text twice, which at ten million chunks is a material infrastructure cost.

Does overlap hurt retrieval quality?

It can. Duplicated content wins retrieval by occupying several top slots with the same text, crowding out the chunk that held the rest of the answer. Deduplicate near-identical chunks before indexing.

Measure it

More in RAG