Defining Prompt Contamination
Prompt contamination describes a condition rather than an event. An AI agent's context window is typically assembled from multiple sources: the original user prompt, documents retrieved through a RAG pipeline, outputs returned by invoked tools, persisted memory from prior sessions, and content passed from other agents in a multi-agent workflow. When any of this aggregated content is untrusted, manipulated, outdated, or simply lower quality than the agent's decision-making requires, and that content measurably alters the agent's subsequent behavior or output, contamination has occurred.
This is distinct from prompt injection, which OWASP defines as a discrete malicious instruction embedded in input, either directly by a user or indirectly through external content the model processes. Contamination is the broader condition; indirect prompt injection is one specific mechanism that produces it. Not all contamination is adversarial: a stale document retrieved from an outdated index, or a tool that returns malformed data, can degrade agent behavior without any attacker present.
Prompt Contamination vs. Prompt Injection vs. Jailbreaking
These three terms are often used interchangeably, but they describe different failure mechanisms. Prompt injection is a deliberate, discrete malicious instruction inserted into input. Jailbreaking targets a model's own safety alignment to bypass restrictions. Prompt contamination is broader still: it covers any degradation of context trust, whether introduced by an attacker, a stale retrieval index, or a malformed tool response, regardless of intent.
Why Agentic Architectures Are Structurally Exposed
Agentic systems aggregate context from more sources than traditional single-turn LLM applications, and each aggregation point is a potential entry vector. In RAG pipelines, retrieved documents are concatenated into the context window without a standardized mechanism to distinguish their trust level from the user's original prompt.
The Model Context Protocol specification explicitly acknowledges this problem for tool outputs: servers can return arbitrary content, and MCP documentation instructs implementers to treat that content as untrusted unless the server is verified. In practice, many agent implementations do not enforce this distinction and instead treat tool output as authoritative context.
Multi-agent handoffs compound the issue. When one agent passes context to another, there is currently no standardized method in MCP or OWASP guidance for carrying trust or provenance metadata alongside that content, so a downstream agent cannot reliably distinguish original user intent from content introduced or altered upstream. Persistent memory systems extend the exposure window temporally: content that was valid at ingestion can become stale or superseded, and without re-validation before reuse, that stale content is treated with the same trust as newly retrieved information.
Retrieval (RAG)
Retrieved documents merged into context at the same trust level as user input.
Tool Outputs
Server-returned content treated as authoritative rather than as unverified data.
Persistent Memory
Stale or unvalidated content carried forward across sessions.
Agent-to-Agent Handoffs
Context passed downstream without provenance or trust metadata.
Why This Is Not Fully Addressed by Input-Layer Security
Standard security monitoring focuses heavily on the initial input boundary: what the user typed, and whether it contains recognizable attack patterns. Prompt contamination frequently enters mid-pipeline, after that initial check has already passed. A tool call executed three steps into an agent's task can return content that reshapes the rest of the interaction, with no discrete input event to flag.
NIST's adversarial machine learning taxonomy separates training-time poisoning from inference-time manipulation of inputs and retrieved content, reflecting that these are recognized as distinct technical categories, but neither NIST nor OWASP currently defines prompt contamination as its own named risk category. Governance leaders should treat it as the enterprise framing of risks these frameworks describe under indirect prompt injection, data integrity, and supply chain security, rather than waiting for a formal taxonomy entry before addressing it operationally.
Governance framing
Treat contamination as an operational risk to manage now, using existing frameworks as reference points, rather than a gap to leave unaddressed until a formal taxonomy entry exists.
Governance Considerations for Enterprise Teams
No current regulatory body defines prompt contamination as a distinct compliance category. NIST's AI Risk Management Framework Generative AI Profile recommends provenance tracking and access-control practices for systems aggregating multi-source content, and CISA and NSA joint guidance recommends data validation as part of secure-by-design AI deployment, but both are framework-level recommendations rather than enforceable technical standards.
This leaves implementation discretion to the organization. Governance leaders should treat internal requirements, such as mandatory provenance logging or tool-output validation before agent action, as separate from external framework citations, since existing standards address contamination indirectly rather than through a named control area. Evaluation of any runtime security approach should center on whether it tracks context provenance end to end, enforces validation at tool-call boundaries rather than only at input, and supports investigation after the fact when contamination is discovered downstream from its origin.