AWS Cloud Certify · Practice exams

Amazon Bedrock Knowledge Bases for the AIP-C01 Exam: Chunking and Embeddings

Many Domain 1 questions describe a RAG application that returns incomplete or irrelevant context. The cause is often how documents were split or embedded. These notes collect what the Amazon Bedrock documentation says about each chunking strategy and about embedding output.

At a glance

Chunking strategies in Amazon Bedrock Knowledge Bases
StrategyHow it works
DefaultChunks of about 300 tokens that respect sentence boundaries.
Fixed-sizeYou set the maximum tokens per chunk and the overlap percentage.
HierarchicalChild chunks are searched, then replaced by their larger parent chunk at retrieval.
SemanticSplits where meaning changes; uses a buffer size and a breakpoint percentile threshold and a foundation model.
No chunkingEach document is one chunk; no page numbers in citations.

Source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

Key points (7)

Knowledge Bases · Chunking strategies

Fixed-size chunking sets a maximum token count and an overlap percentage; default chunking makes chunks of about 300 tokens that respect sentence boundaries. Hierarchical and semantic chunking exist for content whose context spreads across paragraphs.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

Knowledge Bases · Hierarchical chunking

Hierarchical chunking searches small child chunks but hands the model their larger parent chunks, so it gets more context. Because several children can share one parent, a query can return fewer results than numberOfResults.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

Knowledge Bases · Semantic chunking

Semantic chunking splits text where the meaning changes, so related sentences stay together. You set a buffer size (a buffer of 1 embeds 3 sentences together) and a breakpoint percentile threshold (higher = fewer, larger chunks). It uses a foundation model, so it adds cost.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

Knowledge Bases · No chunking

With no chunking each document is a single chunk, so you must split the files yourself first. You also lose page numbers in citations and cannot filter by the x-amz-bedrock-kb-document-page-number metadata field.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html

Embeddings · Titan Text Embeddings V2

Titan Text Embeddings V2 lets you choose 1024 (default), 512 or 256 output dimensions and returns float, binary or both. Smaller vectors cost less to store and search; normalize defaults to true.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-embed-text.html

Embeddings · Binary vs float vectors

Binary vectors use 1 bit per dimension versus 32 bits for float32, so they are cheaper to store but less precise. If you choose a binary embedding model, the vector store you pick must also support binary vectors.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-how-it-works.html

Troubleshooting · Fewer results than requested

numberOfResults is a maximum. With hierarchical chunking it counts child chunks, and children that share a parent are replaced by that one parent, so you can get fewer results. Tables and figures can also return page-level context that merges results.

Official source: docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html

Where this fits in the exam

Guides that go deeper

Practice this topic

Answer practice questions, then review your mistakes with spaced repetition.

Start a test

More GenAI Developer study topics