RAG chunking divides the sources into passages (chunks) that can be retrieved independently and used as evidence for an answer. There is no universally best count of tokens, the pieces of text a language model splits text into. A useful passage contains the information your people ask for, together with the heading, conditions and exceptions needed to interpret it.
Small passages can make hits more precise while losing context. Large passages keep more of it but can bury important statements among side topics. When choosing a method, weigh how well it finds relevant information, whether it includes all the information needed, how good its answers are and what it costs to run.
An example: a machine builder in Koper with 60 employees makes packaging machines and sells spare parts. Today Maja in customer service searches the service manuals, price tables and the service policy for the answer on every call. Afterwards, an AI knowledge assistant should find these passages for her and suggest an answer with its source.
Key takeaways
- There is no token count that fits every passage. A passage must bring along the conditions and exceptions needed to interpret it.
- First check what is left of your documents after they are read in. If a PDF loses its table headings there, the later splitting cannot reliably recover them.
- Chunk size, result count and context budget interact but are not interchangeable. Record them separately in every experiment.
- Choose the method using your documents and evaluation questions, and treat rechunking as an index migration, a move of the search index.
01 / 13
How do chunk size, result count and context budget differ?
When the assistant answers badly, the obvious suggestion is to make the passages larger or smaller. But three settings together determine how much content a RAG system retrieves:
| Setting | What it measures |
|---|---|
| Chunk size | Content inside one searchable object |
| Result count | How many objects retrieval returns |
| Context budget | How much reaches the language model |
If your service provider makes the passages smaller and leaves the result count unchanged, the assistant may get less context in total. Should the provider increase the result count, many similar passages from the same file may reach the assistant. And a larger context window of the model does not correct a poor selection.
So have these three values recorded separately in every experiment. Only then can you tell whether an improvement came from better boundaries, more candidates or simply more text supplied to the model. The token count alone does not explain the result.
02 / 13
Inspect extraction first
Before anyone talks about passage size, it is worth looking at what is left of your documents after they are read in. Chunking works on the representation that the import delivers. If a PDF already lost its table headings when it was read in, a splitter, the program that cuts up the text, cannot reliably recreate them. Where a wiki macro is missing, the exception it shows stays invisible even in large passages.
You can start this week. Lay out different document types side by side, at the machine builder for example a short policy, a long service manual, a price table, an FAQ page and a scanned appendix. Compare the text that was read in with the original, and mark places where headings, lists or page breaks carry meaning.
In its guide to the chunking phase, Microsoft treats chunking as a separate design step after document analysis and distinguishes methods by the structure of the sources. The guidance recommends choosing the method through experiments with your own collection. The product examples in it are not best values that apply everywhere.
03 / 13
How do four chunking approaches compare?
There are several methods for splitting. Four of them differ like this in their useful starting point and their common risk:
| Approach | Useful starting point | Common risk |
|---|---|---|
| Fixed length | Uniform prose and a simple baseline | Rule separated from exception |
| Paragraph or recursive splitting | Mixed prose | Short passages without context |
| Structure-aware splitting | Manuals with meaningful headings | Extraction fails to preserve structure |
| Semantic splitting | Topic changes without clear markup | Additional cost and less transparent boundaries |
A recursive method typically tries to split at larger natural boundaries first and falls back to smaller units when needed. What matters is how it is actually implemented. The name of the method does not tell you how tables, headings or oversized paragraphs are handled.
Semantic methods are not automatically better either. They can detect where the topic changes, but they must be checked with your language, your terminology and your questions. Extra processing is justified when it improves the kind of failure that matters.
04 / 13
Example: a rule without its exception
In this example, the machine builder's service policy says: "Standard parts can be returned within 30 days." The next paragraph says: "Custom-made parts require separate approval." A customer calls and wants to return a conveyor belt that was made to his measurements. So Maja asks the assistant specifically about a custom-made item.
If the search finds only the first paragraph, the model may issue an incorrect general permission, such as "Yes, returns are possible within 30 days". A larger passage might help, provided it contains both paragraphs. But it could also absorb many other rules and make the relevant statement harder to find.
There are several possible designs. One is a compact search object with both statements and the heading "Returns by part type". Another searches a small passage and then loads the complete rule block it belongs to. Evaluate both variants against the same questions, and note that the example does not show that one of them is measurably better.
05 / 13
Add headings and provenance deliberately
A sentence such as "This applies only to contract customers" is unusable without the statement above it. If the assistant finds only this sentence, Maja does not know what the restriction refers to. So add the necessary section path or title, for example "Service policy > Returns > Custom parts", so that the passage can be understood on its own. But do not repeat the entire table of contents in every passage.
Keep the document identity, version, section, page reference and the audience it applies to for every passage. This information supports filtering, links to the source and later deletion, and it must remain consistent after a new split as well.
Some systems enrich search objects with summaries written by a language model. That can help, but every such summary is an additional claim by the model. Mark it as derived and keep the original text. If a summary drops an exception, it must not silently replace the authoritative evidence.
06 / 13
When does chunk overlap help?
Overlap repeats text at the boundaries of neighbouring passages. It can prevent a cut in the middle of a statement from making it unclear. At the same time, the index gets larger, and the search can return near-duplicate hits.
Do not rely on overlap as general insurance against every structural problem. If the exception is several pages later, a small overlap does little. And where whole paragraphs come back several times, they use up context without adding information.
Check in the experiment whether overlap actually improves the boundary cases that matter. Also count duplicate or highly similar hits. A variant can retrieve better and still produce unnecessarily expensive or repetitive answers if the assembly of the context is not adjusted as well.
Got a workflow like this?
Tell me about it. Honest take and a rough price, usually within a day.
07 / 13
Why do tables need different chunk boundaries?
The machine builder has a price table for spare parts. A table row often depends on the column headings, the unit and the scope. If it is stored as an isolated sequence of numbers, the meaning is lost, and nobody knows any more which number is the price and which is the delivery time. Large tables may need groups of rows with the relevant headings repeated in each group.
An overall question such as "Which three products have the highest value?" is different from looking for one specific entry. Reliable adding up or comparing may require a structured query of the table rather than retrieving a few text passages. So choose the right tool first and only then tune the passage length.
Also check footnotes and tables that continue across several pages. A footnote can change the meaning of a whole column. The PDF guide describes how to prepare documents before chunking decides which parts are searched together.
08 / 13
How do you test chunking with three variants?
Put together a small set of documents that is typical for your business, and questions for which you know where the necessary answer is. At the machine builder, Maja writes down the questions customers ask her on the phone. These include exact part numbers, questions in the customer's own words, rules with exceptions, tables and questions whose answer is spread across several sections.
For example, compare a fixed-length split as a simple baseline, a variant that follows the structure of the documents and a variant that loads the larger section in a controlled way. Initially keep the model, retrieval method, access rules and scoring the same. The actual sizes are experiment settings that should suit your documents, not industry guarantees.
Record the following for each question in a chunking experiment:
- whether the necessary evidence was found
- whether all important conditions reached the context
- whether the answer was correct
Add index size, processing effort, tokens supplied and response time. This shows whether a quality improvement comes at a reasonable cost.
Also include questions that the assistant must not answer because the information is missing from the sources. A chunking change that makes unsupported answers sound more confident does not improve retrieval. Record separately whether the assistant abstains or asks back, and whether it finds the evidence.
09 / 13
Analyze failures by document type
An average across all questions can hide a group where things go wrong. Evaluate short FAQs, long procedures, tables and multilingual sources separately. A method can handle prose well and lose important headings on short lists.
Test German compound words, English terminology and different spellings of part numbers where they actually occur in your work. Translation or normalisation of the text must not alter an exact identifier. In a technical manual, a semantically similar product name may refer to the wrong product, at the machine builder the wrong machine.
Have specialists review especially the cases where retrieval seemed correct but the answer suggests the wrong action. These often involve a missing condition that is overlooked when only the main sentence is compared.
10 / 13
Choose on evidence rather than a universal number
Write down which questions the selected method answers better and which limitations remain. A meaningful decision reads, for example: "Structural boundaries preserve exceptions in our service manuals; large tables use a separate path." A token count alone does not explain this benefit.
Keep a simple comparison variant and the evaluation set, meaning documents and test questions. When new document types are added, you can then reassess the decision in a targeted way. The RAG acceptance plan links retrieval quality to business correctness.
The hybrid-search guide covers the next selection stage.
11 / 13
For your IT team
Combine small retrieval objects with larger answer passages
An application can retrieve small chunks and then load their parent sections. This separates precise discovery from sufficient answer context. It requires stable relationships between children and source sections.
Expansion must not bypass authorization. A larger section containing differently restricted material needs appropriate filtering too. Version and effective period must also match.
Bound the expansion. One relevant hit should not automatically load a hundred-page manual. Define which neighbouring sections are needed and evaluate their contribution on concrete cases with rules that span several sections.
Keep the experiment's source state fixed
Record the exact document revisions used for each variant. If an owner corrects a policy during the experiment, an apparent chunking improvement may actually come from better source content. Either rerun the affected cases across all variants or explicitly evaluate the changed source state separately.
The same applies to permissions. Different role filters can change which passages are eligible before chunking quality is assessed. Keep identities and access state consistent when comparing methods. After selecting the preferred configuration, run a separate permission regression check. This keeps a clear explanation of both quality gains and the access boundary.
Treat rechunking as an index migration
A new split changes identities, results and potentially citations. So plan how old chunks are removed and stored answers are invalidated. Adding a new import without cleanup can leave competing splits of the same document.
Record the processing version so that a failure can be attributed to a changed source or a different split. A separate evaluation index can help with larger changes when effort and collection justify it.
After switching, rerun the deletion and permission tests. The new split must not produce passages without the required metadata. Better retrieval metrics are no progress if access control gets lost.
Check retrieval boundaries on rare document forms
Before you finalise the choice, inspect a handful of actual chunks without their original documents. Can a reviewer identify what each statement refers to, when it applies and where it came from? If not, the passage is probably incomplete as a basis for answers, even if the search finds it successfully.
Repeat that inspection for the largest and smallest passages rather than only for typical examples. Outliers often expose hidden failure modes, such as a single oversized table, a one-line exception or an appendix without its parent title. Resolve these cases explicitly instead of expecting the average chunk size to describe the entire collection. Document how you handle such outliers so that a later change to the splitter does not recreate them.
12 / 13
Take the worksheet
Worksheet
Download the editable CSV table
| Content | Useful unit | Risk |
|---|---|---|
| Policy | Rule, exception, scope | Detached exception |
| Procedure | Step and prerequisite | Action without condition |
| Table | Row and headings | Value without unit |
| FAQ | Question and full answer | Mixed answers |
| Contract | Clause and references | Missing amendment |
Columns to fill in, in the file: Your value / observation, Owner, Next action.
Download the editable CSV table (CSV). Add your own values, owners and open actions. This worksheet contains no measured client results.
13 / 13
Related decisions
These modernagents guides cover related decisions about AI knowledge assistants:
- AI knowledge assistants: sources, access and answers
- Prepare PDFs, scans and tables for RAG
- Improve RAG retrieval with hybrid search and reranking
- Test a RAG knowledge assistant: sources, access and answers
For a workflow review, start with the task, the systems involved and typical exceptions. Discuss it with modernagents.



