Reference · Glossary
Chunking
Splitting long documents into **smaller pieces** before embedding or retrieval so RAG systems can find the right passage.
When to use
PDFs, wikis, manuals, codebases — anything too long to paste whole into a prompt.
When not to
Tiny FAQs or single emails often work without chunking if they fit the context window.
Example
A 40-page handbook → chunks of ~500 tokens with slight overlap so sentences split across boundaries still retrieve well.