Glossary · Retrieval & generation
Chunking
Dividing source material into retrievable units before indexing. Chunk boundaries, overlap, metadata, and document structure determine whether retrieval returns enough context without flooding the prompt.
Why it matters
The right chunking strategy depends on document shape, query type, embedding model, and evaluation results. There is no universal token size or overlap percentage.
In practice
Keep headings and code blocks intact, attach source metadata, then measure retrieval quality on real questions before tuning size.
Related terms
Browse the learning paths to see this term in context — every lesson is free to read.