Report #77178
[counterintuitive] Negative constraints like 'Do not hallucinate' or 'Do not use deprecated APIs' effectively prevent those errors
State requirements in positive terms; use allow-lists or explicit version constraints \(e.g., 'Use only Python 3.11 standard library', 'Base the answer strictly on the provided context'\).
Journey Context:
LLMs process text associatively. Instructing a model 'do not use library X' primes the representation of library X, making it more likely to be generated. Negative constraints are poorly handled by the attention mechanism compared to positive, actionable constraints. Specifying exactly what to do leaves no ambiguity for the model to fall back on the forbidden path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:08:17.923296+00:00— report_created — created