GenAI Developer
Amazon Bedrock Knowledge Base Chunking Strategies: Fixed-Size, Hierarchical, Semantic or None
Amazon Bedrock Knowledge Bases offer default chunking (about 300 tokens), fixed-size chunking (max tokens plus overlap), hierarchical chunking (search small child chunks, return the parent), semantic chunking (split where meaning changes) and no chunking. Pick by how your content carries context, then tune retrieval with hybrid search, metadata filters and reranking.
The chunking strategies side by side
| Strategy | How it works | Watch out for |
|---|---|---|
| Default | Chunks of about 300 tokens that keep whole sentences. | No control over size. |
| Fixed-size | You set the maximum tokens per chunk and an overlap percentage. | Can split ideas that span paragraphs. |
| Hierarchical | Child chunks are searched; each match is replaced by its larger parent chunk. | Fewer results than numberOfResults when children share a parent. |
| Semantic | Splits where meaning changes, using a buffer size and a breakpoint percentile threshold. | Uses a foundation model, so it adds cost. |
| No chunking | Each document is one chunk; you split files yourself. | No page numbers in citations and no page-number filter. |
Source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html
Semantic chunking parameters
- Maximum tokens: the cap for one chunk, honoring sentence boundaries.
- Buffer size: how many neighboring sentences are embedded together. A buffer of 1 combines 3 sentences: the previous, the current and the next.
- Breakpoint percentile threshold: how different sentences must be to split them. A higher threshold gives fewer, larger chunks.
When retrieval returns the wrong passages
Chunking is only half of RAG quality. Bedrock Knowledge Bases also let you tune the query:
- Hybrid search combines vector search with raw-text search, which helps with exact terms and acronyms. It works on Amazon RDS, OpenSearch Serverless and MongoDB stores with a filterable text field; otherwise the query uses semantic search.
- Metadata filters (equals, in, greaterThan and others, combined with andAll or orAll) narrow the search. On OpenSearch Serverless the vector index must use the faiss engine for filtering.
- Reranking reorders the retrieved results with a reranker model.
- Query decomposition splits a complex question into sub-queries in RetrieveAndGenerate.
Citations and the prompt template
By default a query returns up to five results. If you customize the generation prompt, keep the `$search_results$` placeholder, and keep `$output_format_instructions$` if you want citations: without it the response has no citations.
Why it matters for AIP-C01
Task 1.5 of the exam is designing retrieval mechanisms, including segmentation, embeddings, vector search, hybrid search, reranking and query handling. Domain 1 is 31% of the exam. See Domain 1 and RAG data: chunking and embeddings.
Frequently asked questions
What is the default chunk size in Bedrock Knowledge Bases?
About 300 tokens, keeping sentence boundaries.
When should I use hierarchical chunking?
When small chunks match precisely but the model needs the surrounding context: child chunks are searched and replaced by their parent at retrieval.
Does semantic chunking cost more?
Yes. It uses a foundation model to find boundaries, which adds model cost.
Why does my knowledge base return fewer results than I asked for?
numberOfResults is a maximum. With hierarchical chunking, children that share a parent collapse into one result.
Sources
AWS updates its programs and documentation. Check the linked official pages for the latest details before you decide or pay.
Practice for AIP-C01
Free AWS Generative AI Developer – Professional practice questions with an explanation for every option. No sign-up.
Keep reading
- GenAI Developer
Amazon Bedrock Guardrails Explained: Filters, PII, Grounding
How Amazon Bedrock Guardrails work: content filters, denied topics, word filters, PII block or mask, contextual grounding thresholds and IAM enforcement.
3 min read - GenAI Developer
AIP-C01 Study Plan: Pass AWS GenAI Developer Pro
A 4-week AIP-C01 study plan built on the official exam guide: domain weights, what is out of scope, the format and how to practice for each domain.
3 min read - GenAI Developer
Bedrock Provisioned Throughput vs Cross-Region Inference
When to use Bedrock Provisioned Throughput, cross-Region inference, batch inference, prompt caching or intelligent prompt routing, with official AWS facts.
2 min read