Prompt Injection: Test the Permission Boundary, Not Just the Prompt

Test what untrusted content can cause
A prompt injection can arrive through a document, retrieved page, message, or other content the AI system processes. The important test is whether that content can influence an action or disclosure beyond its authority.
Map the tools, data sources, credentials, and approval routes around the model. Use approved adversarial tests to inspect both outputs and tool activity. A safer response in one prompt test does not establish that every access path is controlled.
Put it into practice
Plant a harmless adversarial instruction in a test document. Verify the assistant does not disclose protected data or invoke unauthorized tools. Inspect the tool boundary and audit log. Prompt wording alone is not evidence of containment.

Implementation steps
- Bound the use caseSpecify the task, authorized data, model and retrieval dependencies, tools, external destinations, and consequences of an incorrect answer. Identify the human or service accountable for each consequential action.
- Build a useful evaluationInclude representative successful tasks, missing evidence, ambiguous requests, adversarial content, and prohibited actions. Compare with the existing workflow and record failure categories as well as aggregate accuracy.
- Enforce outside the modelLimit credentials and tool permissions at the service boundary. Require independent authorization for consequential operations, validate output before downstream use, and log the actual tool outcome instead of trusting an assistant’s narration.
- Operate the release gateDefine what would stop the pilot, how to disable access, and how to return to the previous workflow. Re-evaluate after material model, prompt, retrieval, tool, or data changes and keep reviewable evidence.
Track task acceptance rate and boundary-test pass rate
| Measure | Calculation or definition | How to use it |
|---|---|---|
| Task acceptance rate | Tasks meeting defined acceptance criteria / representative tasks tested | Show error categories and sample composition. |
| Boundary-test pass rate | Prohibited actions blocked / prohibited action tests | A small passing suite does not prove universal resistance. |
| Human review load | Cases requiring substantive review / cases processed | Include reviewer time and downstream correction effort. |
AI evaluation: useful output and authorization are separate
Worked example. Figures are illustrative.

| Observation | Test cases |
|---|---|
| Task tests | 40 |
| Accepted tasks | 32 |
| Boundary tests | 10 |
The third bar is a test count, not a passed result. Quality acceptance cannot substitute for verified authorization enforcement.
The record to keep
The deliverable: A prompt-injection test set with protected outcomes, denied tool calls, and reproducible evidence.
Choose a consequential tool and verify the denied action at its permission boundary. Keep the test result with the service design and repeat it after changes to tools or retrieval sources.
References
- NIST AI Risk Management Framework — Use lifecycle governance and evaluation appropriate to the proposed AI use case.
- OWASP: LLM Prompt Injection Prevention — Layer input handling, least privilege, output checks, and independent controls over consequential tool actions.