Domain 1: Foundation Model Integration, Data Management, and Compliance (Part 3 of 3)
This lesson covers 4 exam topics: Query Handling and Retrieval Access Patterns, Instruction Frameworks and Conversation State, Prompt Management, Governance and QA, Advanced Prompting and Bedrock Flows. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.
1. Query Handling and Retrieval Access Patterns
Central question: How do you turn a messy user question into good retrieval, and give models a standard way to retrieve?
Query handling (skill 1.5.5)
| Technique | Does | AWS |
|---|---|---|
| Query expansion | Add synonyms or rephrasings | Bedrock FM call before retrieval |
| Query decomposition | Break a complex question into sub-queries; may run several retrievals | Knowledge Bases query decomposition option (verified); or Lambda |
| Query transformation | Rewrite, classify, route queries in steps | Step Functions |
| Agentic retrieval | Multi-hop: sub-queries across several KBs, checks sufficiency | Managed Knowledge Base (verified) |
Consistent access (skill 1.5.6)
- Function calling / tool use: expose vector search as a tool the model can call (Converse API tool use).
- MCP clients for vector queries: managed Knowledge Bases integrate with AgentCore Gateway so any MCP-compatible agent can call the KB as a tool (verified).
- Standardised retrieval APIs (for example Bedrock Retrieve and RetrieveAndGenerate) so every app retrieves the same way (design guidance).
Exam traps
- One retrieval for a multi-part question ("compare our 2024 and 2026 policies").
- Custom retrieval code per app instead of a shared tool or API.
- Expansion without limits, flooding the context with weak matches.
2. Instruction Frameworks and Conversation State
Central question: How do you control what the model does, and remember the conversation?
Instruction frameworks (skill 1.6.1)
| Control | Role |
|---|---|
| Bedrock Prompt Management | Stores prompts with role definitions, variables, variants and versions (verified) |
| Bedrock Guardrails | Enforces responsible-AI rules outside the prompt: content filters, denied topics, PII, grounding (verified) |
| Template configurations | Fixed response formats; structured outputs constrain responses to a JSON schema (verified) |
Rules in the prompt guide behaviour; guardrails and schemas enforce it (design guidance).
Conversation state (skill 1.6.2)
- Amazon DynamoDB to store conversation history per session.
- Amazon Comprehend for intent recognition to route the conversation.
- Step Functions for clarification workflows: ask a follow-up question when input is ambiguous, then continue.
- AgentCore Memory for short- and long-term memory in agents (verified).
- Trim or summarise history to control tokens (design guidance).
Exam traps
- Only prompt instructions for compliance rules that must be enforced.
- Storing chat history in the prompt forever instead of a store plus summarisation.
- No clarification step for ambiguous requests.
3. Prompt Management, Governance and QA
Central question: How do teams keep prompts consistent, approved, traceable and tested?
Governance (skill 1.6.3)
| Need | AWS |
|---|---|
| Parameterised templates, variants, versions | Bedrock Prompt Management (verified) |
| Approval workflows | Versions plus a review step before a version is deployed (design guidance) |
| Template repository | Amazon S3 (versioned bucket) or source control |
| Track usage | AWS CloudTrail (who called which API) |
| Log access | CloudWatch Logs |
Quality assurance (skill 1.6.4)
- Lambda checks that outputs meet expectations (format, required fields, banned content).
- Step Functions runs edge-case test suites.
- CloudWatch tracks prompt regression: quality metrics per prompt version; alarm when a new version scores worse (design guidance).
- Keep a golden set of inputs with expected outputs; run it on every prompt change.
Exam traps
- Editing prompts in production with no version or approval.
- No regression tests, so a "small wording change" breaks a format.
- Prompts scattered in code instead of a managed, versioned store.
4. Advanced Prompting and Bedrock Flows
Central question: How do you move beyond a single prompt to reliable, multi-step prompt systems?
Refining prompts (skill 1.6.5; design guidance)
- Structured input components: label sections (instructions, context, data, question).
- Output format specifications: schema, field list, length.
- Chain-of-thought instruction patterns for multi-step reasoning.
- Feedback loops: score outputs, refine the prompt, re-test.
Amazon Bedrock Flows (skill 1.6.6; verified)
- The guide calls it Prompt Flows; the service is now Amazon Bedrock Flows.
- Build end-to-end GenAI workflows with a visual builder, linking prompts, FMs, knowledge bases and AWS services such as Lambda.
- Deploy immutable workflow versions to move from testing to production.
- Supports sequential prompt chains, conditional branching on model responses, reusable prompt nodes (from Prompt Management) and pre- and post-processing steps.
Prompt chaining vs one big prompt (design guidance)
| One big prompt | Prompt chain |
|---|---|
| Simple, one call | Each step small and testable |
| Hard to debug | Failures isolated to a step |
| One model for everything | Cheap model for easy steps, strong model for hard ones |
Exam traps
- One giant prompt for a multi-stage task that needs branching.
- Calling it "Prompt Flows" and missing that it's now Bedrock Flows (the exam may use either name).
- No post-processing validation between steps.
References
- AIP-C01 Domain 1 — checked Oct 19, 2026
- KB query configuration — checked Oct 19, 2026
- Knowledge Bases — checked Oct 19, 2026
- Prompt Management — checked Oct 19, 2026
- Guardrails — checked Oct 19, 2026
- Structured outputs — checked Oct 19, 2026
- CloudTrail — checked Oct 19, 2026
- Amazon Bedrock Flows — checked Oct 19, 2026
Check your understanding
"Compare the refund rules in the US and EU policies." Technique?Show answerHide answer
Answer
Query decomposition.Guarantee output matches a JSON schema?Show answerHide answer
Answer
Bedrock structured outputs.Who changed which prompt, and when?Show answerHide answer
Answer
CloudTrail plus Prompt Management versions.Visual workflow linking prompts, a KB and a Lambda function?Show answerHide answer
Answer
Amazon Bedrock Flows.Let any MCP agent query the knowledge base?Show answerHide answer
Answer
Managed KB through AgentCore Gateway.