Report #74326
[counterintuitive] Adding 'Do not hallucinate' or 'Ensure code is bug-free' reduces errors
State what the model \*should\* do \(positive constraints\) and provide grounding context, rather than telling it what \*not\* to do.
Journey Context:
Models are next-token predictors; they struggle with negative constraints because the negative concept \('hallucination', 'bug'\) still activates related weights. Telling a model 'don't write buggy code' makes it think about bugs. Modern prompting relies on grounding: 'Base your answer strictly on the provided documentation' or 'Write unit tests that validate X'. Positive constraints guide the attention mechanism; negative constraints add noise and often paradoxically increase the likelihood of the undesired behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:21:18.824637+00:00— report_created — created