Skip to content
Claude Certified Architect – Professional (CCAR-P) Exam Prep

Lesson 22 of 31 · 7 min

x
22/31

Guardrails and Safe Deployment Practices

Video lesson: CCAR-P 22/31: Guardrails and Safe Deployment Practices

Layered controls (verified features, design guidance on layering)

LayerControls
InputAuthentication and rate limits; harmlessness screens; input validation for known injection patterns
PromptSystem prompts that state ethical and legal boundaries and tell the model how to refuse
Model behaviourGrounding (allow "I don't know", quotes, citations); structured outputs
ActionPermission rules, hooks (PreToolUse deny/ask/defer), least-privilege tools, sandboxing
OutputSchema and business-rule validation, content filters, human review for high-risk
EnvironmentContainer isolation, network restrictions, credentials outside the boundary
MonitoringContinuous output analysis for signs of successful injection; telemetry and alerts

Verified specifics from Anthropic's jailbreak-mitigation guide:

  • Harmlessness screen: use a lightweight model such as Haiku 5.5 to pre-screen input, with structured outputs constraining the answer to a simple classification. Haiku 5.5 runs safety classifiers that can decline the screening request itself, so treat stop_reason: "refusal" as a harmful verdict.
  • Input validation: filter known injection patterns (an LLM can create a generalised screen from examples).
  • Prompt engineering: emphasise boundaries and explicit refusal behaviour.
  • Continuous monitoring: analyse outputs and iterate on prompts, validation and filtering.
  • Chain safeguards: combine strategies; the guide shows a multilayer example for a financial advisor bot.

Sandboxing (verified): Claude Code can run Bash commands in a sandbox that restricts filesystem and network access. A permission gate is not a sandbox.

Safe deployment practices (design guidance)

  1. Gate on evaluations: no release if the regression or safety suite regresses (D4.1).
  2. Red-team before launch: adversarial prompts, injection through every data source the agent reads, abuse of every tool.
  3. Stage the rollout: shadow mode (run, do not act), internal users, canary percentage, then general availability.
  4. Feature flags and a kill switch: disable the agent or specific tools instantly without a deploy.
  5. Rollback plan: pinned prompt, tool and model versions; ability to revert quickly (D6.5).
  6. Limits everywhere: budgets, turn caps, concurrency, rate limits.
  7. Incident response: who is paged, how to contain, how to communicate, how to learn.
  8. Least privilege first, widen later.

Exam traps

  • A single guardrail (only a system prompt).
  • Launching to everyone at once.
  • No kill switch or rollback.
  • Safety evals run once at launch, never again.
  • Treating refusal from a screening model as an error to retry blindly.

References

  1. Mitigate jailbreaks and prompt injections — checked Oct 16, 2026
  2. Securely deploying AI agents — checked Oct 16, 2026

Check your understanding

  • How do you pre-screen user input cheaply?Show answer

    Answer

    A Haiku-class model with structured output, treating refusal as a harmful verdict.
  • Order a safe rollout.Show answer

    Answer

    Shadow mode, internal, canary, general availability, with a kill switch.
  • Why is a permission gate not enough?Show answer

    Answer

    It is not a sandbox; add isolation and least privilege.
Previous

Progress is saved in this browser.

Next Lesson