What is Prompt injection?
Hidden instructions inside text an AI reads, like a support ticket, that trick it into doing something you didn't ask.
Where Prompt injection goes wrong in real apps
Each of these is a short scenario built from a real failure in an app made with AI. Read the answer here, or walk through it yourself in about four minutes.
Working with your AI agent · 5 minutes · Pro
The ticket that gave orders
Your coding agent is connected to your database so it can triage support tickets. One ticket is not quite a question.
Read the fixWhat is prompt injection in AI coding agents?
Prompt injection is when text the AI reads, such as a support ticket, email or web page, contains instructions the AI then follows as if they came from you. If the agent can read private data and send messages, it can leak that data. Limit its access with permissions, not prompts.
Related terms
- Database
- Where your app keeps its data, organised in tables, like a set of spreadsheets.
- Secret key
- A password your app uses to talk to a paid service. Anyone who sees it can use it, and spend your money.
- Authorization
- Checking what someone is allowed to do once you know who they are. Signed in does not mean allowed.
- AI coding agent
- An AI tool that doesn't just suggest code but runs commands, edits files and installs things for you.