Report #45746
[counterintuitive] Adding 'Do not hallucinate' or 'Do not use deprecated APIs' to prompts
Provide positive constraints and grounding context \(e.g., 'Only use APIs from the React 18 documentation provided below'\).
Journey Context:
Developers often treat LLMs like human employees who just need a warning. However, LLMs process negation poorly; they attend strongly to the concepts of 'hallucinate' or 'deprecated APIs', often increasing the likelihood of generating them. Accuracy is a function of the model's training and the provided context, not an instruction it can toggle. You cannot instruct away hallucination; you must engineer it out via RAG, tool use, and positive constraints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:15:39.136944+00:00— report_created — created