Contradiction¶
Rule ID: content-contradiction
Detect likely contradictions within instruction files using keyword-pair heuristics
| Severity | warning (auto) |
| Autofix | llm |
| Since | v0.7.0 |
Research Basis¶
Detects likely contradictions within instruction files using keyword-pair heuristics (e.g., "move fast and iterate quickly" vs. "write comprehensive tests for every change").
Contradictory instructions force the model to resolve an impossible constraint at inference time. Research shows this produces "numerous logical errors" — the model doesn't fail gracefully, it fails silently by picking one interpretation non-deterministically.
The DIM-Bench benchmark (2025) tested all major models and found "no LLM demonstrates complete robustness against instructional distractions." Contradictions are the most damaging form of distraction because they create instructions that cannot be simultaneously satisfied.
References:
- When Prompts Go Wrong: Evaluating Code Model Robustness to Contradictory Task Descriptions (arXiv:2507.20439, Jul 2025) — Contradictions yield RIR >80% for GPT-4
- LLMs can be easily Confused by Instructional Distractions (arXiv:2502.04362, Feb 2025) — DIM-Bench: no model is robust to conflicting instructions
- Wallace et al., The Instruction Hierarchy (arXiv:2404.13208, OpenAI, Apr 2024) — Models struggle with conflicting instructions across privilege levels