A bank runs a public chatbot that answers questions with models on Amazon Bedrock. The chatbot must refuse to give investment advice, and it must block hateful or violent content in both user questions and model answers.
The compliance team wants these rules enforced by a managed setting, not by instructions written in the prompt. The bank expects to switch to a different Bedrock model next year, and the same rules must apply after the switch.
Which TWO actions meet these requirements? (Choose two.)
Choose two answers.
AA. Add a system prompt to the chatbot that tells the model to decline investment questions and to avoid hateful or violent language.
BB. Create an Amazon Bedrock guardrail with a denied topic for investment advice, and content filters for hate and violence.
CC. Add a Lambda function in front of the chatbot that rejects any message that contains a word from a banned-word list.
DD. Pass the guardrail identifier and version in the guardrailConfig field of each Converse call that the chatbot makes.
EE. Turn on model invocation logging, so the compliance team can review each request and response every day.
Show the answer and explanation
Answers: B, D
A. Wrong: Instructions in the prompt depend on the model following them, so they are not an enforced setting. The compliance team has ruled out relying on prompt wording.
C. Wrong: A word list catches exact words, but a question about which stocks to buy contains none of them, so the topic rule is missed. The list also adds code that the team must keep in step with the rules.
E. Wrong: Logging records requests and responses for review, but it does not refuse or block anything. It is an audit tool, not a filter for the chatbot.
Explanation
A Bedrock guardrail holds the denied topic and content filters as a managed resource. Passing it in guardrailConfig on the Converse call applies those rules to the input and the output, regardless of which Bedrock model answers. Prompt wording, word lists and logging do not block content by themselves.
Want more on Guardrails and securing AI agents? The 5 full-length practice sets have 14 more Guardrails and securing AI agents questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →