Why Chunking Is the Hidden Variable in RAG Quality
Most RAG tutorials spend 80% of their time on embedding models and vector databases. Chunking gets a footnote. That's backwards.
Your retrieval pipeline can only return what it indexed. If a chunk straddles a topic boundary, the embedding is muddied. If chunks are too large, the relevant sentence drowns in noise. If they're too small, you lose the context that makes the sentence meaningful. The embedding model is not magic — garbage in, garbage out.
Five strategies cover most production use-cases:
- Fixed-size — simplest baseline, character or token count
- Recursive — structure-aware splitting on a priority list of separators
- Semantic — split on embedding similarity shifts
- Hierarchical — dual-granularity index (summary + detail)
- Late chunking — embed the whole document first, then pool
Each makes a different bet about where meaning lives in your corpus.
