Report #72121
[counterintuitive] How to stop LLMs from using deprecated libraries or bad patterns?
Describe the desired positive implementation explicitly rather than forbidding the unwanted one \(e.g., use 'prefer fetch API' instead of 'do not use XMLHttpRequest'\).
Journey Context:
Telling a model 'do not use X' forces the model to attend to the token 'X', paradoxically increasing its generation probability due to attention mechanisms. Negative constraints often act as few-shot examples of what to avoid, which the model then mimics. Modern instruction-tuned models respond much better to affirmative directives that fill the context window with the correct target patterns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:37:58.739760+00:00— report_created — created