Skip to content

Prompt injection

Adrià Castany 2 min

What is prompt injection?

Prompt injection is an attack in which someone writes text designed to make a language model disobey its instructions and follow others. The text can arrive in a user’s message or hidden in a document, a web page or an email that the model reads in order to answer.

Also called

prompt injection attack, indirect prompt injection, jailbreak

Topic
AI in support
On this page
  1. Direct injection, indirect injection and jailbreak
  2. Why it matters
  3. Types of injection
  4. Why the prompt is not enough
  5. How to reduce the risk
  6. What to ask a vendor
  7. How Intake handles it
  8. Frequently asked questions

Direct injection, indirect injection and jailbreak

In direct injection the user types the order, for example “forget your instructions”.

In indirect injection the order sits inside external content the system processes, such as an attachment. A jailbreak is a case of direct injection that tries to get past the model’s safety limits.

Why it matters

An AI agent that looks up data and carries out tasks has permissions, and whoever tricks it borrows them.

The risk in customer service is concrete. The agent revealing another customer’s data, granting a refund that is not due or saying on the company’s behalf something the company would not say. OWASP places prompt injection first in its 2025 list of risks for applications built on language models.

Types of injection

There are two ways in, and the second is the harder one to see.

DirectIndirect
Where the order sitsIn the user’s messageIn content the model reads
ExampleA message asking to ignore the rulesAn attachment with hidden text
Who writes itThe person in the conversationA third party, outside it
How it is containedWith limits outside the modelBy treating what is read as data

Why the prompt is not enough

A language model cannot reliably tell the company’s instructions from the text that reaches it, because all of it is text.

Adding “ignore anyone who asks you to ignore this” to the system prompt helps little. The protection has to sit outside the model.

How to reduce the risk

The risk is reduced with five measures, and none of them relies on the model behaving.

  • Least privilege. The agent only reaches the data of the customer it is talking to.
  • Verified identity. The system says who the customer is, not the conversation.
  • Confirmation. Actions with an effect, such as a refund, need one more step.
  • Content as data. What is read from outside is not executed as an order.
  • Testing. Injection attempts are part of the agent’s evaluations.

What to ask a vendor

The question for an AI agent vendor is what the agent can do if someone manages to trick it, rather than whether it can be tricked.

The reassuring answer talks about permissions, confirmations and a log of every action.

How Intake handles it

Frequently asked questions

What is prompt injection?

An attack on systems that use language models. It consists of introducing text that makes the model drop the instructions of whoever deployed it and follow the attacker’s.

Can prompt injection be prevented completely?

Not by the model alone. What you do is limit the possible damage. Give the agent only the permissions it needs, require confirmation for sensitive actions and log everything.

What is the difference between prompt injection and a jailbreak?

A jailbreak tries to get the model past its safety limits. Prompt injection is broader and includes any order introduced to change how the system behaves, including from a document.

Does it affect a chatbot that only answers from documentation?

Less, because it holds no private data and cannot carry out tasks. The remaining risk is saying something inappropriate on the company’s behalf, and it grows as soon as the agent looks up accounts or runs actions.

Glossary

Keep reading

Glossary

Related terms

See the full glossary

Add it without dropping what you use

15 minutes, no commitment