- Untrusted Input / External Content
- LLM / Agent
- Privileged Tool
The model can turn untrusted language directly into privileged action.
Prompt injection defense requires layered controls because model interpretation remains probabilistic. Engineering must both reduce successful manipulation and limit security impact when manipulation occurs.
Separate model interpretation from permission to act. Preserve source context, validate proposed plans, and enforce consequential decisions at application boundaries.
The model can turn untrusted language directly into privileged action.
Independent controls preserve context, validate intent, authorize effects, and constrain execution.
Source, principal, tenant, classification, and trust status remain structured application data.
Content and behavior provide risk signals without becoming the sole trust decision.
A proposed plan is checked against user intent, permitted workflow, and information-flow rules.
Principal, resource, action, parameters, and destination are authorized outside the model.
Restricted tools, sandboxing, egress rules, and specific approvals cap impact.
Telemetry connects source, context, plan, action, and side effect for detection and incident response.
Resilience comes from complementary control families with distinct responsibilities.
Keep the origin and trust status of untrusted data outside model-generated text.
Design prompts, data marking, and model behavior to reduce the influence of competing instructions.
Correlate content risk, plan drift, tool chains, and anomalous side effects.
Bind authority to the initiating principal and check every consequential action.
Constrain capabilities, parameters, resources, and transactions explicitly.
Enforce permitted paths from source data to outputs, tools, and external destinations.
Isolate execution, preserve evidence, rotate credentials, and restore safely.
Require informed and specific approval for selected risks.
Exercise controls with representative attack paths and retest after change.
Detection signals help prioritize, block, or investigate suspicious behavior. They should not be the only protection around consequential operations.
| Control property | Probabilistic signals | Deterministic enforcement |
|---|---|---|
| Typical examples | Prompt injection classifier; content inspection; model-based critic; plan-drift signal | Authentication; resource and action authorization; parameter validation; destination allowlist |
| Decision character | Uncertain score with thresholds, false positives, and missed cases | Explicit rule over identity, state, resource, action, or destination |
| Appropriate role | Detect, prioritize, trigger review, or reduce risk | Enforce tenant, permission, sandbox, network, and side-effect boundaries |
| Security assumption | Some malicious content or behavior will remain undetected | Disallowed operations remain blocked even when model behavior is manipulated |
The same principles apply across systems, but priority controls differ with the path into context and the authority available downstream.
Treat user input as untrusted, limit model authority, and authorize actions independently.
Preserve external-content provenance, distrust tool output by default, and control information flow.
Enforce retrieval permissions, tenant boundaries, document provenance, and permitted use of retrieved data.
Control identity, plan validation, per-action authorization, parameters, egress, and side effects.
Retain message, delegated-authority, and provenance context across agent boundaries and reauthorize each handoff.
Defense is a maintained process, not a one-time prompt change.
Map assets, principals, trust boundaries, content sources, tools, and possible side effects.
Reduce exposure, authority, and risky paths through architecture and least privilege.
Correlate content, behavior, plan, tool, and action signals.
Block disallowed operations and tightly constrain permitted execution.
Reconstruct source, model context, plan, decisions, tool calls, and effects.
Contain workflows, rotate credentials, restore integrity, and notify affected parties.
Exercise the root cause and control gaps with representative scenarios.
These principles reduce the authority available to manipulated model behavior and improve investigation when controls fail.
Expose only the minimum tools, credentials, data, and actions needed for the current task.
Keep secrets out of prompts when an external reference or short-lived capability will suffice.
Maintain source and policy metadata structurally rather than expecting the model to reconstruct it from text.
Derive trust from source and use context, not from the tone or format of content.
A correctly implemented tool can return attacker-controlled websites, email, or records.
A model's tool call, plan, or explanation is a proposal, not a permission decision.
Check principal, resource, action, parameters, destination, and current state before execution.
Permit only necessary destinations and protocols, and govern sensitive data flows separately.
Show the concrete action, destination, data, and effect so consent is informed.
Trace source → context → plan → action → side effect with appropriate data minimization.
This taxonomy organizes the complete standalone defense library. Published controls link to their reviewed pages; Prompt Injection Prevention remains an architecture concept represented by the layered hub rather than a separate article.
Layer controls that reduce manipulation opportunities and limit consequences when prevention is incomplete.
Inspect user input and external content for risk signals without treating inspection as a complete trust decision.
Retain source, principal, tenant, classification, and retrieval context outside model-generated text.
Mark and transform untrusted data so its role is clearer to the model, while preserving external enforcement.
Combine content, context, behavior, and action signals to identify suspicious influence attempts.
Detect when an agent plan departs from the user's authorized objective or expected workflow.
Evaluate sequences of individually plausible tool calls for unsafe combined effects.
Limit identities, credentials, resources, tools, and actions to the minimum needed for the current task.
Authorize the initiating principal, resource, action, parameters, and destination outside the model.
Require informed, specific approval for selected high-impact actions rather than generic confirmation.
Control whether data from a source may reach a model, action, tenant, or destination.
Restrict outbound destinations, protocols, and data movement independently of model intent.
Validate structured outputs, parameters and destination formats against sink-specific structural and format constraints before use or execution.
OWASP guidance and NIST terminology provide useful orientation, but neither should be treated as a complete defense standard or evidence that one control guarantees protection.