# Chunking

> Splitting documents into smaller pieces before embedding, indexing, or sending them to a model.

- Category: Retrieval & Grounding
- Stage: Established
- Also called: Document splitting, Text segmentation
- Canonical: https://www.joelcsaji.com/ai-dictionary/chunking

## Plain English

Big documents are cut into useful pieces so retrieval can find the right passage.

## Example

A 40-page handbook is split by headings and paragraphs before being added to a knowledge base.

## Why it matters

Bad chunks create bad retrieval, even when the model is excellent.

## Related

- [RAG](https://www.joelcsaji.com/ai-dictionary/retrieval-augmented-generation)
- [Embedding](https://www.joelcsaji.com/ai-dictionary/embedding)
- [Context Window](https://www.joelcsaji.com/ai-dictionary/context-window)

## Sources

- [IBM: Retrieval-Augmented Generation](https://www.ibm.com/think/topics/retrieval-augmented-generation)
- [Google Cloud Generative AI Glossary](https://docs.cloud.google.com/docs/generative-ai/glossary)
