Prompt Engineering · ~7 min
"Don't use var" makes the model hold a forbidden thing in mind. "Use const and let" gives it a target. The framing changes how often the rule sticks.
Same rule, two framings. "Avoid long functions" and "Keep functions under 30 lines" forbid the same thing — but one names a target the model can execute, and the other leaves the correct behaviour implicit. Implicit is less reliable.
A negative instruction demands suppression: the model holds the prohibited action in mind while choosing not to take it. A positive instruction demands execution: it names the target and performs it. Token generation favours selection over avoidance.
Anthropic's guidance puts it plainly: "Tell Claude what to do instead of what not to do." Most prohibitions reframe cleanly:
| Negative | Positive |
|---|---|
Do not use var | Use const and let only |
| Avoid long functions | Keep functions under 30 lines |
| Never hardcode secrets | Store all secrets in environment variables |
Negation isn't a solved capability. A "don't think about a pink elephant" effect can make the banned concept a stronger prior, raising the rate of prohibited output instead of lowering it (Truhn et al., 2025). It varies by model size and language — another reason the positive form is the safer default.
Polarity is a default, not a law. Keep the negative form — and move it toward the top of the set, where primacy attention is strong — when:
console.log in production code."Polarity asks "how do I frame this rule?" Negative space asks a different question: "should I state the goal, or the boundary?" The answer is usually both. A negative constraint is binary and greppable — the agent either produced the banned phrase or it didn't, no judgement required.
"Write concisely" needs a human or a second model to evaluate. "No 'in this guide'" needs a grep. If a
constraint can't be expressed as a deterministic check, it probably belongs in the positive half instead.
Palantir's guidance documents
the same point: banning specific undesired outputs is more reliable than describing desired characteristics.
When you catch yourself writing "never" or "must not," ask whether it should be a hook. A
pre-commit hook that rejects var enforces deterministically. An instruction asks; a hook
requires. Instructions are probabilistic — reserve them for what tolerates the occasional miss.
Retrieval practice — recall, don't peek
Question 1Positive instructions tend to win because they ask the model to…
Question 2The polarity gain between positive and negative forms…
Question 3A keep-it-negative case is when the acceptable space is…
Question 4The design criterion for a good negative constraint is that it's…
Question 5 · spaced recall from Lesson 1The right "altitude" for an instruction describes…