CertBrain
CoursesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

Amazon Bedrock Guardrails

Amazon Bedrock Guardrails is AWS's main tool for putting responsible AI rules into a generative AI application. You configure a guardrail once, with safeguards for harmful content, off-limits topics, banned words, personal data and factual accuracy, and it checks both what users send and what the…

11 cards
Study this deck

Amazon Bedrock Guardrails

Amazon Bedrock Guardrails is AWS's main tool for putting responsible AI rules into a generative AI application. You configure a guardrail once, with safeguards for harmful content, off-limits topics, banned words, personal data and factual accuracy, and it checks both what users send and what the model returns. The exam expects you to pick the right safeguard for a described need, and to know that guardrails can be tested safely and used outside a Bedrock model call.

What a Guardrail Does

A guardrail sits between your users and the model. It checks the user's prompt before the model sees it, and checks the model's response before the user sees it. When something breaks a rule, the guardrail can stop it and return a message you wrote, such as "Sorry, I can't help with that." Because the guardrail is separate from the model, the same rules work the same way whichever foundation model you choose.

The Six Safeguards

SafeguardWhat it catchesTypical use
Content filtersHarmful categories: hate, insults, sexual content, violence, misconduct, and prompt attacks, each with an adjustable strengthKeep a public chatbot free of toxic text
Denied topicsSubjects you define in plain language, with optional example phrasesA bank's assistant refusing to give investment advice
Word filtersExact words or phrases you list, plus a ready-made profanity listBlocking competitor names or slurs
Sensitive information filtersPersonal data such as names, emails and card numbers, plus your own patternsRemoving customer details from call summaries
Contextual grounding checksAnswers not supported by the source text, or not relevant to the questionCatching hallucinations in a RAG app
Automated Reasoning checksStatements that break a set of logical rules built from your policy documentsVerifying eligibility answers against an HR policy

Denied topics work on meaning, so they catch paraphrases. Word filters only match the exact words you list. AWS advises against using a denied topic to catch a single name or word.

Inputs, Outputs and Actions

Each safeguard can be turned on separately for prompts and for responses, with its own action:

  • Block stops the content and returns your message.
  • Mask replaces sensitive information with a placeholder such as {NAME} or {EMAIL}, so the rest of the text still flows. Only sensitive information filters can mask.
  • Detect takes no action but reports what the guardrail found. This detect mode lets a team see what a guardrail would catch on real traffic, and tune it, before turning blocking on.

Automated Reasoning checks always work in detect mode. They return findings and suggested corrections rather than blocking.

Using a Guardrail

You build a guardrail as a working draft, try it in the console's test window, then save a numbered version. An application then names the guardrail and version when it calls a model through Bedrock. The ApplyGuardrail API runs the same checks on any text without calling a model at all, so you can check a user's question before a RAG search, or check output from a model hosted somewhere else.

On the Exam

Read the need and match the safeguard. A forbidden subject points to denied topics. A specific list of words points to word filters. Personal data that must disappear but leave the rest usable points to masking with a sensitive information filter. Answers that stray from the retrieved documents point to contextual grounding. Answers that must follow formal business rules, with an explanation, point to Automated Reasoning checks. A model outside Bedrock points to the ApplyGuardrail API.

Quiz me on this
A bank wants its customer assistant to refuse any conversation about cryptocurrency investing, however the customer phrases the question. Which Amazon Bedrock Guardrails safeguard should the bank configure?
  1. A word filter listing every coin name
  2. A contextual grounding check
  3. ✓ A denied topic for crypto investing
  4. A sensitive information filter for PII
A call center uses a foundation model to summarize customer calls. Summaries must not contain customers' names or phone numbers, but the rest of each summary must still be delivered. Which configuration meets this requirement?
  1. ✓ A sensitive information filter set to mask
  2. A sensitive information filter set to block
  3. A content filter set to its highest strength
  4. A denied topic named "Personal details"
A company runs an open-source language model on its own Amazon EC2 instances. It wants that model's responses checked against the same Amazon Bedrock guardrail its Bedrock-based apps already use. What should the company do?
  1. Fine-tune the open-source model on safety examples
  2. Move the model to Bedrock Provisioned Throughput
  3. Attach the guardrail to the instances' IAM role
  4. ✓ Send each response to the ApplyGuardrail API
A team has set a guardrail's content filters to high strength and worries it will block legitimate customer messages. It wants to see what the guardrail would catch on real traffic before any customer is affected. What should the team do?
  1. Set every filter strength to none for a week
  2. ✓ Use detect mode and review the traces
  3. Add the legitimate phrases to a word filter list
  4. Turn off guardrail evaluation for responses only
An HR assistant answers employees' questions about benefit eligibility. The rules combine several conditions, such as tenure, hours and location, and the company wants each answer verified against those written rules with an explanation of which rules support it. Which safeguard BEST meets this requirement?
  1. A contextual grounding check
  2. A denied topic for benefits
  3. A content filter at high strength
  4. ✓ Automated Reasoning checks
Amazon Bedrock Guardrails safeguards
Content filters, denied topics, word filters, sensitive information filters, contextual grounding checks, Automated Reasoning checks.
Denied topics vs word filters
Denied topics catch a subject by meaning, including paraphrases. Word filters block only the exact words or phrases you list.
Mask action (sensitive information filter)
Replaces detected personal data with a placeholder such as {NAME} or {EMAIL}, letting the rest of the text through.
Guardrails detect mode
The guardrail takes no action but reports what it detected, so you can tune it before enabling blocking.
ApplyGuardrail API
Runs a guardrail's checks on any text without calling a foundation model, for example on output from a model hosted elsewhere.
Automated Reasoning checks
Verify model answers against formal rules extracted from your policy documents and explain why; they report findings rather than block.