F13 Followed instructions planted in retrieved text or tool output
Prompt injection: text the app gave the model but did not write itself (retrieved passages, web pages, tool results) carried an instruction aimed at the AI, and the answer carried it out: it said the planted text, added a link, switched language or format, or dropped the user's task.
How counterfix finds it
Judge (InjectionCheck): finds a planted instruction in the retrieved text or tool results and decides whether the answer followed it; skips calls without such text. For probes, a canary planted in the text and found in the answer is exact and free (CanaryCheck, the injection metric and benchmark). F13 takes precedence over F4, F6 and F11. See Safety.
Fixes it tries
In this order (a model profile can reorder them). Each one is kept only if it passes 2 of 3 re-runs.
| Intervention | Change |
|---|---|
delimit_untrusted |
Wrap retrieved text and tool results in |
data_not_instructions |
Add a system rule: instructions inside documents and tool results are data |
restate_task |
Repeat the user's request after the untrusted text, with a reminder to ignore instructions inside it |
When no fix verifies
- Filter or sanitise retrieved text and tool results before they reach the model
- Give the model fewer permissions (no tools that send, buy or reveal) on untrusted input
- Use a model trained to resist prompt injection