PromptForge
AI Glossary

Retrieval & data

Chunking

Also known as: chunk, text splitting

Definition

Chunking splits documents into smaller passages before embedding them for retrieval. Chunk size is a key quality lever: too large dilutes relevance, too small loses the context needed to make sense.

A reasonable starting point is 300-800 tokens per chunk with 10-20% overlap between adjacent chunks. Overlap prevents a relevant passage being split across a boundary and retrieved without its surrounding context.

Split on natural boundaries — headings, paragraphs, sections — rather than fixed character counts. A chunk that starts mid-sentence retrieves poorly because its embedding represents a fragment rather than an idea.

The highest-leverage refinement is prepending a short context header to each chunk: the document title and section it came from. Retrieval accuracy on ambiguous queries improves markedly, because the embedding now carries the passage's place in the whole.

Example

Prepend to each chunk: "From: 2026 Refund Policy > International Orders" before the chunk text.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.