Skip to main content

Module 8 · Guardrails & safety

An agent that answers every question is not the same as an agent that's safe to ship. This module teaches guardrails — checks that run before or after the LLM to stop the inputs and outputs you don't want. You'll see how input guardrails catch PII, off-topic requests, and prompt-injection before they reach the model, how output guardrails catch toxic or malformed responses before they reach the user, why a blocked guardrail returns a safe fallback instead of silence, and how to choose between blocking, redacting, and warning — and when an LLM-judged guardrail is worth its per-turn cost. By the end you'll harden your own agent against a red-team suite and watch the attacks get blocked, one guardrail at a time.