Prompt Injection Defense Review

Injection risks in an agent design paired with concrete mitigations.

Advanced · Works with ChatGPT, Claude, Gemini, Copilot

The prompt

Review this agent design for prompt injection risk.

Agent's tools and what untrusted content it reads (web pages, emails, user uploads, etc.):
{{AGENT_DESIGN}}

What sanitization or sandboxing already exists:
{{EXISTING_DEFENSES}}

For each source of untrusted content, describe a realistic injection attempt and whether the current defenses would catch it. Recommend the mitigation with the best risk-reduction for the least added complexity, and say which risks would remain even after mitigation.

Why this prompt works

Testing each untrusted source against a concrete attempted injection is more useful than a generic list of injection categories.

How to customize it

  • List every place external, unreviewed text reaches the model
  • Ask what risk remains after mitigation instead of assuming it's solved

Common mistakes

  • Treating input sanitization as sufficient without testing an actual injection attempt
  • Overlooking tool outputs (like scraped pages) as an untrusted input source

Example

Input

Agent design: Agent reads scraped web pages and forwarded customer emails, can send replies

What a good answer looks like

A table of untrusted sources, an example injection attempt, current coverage, and recommended fix.

Make this prompt fit your work

ModelCoach.ai scores your version, shows what to improve and explains why, right inside ChatGPT, Claude, Gemini and Copilot.

Related prompts