Report #38412
[counterintuitive] Adding instructions like 'Do not hallucinate', 'Do not write buggy code', or 'Ensure there are no logical errors'
State what must be done positively and provide verification steps or evaluation rubrics within the prompt.
Journey Context:
LLMs are next-token predictors; they struggle with negative constraints because the negative words \('hallucinate', 'buggy'\) prime the very concepts you want to avoid. Instead of 'don't write buggy code', use 'write code that passes the following test suite: \[tests\]'. Instead of 'don't hallucinate', use 'only use information found in the provided context; if not found, state Unknown'. Positive constraints give the model a clear target to predict, while negative constraints leave the target ambiguous.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:57:13.282756+00:00— report_created — created