Course menuAIP-C01

Exams / AIP-C01 / Study guide / Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda)

Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda): AIP-C01 study notes and practice questions

What to know about Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda) for the AIP-C01 exam, from the Foundation Model Integration, Data Management, and Compliance domain (31% of the exam guide), then 1 free question to test it. Part of the AIP-C01 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

AIP-C01 asks which chunking strategy fits a document type, how to keep answers complete, and what a managed knowledge base can and cannot do.

Strategies and when they fit

Strategy Use it for
Fixed-size Uniform prose such as articles. You set a token count and an overlap percentage so a fact cut at a boundary still appears in the next chunk.
Hierarchical Long, structured manuals and policies. Small child chunks give precise matches, and the retriever returns the larger parent chunk so the model sees the whole section.
Semantic Long documents where the topic shifts often. Splits fall where the meaning changes, at the cost of extra model calls during ingestion.
Custom transformation Lambda Domain-specific boundaries, such as one chunk per code function or per legal clause, or extra metadata added to each chunk.
None Each item is already a self-contained unit, such as a short FAQ entry, so one file equals one chunk.

Managed versus non-managed

The fully managed Amazon Bedrock knowledge base offers fixed-size, hierarchical and no chunking. It does not offer semantic chunking. If a scenario requires semantic splitting, choose a knowledge base where you control the settings, or chunk in your own pipeline and send the pieces with direct ingestion.

Sizing and the embedding limit

Every chunk must fit the embedding model’s input token limit. Chunks that are too large dilute the signal and waste context window tokens. Chunks that are too small lose the surrounding facts an answer needs. Tune the size against a set of real questions, and measure context relevance and answer completeness in a RAG evaluation rather than guessing.

How to choose

Scenario wording Choose
“Uniform articles, keep sentences whole” Fixed-size with overlap
“Long manual, answers need the surrounding section” Hierarchical parent and child chunks
“Topics shift inside one long document” Semantic chunking in a non-managed knowledge base
“Split legal clauses or source code at custom boundaries” Custom transformation Lambda
“Short FAQ entries, each already complete” No chunking
“Fully managed, semantic splitting required” Chunk in your own pipeline and use direct ingestion

Common traps

  • Choosing semantic chunking for a managed knowledge base, which does not offer it.
  • One chunk per whole file for long documents, so many unrelated topics compete in one embedding.
  • Zero overlap on fixed-size chunks, which can split a key fact across two pieces that each miss part of it.
  • Changing chunking settings without re-ingesting existing documents, so old content keeps the old chunks.
  • Blaming chunking for a ranking problem. If the right chunk exists but ranks low, add hybrid search or a reranker instead.
  • Tiny chunks with no parent context, which return precise but incomplete answers. Hierarchical chunking fixes both size problems.

See also Embeddings and Hybrid search and reranking.

Try the 1 practice question

A payments company loads about 15,000 plain-text terms-and-conditions documents into a knowledge base. Each document is a uniform block of paragraphs with no headings, tables or nested sections.

Support agents ask questions whose answers can sit anywhere in a document, often across a sentence break. The team wants a chunking setting that is simple to configure and cheap to run, with no code to maintain.

The embedding cost should stay close to the number of tokens in the documents.

Which chunking strategy meets these requirements?

Choose one answer.

  1. A. Use hierarchical chunking with parent chunks of about 1,500 tokens and child chunks of about 300 tokens, so that each answer can be matched at the child level and expanded to its parent.
  2. B. Use semantic chunking, which uses embeddings to find topic boundaries in each document and creates chunks at those boundaries, for the best matches on long text.
  3. C. Write a custom transformation Lambda function that splits each document on paragraph breaks and attaches the chunk metadata, so that the chunks follow the paragraphs of each file.
  4. D. Use fixed-size chunking with chunks of about 300 tokens and a 20 percent overlap, so that each sentence near a boundary appears in two chunks and the document is split evenly.
Show the answer and explanation

Answer: D

  • A. Wrong: Hierarchical chunking works on any text, but it adds parent and child size settings and stores larger parent chunks that are returned in place of the matched child chunks. Uniform paragraphs gain nothing from that extra setup, so fixed-size chunking is the simpler fit. Learn more: Chunking strategies (opens in a new tab)
  • B. Wrong: Semantic chunking embeds the sentences to find boundaries, which adds embedding cost on top of the indexing cost for every document. It also misses the cost requirement that the embedding spend stay close to the token count.
  • C. Wrong: A custom Lambda splits well, but the team would write and maintain the code, which the requirement forbids. Paragraph splits also give uneven chunk sizes, which the uniform-text case does not need. Learn more: Use a custom transformation Lambda function (opens in a new tab)
  • D. Right: Fixed-size chunking is a built-in setting with no code to maintain, and it splits uniform text evenly. The overlap keeps sentences that cross a boundary whole, and the embedding cost stays close to the token count, which meets every requirement. Learn more: Chunking strategies (opens in a new tab)

Explanation

Uniform text needs no structure-aware splitting, so fixed-size chunks with overlap give even chunks, sentences that are not cut off, and a built-in setting with no code. Hierarchical, semantic and custom chunking each add structure, embedding cost or code that this content does not need.

Study

Want more on Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda)? The 5 full-length practice sets have 6 more Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Chunking strategies (fixed-size, hierarchical, semantic, custom Lambda)

More Foundation Model Integration, Data Management, and Compliance topics