Treat retrieved content as data with an owner
An assistant may read a customer message, a document or an external page that contains instructions. Those instructions can be relevant text to summarize, but they do not become permission to change the application. Search retrieval does not make content trustworthy, and a document’s apparent authority does not give it control of the workflow.
Keep the source and access context available to the application. Retrieval should respect the requesting user’s data scope. Consider access in document selection, cached results, conversation memory and citations. Filtering the visible answer after retrieving another customer’s private text is too late to establish a retrieval boundary.
Let the model propose, then authorize in code
For an illustrative account assistant, a model can propose an action such as reading an invoice or drafting an update. A trusted application layer validates the tool name and argument schema, resolves the current user and checks permission against the target object. Model output cannot grant itself an additional role or choose a different tenant.
untrusted text→Model
proposed action→Policy + tool
independent checks
The tool should expose the smallest useful operation. A read-only lookup is different from an arbitrary database query. A draft is different from a send operation. Avoid a general-purpose execution tool when the task only requires a narrow business action.
Bind approval to the action that will happen
For a consequential operation, show the person the recipient, target, changed fields and material effect before execution. Bind approval to that exact proposed action and relevant version of the object. If the destination, content or business state changes, evaluate whether the approval is still valid. A generic “continue” button is weak evidence of authority for a materially different action.
Do not let approval override the user’s actual access rights. An employee may approve a proposed action they still are not permitted to perform. Recheck authority at execution, and define duplicate-request handling so retries do not repeat an irreversible operation. Keep the decision record useful without logging secrets or unnecessary document content.
Test containment rather than trusting a reassuring answer
| Adversarial condition | What the application should enforce |
|---|---|
| A retrieved document asks the assistant to export every account | User scope and tool permissions still apply |
| A model proposes a tenant identifier it was never granted | Resolve tenant context independently and reject the mismatch |
| A tool response contains instructions to send private content | Treat the response as data, not a new authorization |
| An approved draft changes before execution | Require valid approval for the actual action |
| The model or a dependency is unavailable | Fail safely and preserve a usable manual path |
Measure whether the protected operation actually occurred and whether protected data crossed a boundary. A model refusing an attack in a chat transcript is not proof that every tool path denies it. Include both ordinary useful tasks and hostile inputs, so containment does not merely turn the assistant into a system that cannot help anyone.
Keep the operating boundary small and observable
Choose data retention, provider processing, regional needs and incident responsibilities with the system owner. Put credentials in the application’s secret handling, never in prompts or browser code. Restrict outbound destinations and data volumes where the workflow allows it. Separate environments and use non-production fixtures for evaluations.
No instruction in a system prompt can replace application authorization. Prompt design, output validation, narrow tools, user-context access and operational monitoring address different parts of the risk. The useful delivery artifact is a record of the allowed tools, their permissions, the approval boundaries, the evaluations performed and the failures that remain in scope.
Sources and scope.
An original Jasmir explanation with illustrative examples, informed by the primary references below. This is engineering guidance, not a client assessment or a claim of certification. Scope and verification for a real project are agreed separately.