| ISSUE 385/456 · COMPUTER SCIENCE |
~4 MIN |
FOUNDATION / RETRIEVAL DESIGN · READING DATE 2027-10-21 · OCTOBER 2027 — LANGUAGE MODELS AND MEASUREMENT
Why cutting a document can cut an answer in half
START HERE
A page break can separate a rule from the exception in its next sentence. Chunk overlap is repeated text included at the boundaries of neighbouring document pieces used for search. It gives a passage near a cut another chance to remain together, while increasing repeated material.
|
/ WHY NOW
An assistant answering questions from a manual often retrieves only a few small passages. If the relevant condition lies just outside the retrieved passage, the answer can miss it even though the complete manual contains everything needed.
|
/ THE IDEA
A chunk is one document piece stored and searched as a unit. Fixed-size chunking advances through the text in steps. With no overlap, the next piece starts after the previous one ends. With overlap, it starts earlier, repeating part of the previous piece. This is not the same as asking the language model to read more carefully. The crucial text must first reach the model. Overlap changes what evidence is available within one retrieved unit. It can preserve boundary-spanning phrases, but it also duplicates search results and consumes storage or input space.
THE FORMAL IDEA
stride = chunk length − overlap
| Chunk length and overlap are measured in the same units, such as tokens, the numbered text pieces a text-generating program uses. | | Stride is the distance between successive chunk starts. Choose overlap from zero up to less than chunk length; equal overlap would never advance. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
A toy document has positions 1 through 12; chunks hold 6 positions. No overlap: chunks are 1–6 and 7–12; a rule at 6–7 is split. Change only overlap to 2: stride = 6 − 2 = 4. Chunks start at 1, 5 and 9; chunk 5–10 contains the whole rule.
|
The rule did not become longer or more accurate. A different boundary policy made it available in one searchable piece. That can let a retrieval step return both the condition and its consequence together.
/ SO WHAT?
For a real manual, inspect questions involving headings, tables, footnotes and exceptions. Splitting along meaningful sections can outperform fixed cuts, and repeating a heading may add more useful context than repeating an arbitrary number of tokens. Evaluate whether retrieved passages contain complete evidence, not just whether their words resemble the question. Larger overlap is not automatically better.
ONE CAVEAT |
| The numbered document is invented. Overlap cannot guarantee finding a rule longer than a chunk, repair bad source text or ensure the right passage is retrieved. Access permissions must still apply to every stored piece. |
KEEP THIS
Overlap can preserve evidence across a boundary, at the cost of storing and retrieving some text more than once.
|
NEXT: How stretching metal becomes a measurable voltage
|