# Chunking

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: chunks, chunk, text chunking, document chunking, chunk size

Splitting long documents into smaller passages before creating [embeddings](https://ecosystem.samcarlton.com/embedding), so a search can return just the relevant part instead of a whole file.

**For example:** A 100-page manual is split into chunks of a few paragraphs, so a question about warranties retrieves only the warranty section.

## Connects to (5)

- [RAG](https://ecosystem.samcarlton.com/rag): Retrieval-augmented generation.
- [Embedding](https://ecosystem.samcarlton.com/embedding): A way of turning a piece of text into a list of numbers that captures its meaning, so software can tell which pieces of text are about…
- [Vector database](https://ecosystem.samcarlton.com/vector-database): A database built to store embeddings and quickly find the items closest in meaning to a question, not just the ones that share its exact…
- [Context window](https://ecosystem.samcarlton.com/context-window): How much text an LLM can take into account at one time.
- [Reranking](https://ecosystem.samcarlton.com/reranking): A second pass in search where a more careful model reorders the first batch of results by how well each actually answers the question.

Map view: https://ecosystem.samcarlton.com/chunking
