AIP-C01 practice question: Preventing harmful or unwanted output
AI Safety, Security, and Governance 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 regional bank runs a loan explainer assistant for its website. It drafts plain-language explanations of mortgage terms and fees for customers, using a model on Amazon Bedrock through the Converse API.
The compliance team bans the assistant from giving personal investment advice, and a generated reply that does so must never reach a customer. When a reply is blocked, the customer must see an approved message from the bank instead of a generic model error.
The compliance team also wants a weekly count of blocked replies, without building any custom scanning code.
Which solution meets these requirements with the LEAST custom code?
Choose one answer.
AA. Add an instruction to the system prompt that forbids investment advice, write every reply to Amazon S3, and have the compliance team review a sample of those files each week for policy violations.
BB. Pass each generated reply through an AWS Lambda function that searches for a list of banned phrases, and return a fixed message from the function whenever one of the phrases matches.
CC. Create a guardrail with an investment advice denied topic, and attach it to the Converse calls so that it checks only the customer's question, refusing unsafe questions before the model runs.
DD. Create a guardrail with an investment advice denied topic and the bank's approved text as its blocked output message, attach it to Converse, and chart its CloudWatch metrics.
Show the answer and explanation
Answer: D
A. Wrong: A system prompt instruction asks the model to behave, but it is not an enforced control, so a reply can still break the rule. Weekly sampling also finds violations only after customers have already read them, so it misses the in-line blocking requirement.
B. Wrong: The Lambda function blocks replies in line, but phrase matching misses advice written in other words and needs constant upkeep. It also means writing and maintaining custom scanning code, which the bank wants to avoid.
A guardrail's denied topic applies to model replies as well as user inputs, so unsafe advice is blocked before a customer sees it. The blocked output message supplies the approved wording, and the guardrail metrics give the weekly count without custom code. A system prompt and sampled logs are not enforced controls, and an input-only check never inspects the reply.
Want more on Preventing harmful or unwanted output? The 5 full-length practice sets have 5 more Preventing harmful or unwanted output questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →