- Glossary
- Prompt injection
Glossary term
Prompt injection
An attack where text crafted by someone else makes a model ignore its instructions or take unintended actions.
Also called prompt injections.
Open lesson 65.1
Threat modelling an agent · Chapter 65, and 4 more lessons below
In plain words
Direct injection comes from the user; indirect injection hides in documents, web pages or tool results. Defend in code, not just in prompts.
Taught in
- 65.1Threat modelling an agentChapter 65, Agent security · main lesson
- 11.4Structuring prompts with XML tagsChapter 11, Explicit criteria, roles and XML tags
- 17.3Coverage: edge cases, adversarial and boring casesChapter 17, Golden sets and error analysis
- 34.5Limiting what a tool can touchChapter 34, Designing good tools
- 39.4Safety: untrusted pages and confirmation stepsChapter 39, Computer use and browser agents
Also in these lessons
Excessive agencyLethal trifectaOWASP Top 10 for LLM applicationsTool poisoningXML tags