Someone picks 512 tokens with 50 of overlap because a blog post said so, and it quietly becomes permanent infrastructure. Nobody revisits it, because no number ever says it is wrong.
Chunk size is a decision about what a complete answer looks like for the questions your users actually ask.
Chunk to the shape of the question
A fact lookup and a procedure have different natural units, and one strategy cannot serve both well.
| Question type | Chunk to | Why |
|---|---|---|
| Specific fact lookup | 200 to 400 tokens, tight boundaries | Precision matters, and extra text dilutes the match |
| Procedure or how-to | Whole section, headings preserved | Step 4 is useless without steps 1 to 3 |
| Comparison or synthesis | Section plus a parent summary | The model needs whole units it can compare |
| Policy or contract clause | Clause boundary, never mid-sentence | A half-quoted clause is a legal problem, not a retrieval one |
Split on structure first, at headings, list boundaries and table boundaries. Fixed-size splitting with overlap is only the fallback for unstructured prose. And carry the heading path into the chunk text itself, so a chunk reading "must be approved within 5 business days" also carries "Expenses > International travel > Approval" and stops being ambiguous.
Rerank before you pack
Retrieve wide and keep narrow: pull fifty candidates from hybrid search and score each one against the full query with a cross-encoder. It is slower per candidate and much more accurate than vector similarity, which is why it runs over fifty documents instead of fifty million. The effect is the right chunk moving from rank 14 to rank 2, and position in the context window changes what the model leans on.
Add a diversity rule at the same step, such as a cap on chunks per document. Five chunks from one document look like strong corroboration and are really one source repeated. The cap costs you on procedures, where one document genuinely holds the whole answer, so set it per question type rather than globally.
Treat the context window as a budget
Bigger windows made this problem less visible without making it any less real.
Every extra chunk costs tokens, adds latency, and gives the model another place to find something plausible but irrelevant. Set the budget explicitly: a chunk count, a token ceiling, and a minimum relevance score below which a chunk is dropped even when room remains. Order the survivors so the strongest evidence sits at the start or end of the packed context, because long-context models tend to use material in the middle least reliably (the "lost in the middle" effect). Label each block with its source ID and section so citations can be generated rather than invented.
Weak evidence deserves a weak answer
The failure that erodes trust fastest is a confident answer assembled from chunks that all scored 0.31.
Pass the scores into the generation step along with the text, and give the system a refusal path. Below the threshold, the honest response states what was searched, says nothing conclusive was found, and offers the closest sources instead of synthesising a paragraph out of near misses.
Set that threshold from data rather than instinct. Run labelled questions through retrieval, some the corpus can answer and some it cannot, and put the line where the top reranker scores of the two groups separate. Too high and the system refuses answers it had; too low and the 0.31 answers come back. Raw scores are not calibrated across models, so re-derive the threshold whenever the embedding model or the reranker changes.
The default: the hotel sentence lands across a boundary.
Question What is the hotel limit per night in London?
The document, cut into chunks
Each band is a chunk; a numbered rule is where the next one starts. Shown: the paragraphs the answer and the retrieved chunks are in.
RetrievedThe answer
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Aug 13, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Decision note · · 2 min read
We chose Azure AI Search for retrieval because ingestion and filtering stay simple
Why our retrieval runs on Azure AI Search: our Databricks ingestion pipelines feed it directly, filtering is simple, and several semantic configurations share one index.
Checklist · · 12 checks
RAG production-readiness checklist
Twelve checks to pass before a retrieval system answers a real user. Tick them locally; progress stays in your browser.
Failure story · · 1 min read
The retrieval cache that served stale policies
A well-meaning cache in front of retrieval kept answering from last quarter's HR policy for eleven days.
Discussion