Library// definition

Chunk overlap: what it protects against and what it duplicates

In short

Chunk overlap is the span of text repeated from the end of one chunk at the start of the next — insurance against a boundary cutting through a single idea, so a condition and its exception never land in different chunks. You pay in near-identical candidates competing for a fixed number of slots, and in an index that grows by a calculable multiplier.

Key takeaways

  • Overlap repeats the tail of one chunk at the head of the next. Its whole job is boundary insurance.
  • The index multiplier is arithmetic, not a guess: 25 percent overlap means about 1.33 times as many rows.
  • The real cost is crowding — 3 near-identical chunks holding 3 of the 10 slots you send to the model.
  • Where a document declares its own units — clauses, rows, entries — split on those and use no overlap.

Chunk overlap is the amount of text repeated at the start of each chunk from the end of the one before it, stated in characters, tokens or as a percentage of chunk size. It exists for one reason: a fixed-length boundary knows nothing about meaning, so eventually it lands between a rule and its exception.

The mechanism is a sliding window. Chunk size minus overlap gives the stride — how far the window advances. With 800-token chunks and 200 tokens of overlap the stride is 600, so every 200 tokens appears in 2 chunks. Any span shorter than the overlap sits intact inside at least one chunk, and that is the entire guarantee on offer.

What the insurance actually covers

A policy states a retention period; the exception for one document class begins in the next sentence; the boundary falls between them. Now no chunk answers "how long do we keep these", and retrieval returns something plainly on topic that produces a confidently wrong answer.

Overlap turns that silent miss into a clean hit, provided the idea is shorter than the overlap. It does nothing for a definition and a qualifier 3 pages apart, which is a structure problem no window size solves.

The two costs, one arithmetic and one behavioural

OverlapChunks produced, relative to noneWhat you notice
0 percent1.00 timesClean candidate lists, periodic boundary misses on long rules
10 percent1.11 timesShort spans protected; duplication rarely visible in a top 10
25 percent1.33 timesMost rule-and-exception pairs covered; duplicate pairs appear
50 percent2.00 timesEverything indexed twice; near-copies take 3 or 4 of 10 slots
Overlap as a fraction of chunk size, and its effect on the index

Column 2 drives embedding cost, index size and re-index time, and it is predictable enough to plan around. The second cost surprises people. Prompt slots are zero-sum, so 3 chunks sharing 70 percent of their text win or lose together — and when they win they take 3 slots, contribute one idea, and displace the passage holding the other half of the answer.

So the symptom of too much overlap does not look like duplication. It looks like an answer that is confidently partial. Measuring it means measuring recall@k with one extra column: how many of the k slots held distinct source spans rather than distinct chunk ids.

How you suppress the copies matters. Admitting only the first chunk per document silently removes real second answers from long files; demoting later chunks from the same source still lets a strong one through. That distinction is the subject of metadata filters and the difference between filtering and ranking, and reaching for the wrong one turns a duplication problem into an empty-results problem.

When overlap is the wrong instrument

Overlap is a workaround for boundaries chosen by a character counter. Where a document declares its own boundaries, the workaround is unnecessary and actively harmful.

  • Contracts and policies, where the clause is the unit. Split on the clause tree and every chunk is a complete thought with a citable identity; overlap makes citations ambiguous.
  • Question-and-answer content, product records and reference entries. Each is short and self-contained, so overlap simply indexes each answer twice.
  • Tabular data, where the row is the unit. A row needs its header repeated, which is a deliberate prefix, not a side effect of a sliding window.
  • Transcripts with speaker turns, where a mid-turn split loses the attribution that makes the line mean anything.

There is a structural alternative. Index small, precise chunks with no overlap, and at read time serve the matched chunk with its neighbours from the source document. It costs one extra read and a citation that names a span.

Choosing a number on your corpus rather than copying one

  1. Take 30 real questions the system answers badly and read the retrieved passages. Count how many failures are boundary splits rather than the wrong document entirely.
  2. If that count is under about 3 in 30, overlap is not your problem and tuning it will burn a week.
  3. If it is higher, sweep 0, 10 and 25 percent, re-index and rerun the same 30 questions — recording how often the answer was present and how many slots held distinct source spans.
  4. Take the smallest overlap that removes the splits. Everything beyond it is index growth bought with no return.
  5. Write the residual down. Some boundary miss survives any setting, and naming that rate turns it into a budgeted property — the argument in an error budget for a feature that is sometimes wrong.

Overlap adds no information to the index. It adds copies, and buys the chance that one copy holds a whole idea.

Treating chunking as something measured rather than configured once is most of the difference between a retrieval system that improves and one that gets nudged — a habit running through our AI agents and automation work and what an AI-native product studio does differently. Neighbouring terms sit in retrieval and grounding, in the engineering library.

Frequently asked questions

Short answers to the follow-ups this page tends to raise.

How much chunk overlap should I use?

The smallest amount that stops answers straddling 2 chunks on your own corpus, found by sweeping rather than by copying a number. 10 to 25 percent of chunk size is where most prose settles, but treat that as a starting point: short self-contained entries need none, and dense conditional prose may need more.

Does chunk overlap improve retrieval accuracy?

It improves one thing and worsens another. It raises the chance a complete idea sits inside a single chunk, and it puts near-identical candidates into a fixed number of slots. Whether the net is positive depends on how often your failures are boundary splits.

What is the difference between chunk size and chunk overlap?

Size is how much text each unit holds; overlap is how much of it repeats from the previous unit. Size minus overlap gives the stride, which sets how many chunks a document produces.

Can I get the benefit of overlap without duplicating the index?

Yes: index small chunks with no overlap and expand at read time. Retrieve the precise matching chunk, fetch its neighbours from the original document, and send the joined passage to the model. You pay in one extra read and a citation that names a character span.

  • chunking
  • indexing
  • retrieval
  • embeddings
// shipped work

The work behind this page

Builds from our portfolio that this page draws on.

Read next

Working on something in this space?

Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.

Start the conversation