AI Glossary
Chunking
splitting into chunks, document fragmentation
Chunking is the splitting of documents into smaller pieces before they're turned into embeddings, so that the model receives coherent, relevant chunks of text — a key data-preparation step for RAG.
- It splits long documents into smaller chunks.
- It affects search relevance and answer quality.
- It precedes the creation of embeddings in RAG systems.
Chunking organizes data before it's indexed: long documents are cut into reasonably sized chunks, because a whole file rarely works as a single unit of search. Chunks that are too large blur the meaning, while ones that are too small lose context, so the choice of size and of the overlap between chunks has a real effect on the results.
Each chunk is then turned into an embedding and stored in a vector database. When a question comes in, the system returns the most relevant chunks, so the quality of chunking translates directly into what the model receives as context in a RAG architecture.
Related terms
In guides