What is prompt injection?
Prompt injection is when text that reaches a language model is treated as an instruction to follow rather than as content to reason about. Because a model receives your instructions and everything else as one stream of text, an attacker who can get words in front of it can attempt to redirect it. The exposure is not that the model is tricked. It is that the system never distinguished the two kinds of text in the first place.
Why it is a design problem, not a filtering problem
A conventional injection attack works because a parser cannot tell a command from data. Prompt injection is the same shape, with one difference that makes it harder: there is no grammar to fix. The model is doing the thing it was built to do, which is follow instructions expressed in ordinary language, and ordinary language has no reserved characters to escape.
That is why blocklists disappoint. A filter can catch the phrasings somebody has already seen, and the space of phrasings is the space of language. A blocklist is a list of the attacks somebody has already written down, and a trained detector is a generalization from the same set. Both are bets on the attacks you have seen, and the useful question is what happens when one arrives that nobody has.
What actually reduces the exposure
Three things, none of which is about detecting the attack. Keep content structurally separate from instructions, so untrusted text arrives in its own field, never concatenated into one string. State an instruction hierarchy, so there is an answer to which instruction governs when two conflict. And bound what a successful attempt could reach, by scoping tools narrowly and requiring a person to confirm anything irreversible.
The third is the one that changes the severity, not the likelihood. Assume an attempt eventually succeeds and ask what it can do. If the answer is draft a wrong sentence, you have a quality problem. If the answer is send an email from your domain, you have a different one.
How to tell whether it applies to you
It applies wherever text you did not write reaches a model. That includes the obvious case of a user typing into a chat box, and the less obvious ones: a document your assistant retrieves, a web page it fetches, a ticket a customer filed, the output of a tool it called.
The narrower your system, the smaller the surface. A model answering only from its own weights and one message has one input path. A system that reads documents has as many as it has documents.
Common questions
- Is prompt injection the same as jailbreaking?
- They overlap and they are not the same. Jailbreaking is a user persuading a model to drop its own restrictions, and the person doing it is the person who wanted the output. Prompt injection is a third party getting instructions in front of a model that somebody else is using, which is what makes it a security concern rather than a policy one.
- Can a better system prompt fix it?
- It helps and it is not sufficient. Telling a model to ignore instructions found in retrieved content raises the effort required, and it is a request rather than a boundary, because the instruction and the attack are the same kind of text to the model. Treat it as one layer and put a real limit underneath it.
- Does using a bigger or newer model solve it?
- Not on its own. Instruction-following is the capability being exploited, so a model that follows instructions better is not obviously safer. Improvements in refusal behavior move the odds; they do not change what the system lets a successful attempt reach.
- How would we know it had happened?
- Only if you kept enough of the request to reconstruct it. That means the prompt, the retrieved context and any tool calls, not just the final answer. Without the context, two identical questions that produced different answers look like model noise, not the trace of an attack.
- Where should we start if we have done nothing?
- With the two questions that bound severity: what can this system reach, and what does it do without asking anyone. Narrowing those is worth more than any amount of input filtering, because it changes what a successful attempt costs you rather than how often one succeeds.
Find out where you stand
The assessment on this site asks up to 21 questions about what your system can reach, and returns a score, a verdict and, where a control is short, the one thing to fix first. It takes about ten minutes, and questions your deployment shape has no surface for are dropped rather than scored against you.
It is a self-assessment of design and evidence, not a penetration test, not an audit of a running system, and not a certification.
Run the assessment