Treat retrieved content as evidence, not permission. Combine model-facing defenses with application controls that restrict which actions and data flows are possible.
The instruction can arrive inside the evidence
An assistant is asked to summarize a document. Inside the document is a sentence telling the assistant to abandon the summary and perform an unrelated action. The user requested the summary; the document did not gain authority to change that request.
Indirect prompt injection exploits this boundary between instructions and external content. The research by Greshake and colleagues examines malicious instructions placed in data an LLM-integrated application retrieves. [S1] The important distinction is where authority comes from, not whether the suspicious sentence uses a familiar phrase.
Retrieval relevance does not establish permission
A paragraph can be highly relevant to a search query and still contain an instruction that the assistant should not follow. An embedding score measures a retrieval relationship, not the author's right to control the application.
Here is a fictional support workflow. The assistant can read a public product manual and draft a response. A retrieved paragraph includes a request to send the customer's account notes elsewhere. That request is not part of the authorized support task. The application should not treat it as approval to share information.
The same principle applies to tool outputs, email bodies, and text extracted from uploaded files. Correctly quoting or summarizing an instruction is different from executing it.
A detector is one signal
A classifier can help flag suspicious input, but a clean score is not proof that the content is safe. A detector's reported performance depends on its dataset, split, threshold, and attack distribution. Evaluate it with representative benign material as well as adversarial examples.
The BIPIA research studies indirect injection across external-content tasks and explores defenses based on boundaries and reminders. [S2] Those findings motivate testing explicit separation between task instructions and retrieved material. They do not justify declaring arbitrary future documents harmless.
For my fictional support assistant, useful benign test cases would include a manual describing a malicious command as an example and a customer quoting a suspicious email. Flagging every mention of an attack would make the assistant less useful without establishing a sound trust boundary.
Put the strongest controls outside the text
OWASP's guidance includes limiting privileges, separating external content, validating expected outputs, and requiring human approval for consequential operations. [S3] The application should enforce the allowed destination, operation, and data scope rather than relying solely on a sentence in the system prompt.
In the support example, a read-only summarizer can be given read access to the manual without an unrestricted ability to send messages. If sending is a real requirement, the workflow can constrain recipients and require review of the actual draft and attachments before delivery.
These are design choices to evaluate for the application. They reduce exposure even when a model-facing defense misses a malicious instruction, but no checklist establishes universal immunity.
Test the attempted action, not only the final sentence
An evaluation should record what the assistant tried to do, which source carried the instruction, whether a tool call was blocked, and whether any data crossed the intended boundary. A polite final answer does not establish that earlier tool activity was authorized.
I would keep task success and attack resistance as separate measures. A system that refuses every document can avoid some failures while failing its purpose. The useful target is an assistant that completes the legitimate task while external text remains evidence to interpret rather than authority to obey.