Prompt injection

An attack where instructions hidden in content a model reads try to override the instructions it was actually given.

term

A model reads everything in its context as text, and it cannot always tell your instructions apart from words that merely appear in a web page, email or document it was asked to process. Prompt injection takes advantage of that.

Someone plants text such as “ignore your previous instructions and do this instead” in content the model will read. If it works, the model follows the planted instructions rather than yours.

This matters most for agents that can take actions, like sending messages or changing files. Sensible defences include limiting what an agent is allowed to do, treating outside content as untrusted, and keeping a person in the loop for anything important.

Example

An assistant asked to summarise a web page finds hidden text telling it to send the user’s files elsewhere; a well-guarded setup refuses or asks first.

Related