Why it matters
Untrusted agents can generate anything. Guardrails constrain output. Understanding shapes safety.
Advertisement
The architecture
Input guardrails: check prompt for injection, policy violations.
Output guardrails: check response for harmful content, PII.
Advertisement
How it works end to end
Gemini safety filters: built-in harassment, hate speech, sexual, dangerous content filters.
Custom guards: business-specific rules (no financial advice, etc.).
Action guards: block destructive tool calls without confirmation.