Context Contamination
In long-horizon multi-step tasks, a phenomenon in which accumulated errors or redundant information degrade the quality of the model's context, affecting the accuracy of subsequent generation.
Core Facts
Context pollution refers to irrelevant or harmful information occupying the limited context window space of a model, causing the model's attention to be diverted and reasoning quality to degrade.
Irrelevant information occupying context space (context pollution) can significantly degrade the model's performance on core tasks.
Timeline (last 90 days)
A Reddit user noted that "Polluted context is forever," implying that erroneous information in the conversation history may continue to affect subsequent output.
Common ways to mitigate context pollution include starting a new session at key points, explicitly asking the model to ignore previous conclusions and re-evaluate, or switching to an uncontaminated model instance.
Context pollution is especially pronounced in long conversations: the model tends to stay consistent with its own earlier statements rather than starting afresh from the facts.
"Context pollution" means that once erroneous assumptions, outdated conclusions or plans that have already been overturned are written into the conversation history, reasoning in subsequent turns continues to take these errors as premises, and even a model with error-correction ability struggles to fully escape them.
Claude's memory entries enter the prompt as additional information to help the model maintain coherence, but they can also cause context pollution: once historical snippets unrelated to the current request are recalled, they change the classifier's overall judgment of the input.
There are four failure modes in agent context: context poisoning, context distraction, context confusion, and context clash.
For context poisoning, the fix is to do a simple check against real information before the conclusion is written into the context.
If the memory store is full of duplicate, outdated, or mutually contradictory entries, the retrieval results will contain large amounts of low-value information, crowding out context space and even misleading the model, which is context pollution.
Common engineering mitigations for context contamination include: isolating sessions for different tasks, explicitly declaring task boundaries in the system prompt, or compressing and summarizing the history when switching.
In automated pipelines, when the same session is reused to handle different types of requests, format conventions, terminology assumptions, and even role tone left over from the previous task create 'contamination' that causes the new task's output to deviate from expectations.
7 more timeline events
All Facts (19)
Context pollution refers to irrelevant or harmful information occupying the limited context window space of a model, causing the model's attention to be diverted and reasoning quality to degrade.
70%VerifiedIrrelevant information occupying context space (context pollution) can significantly degrade the model's performance on core tasks.
65%UnverifiedHot-switching models mid-session in a conversation with existing history causes context contamination, causing the new model to inherit the intermediate state and erroneous assumptions of the old conversation, leading to deviations in the reasoning path.
60%UnverifiedA Reddit user noted that "Polluted context is forever," implying that erroneous information in the conversation history may continue to affect subsequent output.
50%Unverified"Context pollution" means that once erroneous assumptions, outdated conclusions or plans that have already been overturned are written into the conversation history, reasoning in subsequent turns continues to take these errors as premises, and even a model with error-correction ability struggles to fully escape them.
50%UnverifiedContext pollution is especially pronounced in long conversations: the model tends to stay consistent with its own earlier statements rather than starting afresh from the facts.
50%UnverifiedCommon ways to mitigate context pollution include starting a new session at key points, explicitly asking the model to ignore previous conclusions and re-evaluate, or switching to an uncontaminated model instance.
50%UnverifiedClaude's memory entries enter the prompt as additional information to help the model maintain coherence, but they can also cause context pollution: once historical snippets unrelated to the current request are recalled, they change the classifier's overall judgment of the input.
50%UnverifiedThere are four failure modes in agent context: context poisoning, context distraction, context confusion, and context clash.
50%UnverifiedFor context poisoning, the fix is to do a simple check against real information before the conclusion is written into the context.
50%UnverifiedIf the memory store is full of duplicate, outdated, or mutually contradictory entries, the retrieval results will contain large amounts of low-value information, crowding out context space and even misleading the model, which is context pollution.
50%UnverifiedCommon engineering mitigations for context contamination include: isolating sessions for different tasks, explicitly declaring task boundaries in the system prompt, or compressing and summarizing the history when switching.
50%UnverifiedIn automated pipelines, when the same session is reused to handle different types of requests, format conventions, terminology assumptions, and even role tone left over from the previous task create 'contamination' that causes the new task's output to deviate from expectations.
50%UnverifiedWhen evaluating an AI's decision-making capability, context contamination — such as leaking market prices — reduces what appears to be independent judgment to mere repetition, so all sources referencing implied odds, betting sites, or FedWatch must be stripped out before the model reads any content.
50%UnverifiedThe usual solution to context contamination is to open a fresh session, allowing the model to build its understanding of the task from scratch.
50%UnverifiedContext pollution refers to a large language model's context window being occupied by irrelevant system prompts, unused tool descriptions, or redundant conversation history, which compresses the token space available for reasoning and leads to degraded instruction-following quality, confused tool selection, or unstable outputs.
50%UnverifiedIn multi-agent orchestration scenarios, context pollution can be amplified exponentially across layers if each layer accumulates redundant context.
50%UnverifiedMixing analytical data from multiple industries in the same context leads to AI context contamination, producing hallucinations or deviations from task objectives.
50%UnverifiedWhen multiple unrelated tasks share the same context, it leads to context contamination, degrading the quality of model outputs.
50%