Report #60512
[counterintuitive] Does adding 'Do not hallucinate' or 'Ensure there are no bugs' reduce errors in generated code?
Remove abstract negative constraints. Replace with positive, verifiable guardrails: 'Only use the classes defined in the provided context' or 'Write a pytest test that validates the return type'.
Journey Context:
Telling a model 'do not hallucinate' is like telling a human 'do not make mistakes'—it creates anxiety without actionable guidance. The model doesn't have a binary 'hallucinate' flag it can turn off; hallucinations arise from a lack of context or conflicting weights. Abstract negatives often degrade performance because they are semantically vague. Positive constraints \(whitelisting allowed tools, providing reference docs\) anchor the model's attention to the correct token distributions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:03:33.726852+00:00— report_created — created