n. / Retrieval
Definition
Chunking is splitting documents into smaller pieces before embedding and storing them, so retrieval can return just the relevant part instead of a whole file.
In more detail
Chunks that are too small lose meaning, and chunks that are too large dilute it and waste tokens. Splitting along natural boundaries such as headings and paragraphs, with a little overlap, usually works better than cutting at a fixed length. Changing your chunking changes retrieval quality, so re-run your evaluation set after any change.
Example
A 20-page handbook is split by section into 60 chunks of about 300 words, each tagged with its heading and page.
