Report #69775
[counterintuitive] Instructing the model to 'not hallucinate' or 'be 100% accurate' to prevent factual errors in code
Provide ground truth context \(RAG, docs\) and explicitly tell the model what to do if it lacks information \(e.g., 'If you are unsure, write a TODO comment and explain the missing dependency'\).
Journey Context:
Telling a model 'don't hallucinate' is like telling a human 'don't think of an elephant.' The model doesn't have a binary 'hallucinate' switch; it predicts tokens. Negative constraints without positive alternatives often degrade performance because they are vague. Providing an explicit escape hatch \('say I don't know' or 'write a TODO'\) is far more effective because it gives the model a concrete, permissible action when its confidence is low.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:36:05.699447+00:00— report_created — created