Treat retrieved instructions as untrusted content
Documents, webpages and messages can contain text that looks like instructions to the agent. Keep that material separate from the user's authorized task and the system's operating rules. Validate proposed tool actions against the intended workflow, especially when retrieved content requests disclosure, changes destinations or asks for unrelated actions. Prompt wording alone is not a complete defense.
Worked example
Illustrative scenario; not a claim of measured client results.
A support document might contain a malicious sentence telling the agent to send account data to another address. The agent should treat it as document content, not authorization. A restricted tool interface should also prevent the transfer. Test such scenarios using harmless synthetic data and confirm that the workflow continues with the legitimate task or escalates appropriately.
Checks, limitations and next decisions
Inspect failures across retrieval, planning and execution rather than assuming that detecting a suspicious phrase solves the problem. Keep sensitive data and consequential permissions limited. Require meaningful approval where the action warrants it. Review source provenance and tool outputs, but remember that a normally trusted source can still contain compromised or user-generated material.
A practical starting point
Work through these checks in order. Use the results to decide what needs to change in your own workflow.
- Separate trusted task instructions from external content.
- Validate requested actions against the authorized workflow.
- Test documents that ask the agent to disclose data or change its objective.
A mistake to avoid
Do not assume a warning in the prompt is sufficient protection for unrestricted tools.
How to check progress
Measure whether adversarial content causes unauthorized actions or data exposure.
Your action checklist
Use this checklist while reviewing your own setup. Checkmarks are temporary and stay in this open page.
For the wider decision process, read Choosing an agent when a workflow is not a fixed script.
Further reading
Official background resources for this topic. The workflow above is general guidance, not a guarantee of a particular result.
AI-assisted editorial content. Examples are illustrative, not client case studies. Read our editorial policy or report a correction.
