Chunking strategies that decide answer quality
Lesson 1 of 4 in Retrieval Engineering.
The chunk is the unit of retrieval: whatever you split at ingest is what similarity search can find, and what the model receives as context. Split too large and each embedding averages several topics — matches get fuzzy and the context window fills with padding. Split too small and matches are precise but arrive as fragments stripped of their meaning. Every chunking strategy is a position on that tradeoff.
Bedrock Knowledge Bases ships the menu natively: fixed-size (uniform token windows with overlap — the fast default), semantic (split where embedding similarity between sentences drops, so chunks follow topic boundaries), hierarchical (small child chunks matched for precision, their larger parent returned for context), none (documents already the right size index whole), and custom transformation — a Lambda function carrying your own logic (LangChain or LlamaIndex splitters included), with an intermediate S3 bucket for the handoff. Those five are the whole menu the AIP-C01 exam guide expects you to choose between.
| Strategy | How it splits | Wins when | Risk |
|---|---|---|---|
Fixed-size + overlap | Uniform token windows; overlap preserves boundary context | Uniform content at scale; fastest to ship and reason about | Splits mid-thought; topic drift inside a window |
Boundary where sentence-embedding similarity drops | Documents whose structure drifts across topics | Higher ingest cost (runs an embedding model while splitting) | |
Small children embedded for matching; parents returned for context | Long structured documents — contracts, manuals, specs | Larger index and returned-context sizes | |
None (document-level) | Each document indexes whole | Already-small units: tickets, FAQs, chat turns | Big documents embed as mush if misapplied |
Custom (Lambda) | Your code, via the custom-transformation hook + intermediate S3 | Domain structure no preset respects: code blocks, clause numbering | You own the logic's correctness and upkeep |
Interactive sorting exercise: Pick the chunking strategy each corpus is begging for.
Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.