Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Chunking

Also: chunks

In plain words

Cutting a long document into smaller pieces so they can be searched and fed to the model.

The fuller definition

Chunking divides documents into smaller units for indexing or processing, often with overlap or preserved structure.

Keep the source attached as a document becomes usable text
A01 · PAGE 2

Delivery may be possible in April.

Subject to inspection.

CHUNK 1 · A01 / P2

Delivery may be possible in April. Subject to inspection.

METADATA

source_id: A01
page: 2
version: original

This fictional example keeps a condition beside the proposition it qualifies. Extraction and chunking should preserve enough context to inspect what the source actually says.

A concrete example

A long contract is divided by clauses while keeping each chunk's document ID and section reference.

The distinction that matters

Bad boundaries can separate a rule from its exception or detach a passage from its heading.

Related terms

Where it is taught

How document-grounded AI answers work

Source and further reading

Sentence Transformers · Semantic search

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC