Chunking is the part of RAG nobody tunes

01/08/2026 — admin@byqreal.test
Chunking is the part of RAG nobody tunes

Chunking determines what retrieval can possibly return. Fixed-size splits cut sentences and separate claims from their context; splitting on document structure with a little overlap, and prepending the section heading to each chunk, consistently outperforms the default character-count approach.

Chunking is the least discussed step in RAG and one of the most decisive. Retrieval can only ever return a chunk, so how you cut the text sets a hard ceiling on what any amount of downstream cleverness can find.

Why fixed-size splitting disappoints

The default in most tutorials is to cut every N characters with some overlap. It is easy and it is indifferent to meaning.

A cut lands mid-sentence. A table is separated from the paragraph explaining it. A qualifying clause — "this applies only to annual plans" — ends up in a different chunk from the rule it qualifies, so retrieval can return the rule without the exception.

The orphaned chunk problem

A chunk reading "It must be enabled before the first sync" is useless in isolation. What must? The document knew; the chunk does not.

Prepending the document title and the current heading to every chunk fixes this almost entirely, and it improves embedding quality at the same time, because the topic is now present in the text being embedded.

Split on structure instead

Most content already tells you where it divides — headings, sections, list items, function definitions. Using those boundaries produces chunks that are coherent units of meaning rather than arbitrary slices of characters.

Cap the size for the occasional enormous section, and merge trivially short ones with their neighbour. Otherwise let the document's own shape decide.

Match the strategy to the content

Prose splits well on paragraphs and headings. Code splits on function and class boundaries; a chunk that ends mid-function retrieves badly. Conversation logs split on turns. Reference tables often should not be split at all.

One splitter applied to every content type is a compromise nobody chose deliberately, and it usually shows up as one document type that mysteriously never retrieves well.

Measure it directly

Chunking is easy to evaluate in isolation, which is what makes it worth tuning first. Take questions with known answers, check whether the chunk containing the answer is retrievable at all, and iterate on the splitter.

That loop is fast, and the gains are usually larger than a reranker will give you.

Frequently asked questions

What chunk size should I use?

Size is the wrong primary question. Split on structure first and let size fall where it does, with a cap. A section of 200 words and one of 600 are both fine; a 400-character slice that begins mid-sentence is not.

Does overlap not waste storage?

It does, and storage is the cheapest thing in the pipeline. A ten to fifteen percent overlap costs very little and prevents the failure where the answer sits exactly on a boundary.

Sign in to react.
Share this post.

Comments

Sign in to join the conversation.

No comments yet. Be the first.

Don't miss this

You might also like

Embeddings explained without the linear algebra
Embeddings explained without the linear algebra
06/09/2026 — admin@byqreal.test

An embedding turns text into coordinates, and nearby coordinates mean related meaning. That single idea is what makes se...

Why models hallucinate, and what actually reduces it
Why models hallucinate, and what actually reduces it
31/08/2026 — admin@byqreal.test

Hallucination is not a glitch that a better model will one day remove. It is what generation does when it has nothing to...

Giving an agent memory without giving it amnesia
Giving an agent memory without giving it amnesia
17/08/2026 — admin@byqreal.test

Memory is not a feature you enable. It is a set of decisions about what to keep, what to summarise and what to let go —...