Your AI Agent Can Read the Document. Should It Obey It?
A helpful assistant needs context. A safe assistant also needs to know which context has no authority to give it orders.
The short answer
Treat retrieved documents, web pages and tool results as information to inspect. Enforce permissions in the software that performs actions, limit access and require meaningful approval for consequential changes.
At a glance
- Retrieved information does not gain authority simply because an agent can read it.
- Check permissions where an action is executed.
- Limit tool access and make consequential approvals specific.
The instruction hiding in the reading material
Imagine an assistant checking a supplier document. Halfway through the file, a paragraph tells it to ignore its previous instructions and send the full customer list to an external address. To a person, the request is absurd: the supplier doesn't get to rewrite company policy. An AI workflow needs that same boundary made explicit. OWASP describes prompt injection as a risk when content changes a model's behaviour in unintended ways. The uncomfortable detail is that the hostile instruction can arrive in material the assistant was legitimately asked to read.[1]
Reading access is a different permission
That changes the conversation about helpfulness. An agent may need to read an invoice to explain a discrepancy. It does not automatically need permission to change bank details, export customer records or send a payment. Those are separate business actions with separate consequences. Ask the owner of each workflow to name the smallest set of actions it needs. Then remove everything else. A smaller set of permissions also means a smaller set of actions to investigate when something goes wrong.
Put the lock on the action
OWASP's prevention guidance puts permission checks and parameter validation at the tool boundary. In everyday language, the application that changes the record must check whether the user is allowed to make that change. The model's confidence is not an authorisation decision. For a supplier payment, that might mean validating the account, the amount, the person requesting it and the required approval before the payment service accepts anything. A carefully worded prompt can help guide behaviour. It should not be the only lock on the door.[2]
Connections bring their own responsibilities
The Model Context Protocol makes it possible to connect assistants with tools and data, and its security guidance describes specific responsibilities around authorisation and connected systems. Installing a connector is therefore the start of a security review, not the end of one. Which identity is being used? Which resources can it reach? Can the connection request broader access than the task needs? The answers should be understandable to the person accountable for the business process, not confined to a configuration screen nobody revisits.[3]
Make a suspicious request easy to stop
A useful review screen shows the exact action, the affected record and the proposed destination. It gives the reviewer enough context to disagree. Keep a record of what was requested and permitted without casually copying sensitive content into logs. Rehearse stopping the workflow when something looks wrong. The goal is an assistant that can do worthwhile work within clear authority. Trust grows when a system makes its boundaries visible and a human can still say: that instruction came from a document, and the document does not run this company.
“Cybersecurity cannot remain a department that tells us what went wrong yesterday. It has to become an intelligence system that understands what is happening now—and helps us act before a threat becomes a crisis.”
Questions worth asking
Does retrieval-augmented generation prevent prompt injection?
No. Retrieved material can itself contain hostile instructions. Retrieval needs to be combined with limited permissions, action validation, monitoring and suitable human oversight.
Sources and further reading
Put the perspective into practice.
Explore Security & Technology Intelligence