Distractor Interference: Why Relevance Is Not Enough¶
Semantically related but inapplicable instructions actively reduce compliance with the instructions that are applicable — proximity in meaning creates interference, not safety.
Learn it hands-on: Distractor Interference guided lesson with quizzes.
The pattern¶
Include every instruction that might be relevant. Cover all cases. Make the instruction file comprehensive so nothing is missed.
Why it fails¶
LLMs perform worse when irrelevant but plausible content sits alongside applicable instructions. Shi et al. (2023) show that model reasoning accuracy drops sharply when you add irrelevant but domain-coherent context to a prompt. The same holds for instruction sets. Instructions related to the applicable one compete for the model's attention and draw it away from the instruction that matters.
Take an instruction that is accurate in general and related to the current task domain but does not apply to this specific task. It is not neutral. It is a distractor that reduces compliance with the instruction that does apply.
An example¶
A prompt for a task that writes integration tests might include instructions about unit testing conventions, component testing patterns, and end-to-end test structure. All are accurate. All relate to the same domain. But only one applies.
The model attends to all three. The applicable instruction now competes for focus with two related-but-wrong instructions, the same finite-attention pressure behind the infinite context. Compliance on the applicable instruction is lower than if the other two were absent.
This effect scales. A comprehensive instruction file is not a safety net. Every inapplicable instruction dilutes the signal from the applicable one, and performance degrades as irrelevant context grows (Ponnusamy et al., 2025).
Remediation¶
Load task-scoped context. Load only the instructions that apply to the current task. Skill-based architectures support this: skill content loads on invocation, so the agent receives only what it is using.
Prune before loading. Remove instructions that are accurate but do not apply to this task. The test is not "is this correct?" but "does including this improve output on this specific task?"
Use modular instruction files. Organize by task type, not domain, as a deliberate context-engineering choice. A file for "integration test writing" loads separately from "unit test writing".
Test by removal. If compliance seems low, remove unrelated instructions and check whether it improves. Improvement points to distractor interference.
When this backfires¶
Over-pruning creates its own failure mode. Narrowing context too aggressively risks:
- Under-informing the model: edge cases that live in adjacent instructions get stripped, producing technically-compliant-but-wrong output on the margins.
- Brittle task detection: if task classification is wrong, the model loads the wrong instruction set entirely, the routing risk that retrieval-augmented agent workflows also carry. A broad fallback provides a partial safety net.
- Cross-domain tasks: a task spanning two instruction domains genuinely needs both files. Pruning one causes real compliance failures, not interference.
- Maintenance overhead: each task type needs its own instruction file. The pattern works best for well-defined, bounded tasks and offers less benefit for open-ended work where the applicable instruction set is uncertain at load time.
Key Takeaways¶
- Semantically related but inapplicable instructions reduce compliance with the instruction that applies.
- "Comprehensive" instruction files create attention competition, not safety.
- Load task-scoped instructions on demand; prune anything that does not apply to the current task.
Related¶
- The Infinite Context
- Context Poisoning
- Token Preservation Backfire
- The Implicit Knowledge Problem
- Objective Drift: When Agents Lose the Thread
- Context Engineering: The Discipline of Designing Agent Context
- Retrieval-Augmented Agent Workflows
- Treat Task Scope as a Security Boundary — task-scoped instructions also reduce prompt injection attack surface