Chunking is splitting documents into pieces small enough to index and retrieve individually.
The size and boundaries decide what search can find: too large and a chunk mixes topics, too small and it loses the context that makes it meaningful. Splitting along headings and list items usually beats fixed character counts.
A chunk is the unit of retrieval, so it should be a unit of meaning: a section, a procedure, a table with its caption. Overlap between neighbouring chunks, or a pointer to the parent section, helps when an answer straddles a boundary.
Common mistake. Choosing a chunk size once from a blog post and never testing it on your corpus.
In practice. Try two or three strategies, compare recall at k on a retrieval eval, and open fifty random chunks to read them. Tables and code need special handling.
RAG retrieves passages relevant to a question from your own documents and puts them into the prompt so the model can answer from them. It is two systems in sequence, a search step and a generation step. The answer can only be as good as the passages that the search returned.
An embedding is a list of numbers that represents the meaning of a piece of text, produced by an embedding model. Texts with similar meaning get vectors that are close together, which makes semantic search possible. Vectors from different embedding models cannot be compared with each other.
Recall at k is the share of questions for which at least one relevant passage appears among the top k retrieved results. It measures the ceiling of a RAG system: if the right passage is not retrieved, the generator cannot use it. You compute it on a set of real questions with known answer locations.
Cite this page
Eldan Abdrashim. "Chunking." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/chunking.
The date you read it is added when you copy.
BibTeX
@online{abdrashim2026chunking,
author = {Eldan Abdrashim},
title = {Chunking},
organization = {Eldan.ai},
date = {2026-11-23},
year = {2026},
month = nov,
url = {https://eldan.ai/glossary/chunking},
langid = {english}
}