AIP-C01

Introduction to Input and Output Safety Controls

Protecting FM interactions with Amazon Bedrock Guardrails, custom moderation and defense-in-depth layers, reducing hallucinations with grounding and verification, and defending against prompt injection, jailbreaks and other adversarial inputs.

  • 4 lessons
  • Module quiz

Generative AI applications face risks in both directions. Inputs may contain harmful requests, personal data or attempts to manipulate the model, known as prompt injection and jailbreaks. Outputs may contain harmful content, personal data, or confident statements that are simply false, known as hallucinations. Safety controls keep such content out of every interaction.

Amazon Bedrock Guardrails is the central control. A guardrail applies content filters, denied topics, word filters, sensitive information filters that mask or block personal data, contextual grounding checks that block answers not supported by the sources, and prompt attack detection, to both inputs and outputs; the ApplyGuardrail API extends the same protection to models outside Bedrock. Additional layers, such as Amazon Comprehend checks and custom moderation workflows, provide defence in depth, and grounding with verification reduces hallucinations.

What the exam expects

Questions test choosing the right guardrail policy for a requirement, such as a denied topic to block a prohibited subject or a sensitive information filter to mask personal data. An important principle is that retrieved content and tool output must be treated as untrusted data, because attackers can hide instructions in documents and web pages that an application later feeds to a model.

How this module is organised

Configuring Amazon Bedrock Guardrails Policies explains each guardrail policy and how guardrails are applied. Layering Custom Moderation for Defense in Depth explains additional layers before and after the model. Reducing and Detecting Hallucinations explains grounding and verification, and Defending Against Prompt Injection and Jailbreaks explains the attacks and how to defend against and test for them.

  1. Configuring Amazon Bedrock Guardrails Policies Lesson 1
  2. Layering Custom Moderation for Defense in Depth Lesson 2
  3. Reducing and Detecting Hallucinations Lesson 3
  4. Defending Against Prompt Injection and Jailbreaks Lesson 4
  5. Practise and review
  6. Checkpoint Practice activities across the module
  7. Test your knowledge 4 questions