Glossary

Chunk overlap

The text that consecutive chunks share when a document is split, so an idea cut at a boundary still appears whole in at least one chunk.

Chunk overlap is the amount of text that consecutive chunks share when a document is split for retrieval augmented generation. If a text splitter cuts chunks of 500 tokens with an overlap of 50, the last 50 tokens of one chunk are repeated at the start of the next. The point is that a sentence or idea straddling a boundary still appears whole in at least one chunk, so the retriever can find it and the model can read it.

Why chunks overlap

Chunking has to draw lines somewhere, and a fixed-size split puts them wherever the count runs out, often mid-sentence or between a claim and its qualifier. Without overlap, the first half of a definition lands at the end of chunk 12 and the second half at the start of chunk 13. Each chunk’s embedding then represents half an idea, and a query about the whole idea may match neither well. Overlap gives every boundary a margin: the text near a cut is embedded twice, once with what came before it and once with what follows. It also helps at answer time, since a chunk that opens with “This limit does not apply to annual plans” is easier to use when the limit itself came along with it.

How overlap is set

Most splitters take two numbers, chunk size and chunk overlap, measured in the same unit. LangChain’s text splitters measure both in characters by default, with defaults of 4,000 and 200, and raise an error if the overlap is larger than the chunk size. LlamaIndex’s sentence splitter measures in tokens, with a default chunk size of 1,024 and an overlap of 200. A recursive splitter works out its boundaries first, so the repeated text usually starts at a paragraph, sentence or word break rather than in the middle of a word.

A common starting point is an overlap of 10 to 20 percent of the chunk size, which is 50 to 100 tokens on a 500-token chunk. Smaller chunks need proportionally more, because each boundary cuts through a larger share of the content. Semantic chunking, which splits where the topic changes, needs less, since its boundaries already fall between ideas; fixed size vs semantic chunking sets out that trade-off.

Overlap

What it does

Best for

None

Each piece of text appears once, and boundaries can split ideas

Content split on headings or semantic boundaries

Small (5 to 10%)

Carries a sentence or so across each cut

Prose split by a recursive splitter

Moderate (10 to 20%)

Keeps most cross-boundary ideas intact

Fixed-size chunks of mixed content

Large (over 25%)

Repeats a lot of text and produces near-duplicate results

Rarely worth it; larger chunks or another method usually do better

The cost of overlap

Overlap is paid for in storage, embedding calls and context. A 20 percent overlap means roughly 20 percent more text to embed and store, and more vectors in the vector database. The larger cost tends to show up at query time. Neighbouring chunks share text, so they score alike, and a top-k retrieval step can return two or three near-copies of the same passage, spending result slots and context window tokens on repeated text. Pipelines with heavy overlap usually add deduplication or merge adjacent hits before building the prompt.

Overlap only fixes one kind of context loss. It cannot restore context from several pages earlier, such as which product or quarter a section is about. That problem is handled by contextual retrieval, late chunking or parent document retrieval. Sentence window retrieval takes another route, expanding each hit to its neighbouring sentences at query time instead of duplicating text at index time.

Chunk overlap and Exabase

Deep Search indexes content stored as Resources automatically, so there is no chunk size or overlap setting to tune and no splitter to maintain. Results come back as passages inside their source document, with page numbers for documents and timestamp ranges for audio and video, and a precision setting controls how many loosely related passages are returned. Exabase does not publish how it splits content internally. If you run your own pipeline, Extract returns a file’s text as ordered chunks with sequence numbers and page numbers or timestamps, which you can page through with the extraction chunks endpoint and recombine with whatever overlap you choose; the PDF to chunks tool does the same for a single PDF.

Chunking is a workaround, not a design makes the case against hand-tuned splitting, RAG accuracy explains sub-document retrieval, and the searching resources guide covers the precision setting. The RAG pipelines use case shows retrieval in production, and best RAG infrastructure compares managed options.

FAQs

What is chunk overlap?

Chunk overlap is the text that consecutive chunks share when a document is split for retrieval. The end of one chunk is repeated at the start of the next, so ideas cut at a boundary appear whole in at least one chunk.

What is a good chunk overlap?

Ten to twenty percent of the chunk size is a common starting point, such as 50 to 100 tokens on a 500-token chunk. Test it against real queries, because the right value depends on the content and the splitter.

Can chunk overlap be too large?

Yes. Large overlaps inflate storage and embedding cost and make neighbouring chunks score alike, so search returns near-duplicates that crowd out other relevant passages.

Do I need overlap with semantic chunking?

Usually less, and sometimes none. Semantic chunking places boundaries where the topic shifts, so fewer ideas are cut in half, though a small overlap still helps with transitional sentences.

Is chunk overlap measured in tokens or characters?

It uses the same unit as the chunk size, which depends on the splitter. LangChain’s text splitters count characters by default, and LlamaIndex’s sentence splitter counts tokens.

Does Exabase use chunk overlap?

Exabase has no overlap setting to configure. Deep Search indexes stored content automatically and returns matching passages with their source document and location.

Related pages: Chunking, Text splitter, Document loader, Recursive chunking, Semantic chunking, Fixed size vs semantic chunking, Sentence window retrieval, Late chunking, Deep Search, RAG accuracy, Deduplication.

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.