Retrieval quality is decided before the model is ever called. If the passage containing the answer was split in half by a chunk boundary, no embedding model, reranker, or prompting trick will recover it reliably. Chunk size and overlap are the parameters that control this, and they are usually set once from a tutorial and never revisited, which is why so many retrieval systems plateau at mediocre accuracy.
The short version: choose chunk size by the shape of your answers, not by a default; add overlap only where sentences would otherwise be cut; and evaluate by whether the correct passage appears in the top-k, not by whether the final answer sounded plausible.
Why fixed-size chunking fails on real documents
Splitting text every five hundred tokens is deterministic, cheap, and completely blind to meaning. It cuts tables in half, separates a heading from the paragraph it introduces, and splits numbered procedures between steps six and seven. Retrieval then returns fragments that look relevant and cannot answer the question, which is worse than returning nothing, because the model will build an answer on top of them.
Structure-aware splitting is the cheap improvement. Split on headings first, then on paragraph boundaries, and only fall back to a token window inside an unusually long paragraph. Most document formats already carry this structure; the mistake is flattening it into plain text and then trying to reconstruct boundaries from punctuation.
Sizing: match the chunk to the answer you expect
A useful heuristic is that a chunk should be large enough to contain a complete answer to a typical question and small enough that its embedding is dominated by one topic. For dense technical documentation that usually lands between two hundred and six hundred tokens. For narrative policy documents, where answers are spread across a section, five hundred to a thousand works better. For frequently asked question sets, a single question-and-answer pair per chunk is best, because the pattern matches the retrieval query exactly.
Test three sizes rather than agonising over one. Build an evaluation set of fifty real questions with the known correct passage marked, then measure recall at k for sizes of, say, 300, 600, and 1000 tokens. The curve is usually informative: recall rises with size until chunks become topic mixtures, then falls. Pick the size at the knee, not the maximum.
Overlap: a patch, not a strategy
Overlap exists to stop an answer being bisected by a boundary. Ten to fifteen percent is the usual working range, enough to preserve a sentence or two across the split. Larger overlaps cost storage, inflate embeddings, and produce near-duplicate results that crowd your top-k with the same passage three times.
Overlap does not fix bad boundaries, it only softens them. If your recall is poor because tables are being split, adding overlap wastes storage without solving anything. Measure first: pull the failing cases from your evaluation set and look at what the retrieved chunks actually contain. The pattern in those failures tells you whether you need overlap, structure-aware splitting, or a completely different chunking scheme.
Chunks need context beyond their own text
A chunk that says “this value must not exceed the limit defined in section 4.2” is useless on its own. Embeddings of isolated fragments are ambiguous, and the model reading them has no way to resolve the reference. Prepending a short breadcrumb, the document title and the section path, into each chunk’s indexed text solves a large share of these cases at almost no cost.
Keep the breadcrumb in the indexed text and out of the text you show the model if you prefer, but index it. Retrieval matches phrases as well as meaning, and a query mentioning the document name will then find the chunk even when the body never repeats it.
Measure recall, not vibes
The number that matters is whether the correct passage reached the model. Build a set of questions with known answers, run each question through retrieval, and record whether the right chunk appeared in the top three, top five, and top ten. Recall at three tells you how much work the reranker has to do; recall at ten tells you whether the answer was reachable at all.
Only after recall is respectable is it worth tuning generation. A system with poor recall produces confident, fluent, wrong answers, and prompt engineering on top of that is wasted effort. Fixing chunking typically moves recall more than any other single change, and it is the cheapest change to make because it requires no model swap.
A worked example with numbers
A corpus of two thousand technical pages is split at five hundred tokens with no overlap. Recall at five for a fifty-question set comes out at seventy percent. Half of the failures share a pattern: the correct sentence sits at a boundary, with the first half in one chunk and the second in the next, and the embedding of each half matches the question weakly.
Re-splitting on headings with a two-hundred-token minimum and fifteen percent overlap moves recall at five to eighty-eight percent without touching the embedding model. A reranker on top pushes the top three to ninety-four percent. The sequence matters: the chunking fix did most of the work, and adding the reranker first would have produced a disappointing two-point gain and a wrong conclusion.

What to check before you commit
- Split on document structure before falling back to token windows.
- Test three chunk sizes against a fifty-question set and pick the knee of the recall curve.
- Use ten to fifteen percent overlap, and only where boundaries cut sentences.
- Prepend document title and section path into each chunk’s indexed text.
- Track recall at 3, 5, and 10 separately; they diagnose different problems.
- Re-run the evaluation whenever the corpus or the parser changes, not only at launch.
Chunking is unglamorous work that determines the ceiling of everything downstream. Two days spent on boundaries and measurement usually beats two weeks spent shopping for a better embedding model, and the evaluation set you build along the way keeps paying for itself every time the corpus changes.