What Amazon Bedrock Guardrails check

Bedrock Guardrails check what goes into a model and what comes out. Content filters, denied topics, word filters, sensitive information blocked or masked, grounding checks and Automated Reasoning; the two safeguard tiers, and what they cost.

GazeekAMAZON BEDROCK DEEP DIVE·LESSON 10
LESSON 10

What Amazon Bedrock Guardrails check

Bedrock Guardrails check what goes into a model and what comes out. Content filters, denied topics, word filters, sensitive information blocked or masked, grounding checks and Automated Reasoning; the two safeguard tiers, and what they cost.

0:00 / 2:13

Diagrams in this video · 1Free in archhy

Copy and edit in archhy: What a guardrail does (new tab)

The diagrams, full size

Copy any of them into archhy, free, and change it for your own system.

After this lesson you can

  • Name the six kinds of guardrail policy
  • Say where a guardrail checks, and what happens when it blocks
  • Choose between the Standard and Classic tiers
  • Know what guardrails cost
Transcript

What Amazon Bedrock Guardrails check

Space Llama here. Part three, Bedrock Guardrails. Because sooner or later, someone will ask your app something it shouldn't answer.

What a guardrail does

A guardrail checks the prompt first, before any model sees it. If it blocks, the model is never called, and the blocked message you wrote goes back instead. Then it checks the model's answer, before your user sees it, unless you choose async streaming. More on that next time. Six kinds of policy. Content filters, for hate, insults, sexual content, violence, misconduct and prompt attacks, in text and images. Denied topics you describe in plain words. Word filters. Sensitive information, like email addresses, blocked or masked. Grounding checks, that an answer sticks to its sources and is relevant to the question. And Automated Reasoning, which checks answers against a policy built from your own document, with formal logic. It reports; it never blocks.

Two tiers

Guardrails come in two tiers. Standard is more robust, works in many languages, detects prompt leakage, and catches harmful content hidden in code. It uses cross-Region inference, so checks can run in other Regions, and your service control policies must allow them. Classic handles English, French and Spanish, with shorter topic definitions.

Good to know

Guardrails are priced per thousand text units, a unit being up to a thousand characters, and each policy is charged separately. Content filters and denied topics, fifteen cents. Sensitive information and grounding checks, ten cents. Word filters and pattern-based sensitive information filters are free. And one surprise. If you log model invocations, text a guardrail blocked or masked still appears in those logs, in plain text. Protect the logs too.

Remember

Let's recap. A guardrail checks the input, then the output, with six kinds of policy, in a Standard or Classic tier. And protect your logs.

Practice and what's next

Next, guardrails in practice, in your own code. See you there.

Gazeek Flash · free

Exam questions on your phone

Free questions on Amazon Bedrock: quick-fire batches and timed exams, on the web or Android.