Build your own RAG pipeline
Fixed-size chunking·4 min

Why chunk at all

0 / 1

An embedding compresses a whole passage into one vector. Embed a 2,000-token document and its meaning blurs into mush — and you can't fit raw documents into a prompt anyway. So you chunk: split each document into smaller pieces, embed each, and retrieve the pieces. Chunking trades retrieval granularity against context coherence, and it is the single biggest lever on RAG quality.

A paragraph sliced into overlapping windows
paragraph tokens:  [ t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 ... ]

chunk A:           [ t0 t1 t2 t3 t4 t5 ]
chunk B:                       [ t4 t5 t6 t7 t8 t9 ]
                                 ^^^^^ shared overlap
Boring-sounding, quality-determining

Chunking is the most boring-sounding and most quality-determining decision in RAG. By the end of this course you'll have a number that proves it.