Course menuDVA-C03

Exams / DVA-C03 / Guardrails and securing AI agents / Question 1

DVA-C03 practice question: Guardrails and securing AI agents (1 of 2)

Security A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

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

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.

  1. A. Add a system prompt to the chatbot that tells the model to decline investment questions and to avoid hateful or violent language.
  2. B. Create an Amazon Bedrock guardrail with a denied topic for investment advice, and content filters for hate and violence.
  3. C. Add a Lambda function in front of the chatbot that rejects any message that contains a word from a banned-word list.
  4. D. Pass the guardrail identifier and version in the guardrailConfig field of each Converse call that the chatbot makes.
  5. E. 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.
  • B. Right: Correct. A guardrail can define a denied topic and content filters, and it evaluates both the user input and the model completion. Because it is a separate resource, the same guardrail works after the chatbot switches models. Learn more: Detect and filter harmful content by using Amazon Bedrock Guardrails (opens in a new tab)
  • 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.
  • D. Right: Correct. The guardrailConfig field applies a Bedrock guardrail to the request, and by default it covers all messages in it. This attaches the same rules to every chat turn, whichever model the call uses. Learn more: Carry out a conversation with the Converse API (opens in a new tab)
  • 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.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

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