Prompt injection is text that arrives as data and behaves as an instruction.
The model has no reliable way to tell the two apart, since both are just tokens.
Direct injection comes from the user, who asks the model to ignore its rules.
Indirect injection hides in content the system fetched, which is the more serious case.
A web page, a PDF, an email or a code comment can carry the payload.
The user never sees it and the model reads it as part of its instructions.
The classic line is to ignore previous instructions and do something else instead.
In an agent with tools the consequence is action, not merely a rude reply.
Exfiltrating data through a crafted URL is the standard demonstration.
There is no known complete fix, which is the uncomfortable part.
Delimiting untrusted content and saying it is data helps and is not sufficient.
Real defence is outside the model: least privilege, validated outputs and confirmation for anything destructive.
Treat every model output that reaches a tool as attacker-controlled.
Never let retrieved content decide whether an action is authorised.
Assume the injection will eventually succeed and design so that it cannot do much.