Skip to content

GlossaryFloor 2 · The Harnessthe block and its bolted-on plates: what gets added to itFloor 2 · The Harness

chunking

No. 065 · v2026-08FR: découpage (chunking)

Chunking consists in cutting your documents into fragments before indexing them, since it is a fragment, and not a whole document, that the search will return. Like cutting a manual up into index cards: the cut decides what will be found again, and what will remain incomprehensible.

What it is not

Chunking is not tokenisation. Tokenisation is done by the model, on any text it reads, and nobody adjusts it; chunking is a decision you take about your documents, before they are even indexed. Nor is it an implementation detail: in a document search system it often weighs more heavily on quality than the choice of model, and it is almost always dealt with last.

In depth

The trade-off

The trade-off is easy to state and hard to settle. Short fragments give a search that is precise but amputated: the clause comes back without the article that conditions it, the table without its caption, the answer without the question. Long fragments preserve the context but dilute the meaning: their representation becomes a blurred average that no longer resembles anything, and the search misses them. No universal size exists, because the right unit depends on the structure of your documents.

Cutting by structure

The robust solution consists in cutting according to structure rather than by the metre. A contract is cut by article, a manual by section, minutes by agenda item, a web page by heading level. Two additions do the rest: an overlap between neighbouring fragments, so that a sentence straddling both is lost by neither, and a reminder header on each fragment, carrying the title of the document and the path of the section, so that an isolated fragment stays readable.

The case of the table

One frequent trap deserves to be named: the table. Cut down the middle, it loses its headers and becomes a series of numbers with no meaning, which the model will interpret confidently. Composite documents, alternating text, tables and images, therefore call for preliminary processing that recognises these blocks and keeps them whole. It is a job of document preparation, often the longest in an internal search project, and it cannot be delegated to a generic library.

Relations where the neighbours live

Check 3 questions · click your answer

Level 1 · Recognise

Why are documents chunked before being indexed?

Level 2 · Distinguish

Your answers quote correct clauses, but amputated of their conditions. Which setting should be adjusted?

Level 2 · Distinguish

What is a reminder header on each fragment for?

No. 065 · v2026-08 · first written in · editorial responsibility Anthony Capirchio

Lexigraph, "Chunking", v2026-08, https://www.lexigraph.org/en/chunking/, CC BY 4.0.

Report

What goes with your message

Entry · Chunking
No. 065 · v2026-08 · /en/chunking

What is this about
0 / 600

It is used to reply to you, and for nothing else. What is recorded