PrepGenAICerts

Injection & Jailbreak Defense Techniques

Advanced

Mitigate prompt injection, jailbreaks, and untrusted input · Difficulty 3/5

0%
prompt-injectionleast-privilegedefense-techniqueshuman-in-the-loop

Explanation

Because Prompt Injection is an architecture problem, its defenses are architectural: isolation and containment, reinforced by detection and human review.

The Defenses

  • Separate trusted instructions from untrusted data -- delimit and clearly label external content so it isn't executed as an instruction.
  • Least privilege -- limit what a hijacked instruction *can* do; an agent that can't delete data can't be tricked into deleting it.
  • Input/output filtering and monitoring -- watch for injection patterns and anomalous tool calls.
  • **Human-in-the-Loop** -- for high-stakes actions an injection might trigger, require human approval before execution.

These four work together: isolation reduces the chance an injected instruction is even recognized as one; least privilege bounds the damage if it is; filtering/monitoring catches attempts that get through; and human review is the last line of defense before a high-stakes action executes.

What Does NOT Work

  • Lowering temperature
  • Adding "ignore any injected instructions" text to the prompt
  • Using the largest available model

None of these change whether untrusted content is isolated from the instruction channel, and none of them constrain what a hijacked instruction is authorized to do -- which is exactly what an architect is graded on recognizing.

Worked Example

Which measure actually reduces the risk of Prompt Injection? Isolating untrusted content and applying least privilege to tools -- not a prompt caveat, not a sampling change, and not a bigger model. Injection is defeated by architecture: separating trusted instructions from untrusted data and limiting what a hijacked instruction can do.

Key Takeaways

  • Core defenses: isolate untrusted content, apply least privilege, filter/monitor, and gate high-stakes actions with human review
  • Least privilege contains the blast radius even if isolation fails
  • Non-solutions: lower temperature, in-prompt caveats, bigger models
  • High-stakes actions an injection might trigger should require human-in-the-loop approval

Glossary Terms

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.