Skip to content

Chunking

Chunk overlap in RAG: what two controlled studies found

Chunk overlap is on by default in common splitters. See what two controlled studies measured, what it costs in index size, and how to test it on your own pages.

By Rose Donaldson, Context Retrieval team · Published

This article was drafted with AI assistance from the sources listed below and edited and published by the Context Retrieval team.

A paired test for chunk overlap
  1. 1Check the unitLangChain's TextSplitter counts overlap in characters by default; LlamaIndex's SentenceSplitter counts tokens.
  2. 2Build two indexesSame pages, splitter, size and embedding model; overlap 0 in one, your current value in the other.
  3. 3Measure bothRecall at k on your question set, plus the chunk count of each index.
  4. 4Read the top-kCount slots taken by neighbouring chunks of the same section.
  5. 5Keep the cheaper oneIf recall does not move, overlap 0 gives the smaller index.

LangChain's TextSplitter and LlamaIndex's SentenceSplitter ship with chunk overlap switched on: each chunk repeats the tail of the one before it, so text near a boundary appears in both chunks. The idea is sound. The question is whether it changes what your retriever returns, and what you pay for it. Two controlled studies give a partial answer, and they do not agree in every setup.

What overlap is, in the units your splitter uses

Before you compare numbers with anyone, check what your splitter counts. LangChain's TextSplitter has a chunk_overlap default of 200 and a chunk_size default of 4000, and its reference describes the overlap as characters; length is measured with len unless you pass another length_function.1 LlamaIndex's SentenceSplitter defaults to a chunk_size of 1024 and a chunk_overlap of 200, both in tokens, and raises a ValueError when the overlap is larger than the chunk size.2 The examples in LlamaIndex's node parser usage guide set chunk_overlap=20 instead.3

So "200 overlap" is roughly a fifth of a LlamaIndex chunk at its defaults, and a twentieth of a LangChain chunk at its defaults, in a different unit. A setting copied from one library to the other means something else.

Study 1: no measurable benefit with a sparse retriever

Bennani and Moslonka (arXiv 2601.14123, 2026) ran an end-to-end evaluation on the short-answer subset of Natural Questions, with English Wikipedia as the corpus, SPLADE as the retriever and Ministral-8B-Instruct as the generator.4 They varied the chunking method (token, sentence, semantic, code), chunk size from 50 to 500 tokens, overlap and the context budget. Their parameters section lists overlaps of 0% or 20%; the finding itself speaks of 10–20%.4

The result: across paired configurations, adding overlap did not improve BERTScore or exact match. The differences stayed within what the authors treat as no measurable change, at most 0.004 in BERTScore and 0.001 in exact match.4 Their explanation is mechanical. With sentence-aware chunking and a sparse retriever, text spilling over a boundary rarely changes which content fills the context; the overlap mostly adds near-duplicates.4

The cost side is arithmetic. For an overlap ratio r, the paper gives the growth in chunk count and index size as 1/(1 − r), so 20% overlap means 1.25 times as many chunks, with more ingestion time and storage.4 Their recommendation is an overlap of zero unless you have evidence that your retriever benefits from the redundancy.4

The limits matter as much as the result. The study did not test rerankers or late-interaction models such as ColBERT, used one generator, and notes that results on Natural Questions may not carry over to specialised domains such as technical documentation.4 It also reports no retrieval metric such as recall; it measures the answers.4

Study 2: it depends on the embedding model

Chroma's technical report (Smith and Troynikov, July 2024) measures retrieval itself, at the token level: recall, precision and IoU of the retrieved tokens against the relevant excerpts.5 Its tables include configurations with and without overlap, which allows a few paired readings for the TokenTextSplitter:5

  • With text-embedding-3-large at 400-token chunks and five chunks retrieved, recall was 89.2 with no overlap and 88.6 with 200 tokens of overlap. Precision was 2.7 in both.
  • With all-MiniLM-L6-v2 at 250-token chunks, recall was 82.4 with 125 tokens of overlap and 77.1 with none. The report reads this as a sign that, for smaller context, overlapping chunks are needed for high recall.

The report also states that "reducing chunk overlap improves IoU scores, as this metric penalizes redundant information."5 Overlap fills the same five slots with repeated text, so less of what you retrieve is new.

Read together, the two studies say something narrower than "overlap helps" or "overlap is useless". In one setup with a sparse retriever, and in one with a large embedding model, overlap did not pay for itself. In another, with a small embedding model and short chunks, it did raise recall. Neither study used heading-split web Markdown.

Why web Markdown changes the question

On pages fetched as Markdown, the first cut is usually the page's own ## and ### headings, as the chunking guide describes. A section boundary is not an accident of a character count: the author put it there, and the next section starts a new idea. Overlap across that boundary repeats the end of one topic at the start of another.

Overlap only does its intended job inside a long section that the splitter had to cut by size. That is the same case the chunk size post covers: if most sections fit under your cap, overlap touches few chunks and mostly adds duplicates where it does.

A paired test on your own pages

The studies give a prior, not a setting. To decide for your corpus, run one paired comparison:

  1. Pick your splitter, chunk size and embedding model, and confirm the unit of chunk_overlap.
  2. Build two indexes from the same pages: one with overlap 0, one with your current overlap. Change nothing else.
  3. Run your question set against both and record recall at k, plus the number of chunks in each index.
  4. For each question, look at the top-k and count how many slots are taken by adjacent chunks of the same section. That is the near-duplicate cost in practice.
  5. Read the questions where the two indexes disagree. If overlap wins, check whether the answer sat across a size-based cut inside one section.

If recall does not move, keep overlap at zero and take the smaller index. If it rises only on long sections, a better fix may be a higher cap or a split on paragraph boundaries for those sections, rather than overlap everywhere. The test above is how you find out on your own corpus.

Footnotes

  1. LangChain reference, TextSplitter. ↩

  2. LlamaIndex API reference, SentenceSplitter. ↩

  3. LlamaIndex documentation, "Node Parser Usage Pattern". ↩

  4. Bennani and Moslonka, "A Systematic Analysis of Chunking Strategies for Reliable Question Answering", arXiv 2601.14123 (2026). ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8

  5. Smith and Troynikov, "Evaluating Chunking Strategies for Retrieval", Chroma technical report (2024). ↩ ↩2 ↩3

Frequently asked questions

Does chunk overlap improve RAG accuracy?

Not in every setup. A 2026 study on Natural Questions with a sparse retriever found that adding overlap did not improve BERTScore or exact match. A 2024 Chroma report found overlap raised recall for one small embedding model at 250-token chunks, but not for a larger model at 400-token chunks. Test it on your own questions.

How much bigger does overlap make the index?

The 2026 study gives the factor as 1/(1 - r) for an overlap ratio r. At 20% overlap that is 1.25 times as many chunks, with the extra ingestion time and storage that come with them.

What is the default chunk overlap in LangChain and LlamaIndex?

LangChain's TextSplitter defaults to a chunk_overlap of 200, described as overlap in characters, with a chunk_size of 4000. LlamaIndex's SentenceSplitter defaults to a chunk_overlap of 200 tokens with a chunk_size of 1024 tokens.

Sources

  1. A Systematic Analysis of Chunking Strategies for Reliable Question Answering (Bennani and Moslonka, 2026) (Paper)
  2. Evaluating Chunking Strategies for Retrieval (Chroma technical report, 2024) (Paper)
  3. TextSplitter (LangChain reference) (Documentation)
  4. SentenceSplitter (LlamaIndex API reference) (Documentation)
  5. Node parser usage pattern (LlamaIndex docs) (Documentation)