# Chunking

- **Canonical URL:** https://getaimath.com/dictionary/chunking/
- **Topics:** [Context, Memory & Retrieval](https://getaimath.com/dictionary/category/context-memory-and-retrieval/), [Retrieval-Augmented Generation (RAG)](https://getaimath.com/dictionary/category/retrieval-augmented-generation-rag/)
- **Last updated:** 2026-11-25

## What is Chunking?

**In one sentence:** Chunking splits long documents into smaller pieces before turning them into embeddings for search.

A 100-page manual is too big to search well or fit into a prompt. Chunking breaks it into sections, paragraphs or fixed-size pieces. Each chunk gets its own embedding, so search can find just the right part.

![Context Window vs. Memory: Your Desk vs. The Filing Cabinet — Simple cartoon comparing the AI Context Window (a small desk that can only fit a few pages right now) with External Memory & Search (a big filing cabinet where a librarian grabs just the 3 pages you need).](https://getaimath.com/diagrams/context-memory-and-retrieval.png)
*Napkin Diagram (Context, Memory & Retrieval): The context window is the small desk the AI can see right now; search grabs the right pages from the filing cabinet.*

## What is an example of Chunking?

Splitting a manual into 500-word chunks so a chatbot can retrieve only the paragraph about "resetting your password."

## Why does Chunking matter?

How you chunk documents strongly affects how good RAG answers are.

## Related Concepts

- [Metadata Filtering](https://getaimath.com/dictionary/metadata-filtering/): Metadata filtering narrows search results using extra information, such as date, author or category, alongside similarity.
- [Chunk Size](https://getaimath.com/dictionary/chunk-size/): Chunk size is how big each piece of a split document is, usually measured in tokens or characters.
- [Text Extraction](https://getaimath.com/dictionary/text-extraction/): Text extraction is pulling readable text out of files, images or web pages.
- [Embedding Generation](https://getaimath.com/dictionary/embedding-generation/): Embedding generation is turning chunks of text into embeddings using an embedding model.
- [Chroma](https://getaimath.com/dictionary/chroma/): Chroma is a free, open-source vector database designed to be simple to use for AI apps.
- [Chunk Overlap](https://getaimath.com/dictionary/chunk-overlap/): Chunk overlap repeats a little text between neighboring chunks so ideas split at the edges are not lost.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/chunking/)
