Architecture Patterns · Established · Intermediate
Chunking
Splitting documents into retrievable passages sized so that each one carries enough context to answer a question.
What Chunking is
Chunking is the quiet determinant of RAG quality. Too small and passages lose meaning; too large and the retrieved text dilutes the signal.
How it works
Strategies include fixed token windows with overlap, structure-aware splitting on headings and sections, and semantic splitting at topic boundaries. Metadata such as title and section is prepended so each chunk stands alone.
Why it matters
Most disappointing RAG systems improve more from better chunking and metadata than from a better model.
Common uses
- →Document indexing pipelines
- →Codebase and policy retrieval
- →Long PDF processing
Strengths
- ✓Cheap to iterate on
- ✓Large quality impact
Watch for
- ✓No universal best strategy
- ✓Re-indexing needed when it changes
Continue exploring
More in this collection
Browse all AI Concepts