Chunking

Also: text chunking, document chunking

The indexing step of RAG that decides the unit of retrieval. Fixed-size chunks (often with overlap) are simple but can cut facts in half; recursive, semantic, sentence-window and parent-document strategies respect the structure of the text.

Example

A 2,000-token document cut into 500-token chunks with 100-token overlap gives five chunks: 0–500, 400–900, 800–1300, 1200–1700 and 1600–2000, so a sentence straddling token 500 still appears whole in the second chunk.

See it in the lesson: Advanced RAG Techniques →

Related terms

More in Retrieval, RAG & Agents