Skip to content

Glossary · AI and automation

Prompt injection

Prompt injection is an attack in which text the model reads—an email, a web page, a PDF—contains instructions that try to hijack its behavior. The model can’t reliably tell the data it is processing from the instructions it should follow.

Prompt injection: the details

There are two variants. In the direct one, whoever is writing to the assistant tries to get around its rules. In the indirect one, the instruction travels hidden in the content: a résumé with invisible text asking for a high score, or an email ordering the inbox to be forwarded. The second is the dangerous one in an agent with tools, because the attacker doesn’t need access to the system: it’s enough for the agent to read something of theirs.

No filter today prevents it completely, and it ranks as the first risk on OWASP’s list for applications built on language models. What works is limiting the damage: minimal permissions per tool, separating what the agent can read from what it can do, human confirmation for actions with outside effects and no secrets inside the prompt.

Prompt injection in a project

We design every automation assuming some document will arrive with hostile instructions. Credentials never live in the prompt, writing tools ask for confirmation, and we test the system with booby-trapped texts before it goes to production.

On this site

Where we apply it

All services

Glossary

Related terms

See the whole glossary

Get started

Does this come up in your project?

Tell us which system you have and what is still done by hand. We’ll tell you where we would start and whether it fits.

Before you write, see how we price a project or our solutions by department.

Fig. 07Morse keyH · E · L · L · O