Category · Security and compliance
What is prompt injection?
Prompt injection is an attack in which instructions divert an agent from its task. They are typed by the user, or hidden in what the agent reads, such as a document or a ticket. Jailbreaking, by contrast, tries to get around the model’s own rules.
By Laurent Poupet, Claude trainer and artificial intelligence architect · Updated
How it works
- Indirect injection is the most dangerous for an agent, because the booby-trapped text arrives through a document, an email or a page it reads while doing its job.
- The risk grows with permissions; an agent that reads external content and can also send data outside offers a ready-made leak path.
- Resistance is tested with booby-trapped documents replayed at every version, measuring the share of attacks that manage to trigger an action.
The trap to avoid
The trap is believing a filter is enough; no detection is perfect, and the real defence is to limit what the agent can do after reading something.
Related terms
- PromptModels and how they work
- Human approval (human in the loop)Security and compliance
- GuardrailSecurity and compliance
Where this is taught
Track 0 · Preamble: Claude on your computer
Discover Computer Control (Computer Use) and Its Safeguardslesson 5 · 1 hour
Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.