AIP-C01 practice question: Prompt chains and flows (Amazon Bedrock Flows, Step Functions)
Foundation Model Integration, Data Management, and Compliance A free question from our original AIP-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.
A motor insurer's claims team wants a workflow that drafts a first response to each new claim. The steps are: classify the claim type, extract the vehicle and incident fields, look up the policy in an internal service, and then either draft a letter or route the claim to an adjuster.
Claims above 10,000 dollars must always go to an adjuster, and the claims analysts, who are not developers, must be able to see and edit each prompt step in a visual editor. Each change must be versioned so the team can roll back a workflow.
The team wants as little glue code as possible between the steps.
Which solution meets these requirements?
Choose one answer.
AA. Put every step into one long prompt that asks the model to classify, extract, decide the routing and draft the letter in a single response, and parse the routing decision from its output.
BB. Build a Step Functions Standard workflow with a Choice state for the amount rule, a Task state for each model call and a Lambda task for the policy lookup, and deploy each change through the team's CI pipeline.
CC. Create a chain of separate Lambda functions, each with a hardcoded prompt that calls the model, and pass the results between functions through an Amazon SQS queue at each step.
DD. Build an Amazon Bedrock Flow with prompt nodes, a Lambda function node for the policy lookup and a condition node on the amount, and call a published version through an alias.
Show the answer and explanation
Answer: D
A. Wrong: One prompt cannot call the policy service, and parsing a routing decision from free text is unreliable for a 10,000-dollar rule. Analysts also cannot edit the steps separately, so the design misses the visual editing and control requirements.
B. Wrong: Step Functions handles the branching and retries well, but the analysts would need to edit state machine code rather than prompts in a visual editor. The workflow also needs glue code for each step, which misses the requirements.
C. Wrong: Hardcoded prompts in Lambda functions are hard for analysts to edit, and the queues add a lot of glue code between steps. Version control of the workflow is also left to the team, so this option misses several requirements.
D. Right: Bedrock Flows connects prompt, Lambda and condition nodes visually, so analysts can edit the prompts and the team needs little glue code. Published flow versions and aliases let the team roll back to an earlier version, which meets every requirement. Learn more: Amazon Bedrock Flows (opens in a new tab)
Explanation
Bedrock Flows combines prompt, Lambda and condition nodes in a visual editor, with versions and aliases for rollback and little glue code between steps. A single prompt cannot reliably enforce the amount rule, while Step Functions and Lambda chains require code that the analysts cannot edit.
Want more on Prompt chains and flows (Amazon Bedrock Flows, Step Functions)? The 5 full-length practice sets have 5 more Prompt chains and flows (Amazon Bedrock Flows, Step Functions) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →