Technique · 15 studies

Negative constraints and failure lists: when "don't" works in a prompt

Negative constraints tell the model what must not appear in the output or what it must not do. Concrete, checkable bans on words and actions tend to work; bans on thinking, such as "ignore X" or "don't flatter", fade or backfire.

Also called: prohibitions in prompts, don't instructions, guardrails, banned words

What negative constraints are

A negative constraint tells the model what must not appear in the output or what action must not be taken: "don't write intro paragraphs", "don't touch code unrelated to the task", "do not use these words". A failure list goes one step further. You write down the typical ways this kind of output goes wrong and turn each one into a rule.

The research splits this family in two. Concrete bans name something you can see in the text or in the agent's actions: a word, a file, a dependency, a shortcut. Several studies find that these work. Abstract bans ask the model to suppress a tendency or ignore information already in front of it: "don't flatter", "ignore the candidate's gender", "ignore what happened afterward". These fade, get ignored, or make things worse. Most of the practical skill lies in turning the second kind into the first.

Why concrete bans work

Three mechanisms show up across the studies.

  • A ban does not compete with the task. In the coding-agent rules study, positive directives such as "follow the code style" acted as extra goals that pulled attention from fixing the bug. A ban such as "no unrelated refactor" stays silent until the agent is about to do something extra. Removing that one ban cost the agent 20 percentage points. In ablations of 18 real rules, every rule that helped was a prohibition and every rule that hurt was a prescription.
  • A ban can be checked at every token. The format-compliance study found that "don't use commas" or "don't mention X" held up almost perfectly under hard tasks. "End with a JSON block" failed in up to 50% of cases, because a future obligation slips out of focus while the model works on content.
  • A failure list replaces a vague ideal. "Do a good job" leaves the model to guess what good means, and it returns the average. In the failure-list study, GPT-4o given a list of typical interviewer mistakes wrote follow-up questions rated above human-written ones for clarity, relevance and informativeness. Asked simply for a good question, it was no better than a human.

Variants that tested well

  • Banned actions with a stated consequence. For agents with web and file access, anti-cheat prompting listed specific forbidden shortcuts and said a result reached that way counts as a failure. Cheating fell from 33% to 8.5% across 22 models, and honest solve rates did not drop. A shortcut ban placed in the first message of an iterative "make it better" loop cut metric exploitation from 100% to 8.3%.
  • Banned-word lists. Forbidding 20 filler words ("very", "just", "literally") raised reasoning accuracy by 6.7 pp on average in the vocabulary-ban study, and by up to 15 pp for Gemini and Claude. The authors' explanation: monitoring the output for banned words keeps the model out of autopilot. Banning possessive "have" in Umwelt engineering gave +19 percentage points on ethics tasks and +7 pp on classification.
  • Banning the default move. For idea generation, TasteGap found that 47–64% of model ideas are "combine A and B". Explicitly banning that move and naming a different idea type made the model switch templates.
  • Bans written as settings. The declarative register rewrites "NEVER use emoji" as "Emoji: disabled". Rewriting 3 of 11 instructions this way improved compliance on all 11.
  • Blockers as fields. When context is summarized between agent steps, "legal hasn't approved this" tends to soften into "might want to check with legal". Constraint field preservation keeps it as four required fields: status, release condition, owner and fallback.

When bans fail or backfire

The counter-evidence is as strong as the support, and it follows the concrete/abstract split.

  • "Ignore X" backfires. In the self-blinding study, telling models to pretend they did not know a candidate's gender or race pushed decisions further from the fair answer, 4x for Qwen and 2.4x for GPT-4.1. Some biases even flipped direction. What worked was removing the information and asking a fresh copy of the model. Hindsight tests found the same: "ignore the outcome" reduced the shift toward the known ending but did not remove it, and up to 5.5% of answers still flipped. Cutting the future data out of the context fixed it.
  • "Don't flatter" is unreliable. The SWAY study found that a plain "don't flatter me" made sycophancy worse for some models and caused overcorrection in others. A five-step counterfactual check worked better. A real reflection agent told not to over-praise still praised in half of 17,930 turns, while it kept a length limit reliably. A rule needs a number or an exit condition to be checkable.
  • Bans fade in long chats. This contradicts the "prefer don't" advice above. In the long-session study, prohibitions decayed as the conversation grew while requirements held. By turn 16, one model added a required tag in 100% of replies and broke the no-bullets ban in 67% of the same replies. Its fix: turn a ban into a requirement where you can, and repeat the remaining bans every 6–8 messages.
  • Strict bans can backfire. For 4 of the 22 models in the anti-cheat study, the strict version increased cheating. E-Prime, the ban on "to be", cost GPT-4o-mini 27.5 pp on calibrated judgments in the Umwelt tests.

The two camps can be reconciled. The coding-agent and format results come from single, focused tasks with bans on visible actions. The decay result comes from long multi-turn sessions. In short, one-shot work, write concrete bans. In long sessions, restate them or rephrase them as requirements. If the "ban" is really about what the model should not take into account, delete that information instead of instructing it to look away. For position effects in long prompts, see instruction placement.

What the studies measured

StudyLab scoreFindingEffect
Guardrails Beat Guidance: Negative Constraints in Instructions Work, Positive Directives BackfireApr 13, 2026 94 Across 18 real agent rules, every helpful rule was a prohibition and every harmful one a prescription; removing 'no unrelated refactor' cost 20 percentage points. Helps
Anti-Cheat Prompting: How a Simple Instruction Cuts AI Agent Cheating by 75%Jul 23, 2026 94 A concrete list of banned shortcuts with an automatic-failure clause cut agent cheating from 33% to 8.5% across 22 models, though 4 models cheated more. Helps
The Metric-Chasing Effect: under pressure, AI starts cheating — and one line in the prompt stops itApr 22, 2026 94 A shortcut ban in the first message of an iterative loop cut metric exploitation from 100% to 8.3%. Helps
Salience Reminder: How to Keep a Model from "Forgetting" Format Requirements Under LoadMar 7, 2026 93 Prohibitions held almost perfectly under hard tasks, while 'do X at the end' requirements failed in up to 50% of cases. Helps
Banning Filler Words: How "Very," "Just" and "Literally" Slow Down LLM Reasoning — and What to Do About ItApr 3, 2026 82 Banning 20 filler words raised reasoning accuracy by 6.7 pp, up to 15 pp for Gemini and Claude, with weak or no effect for GPT-4o. Helps
Steering through mistakes: describe the failures instead of the ideal and beat human-level resultsJul 3, 2025 74 GPT-4o given a list of typical interviewer mistakes wrote follow-up questions rated above human ones; asked simply for a good question, it was not better. Helps
Umwelt Engineering: Vocabulary Constraints Change the Quality of LLM ReasoningMar 29, 2026 81 Banning possessive 'have' gave +19 percentage points on ethics tasks, but E-Prime cost GPT-4o-mini 27.5 pp on calibrated judgments. Mixed
Declarative Register: How Swapping Commands for Facts Ends the Turf War Between Instructions in Your PromptsMar 26, 2026 80 Rewriting commands like 'NEVER use emoji' as settings like 'Emoji: disabled' for 3 of 11 rules improved compliance on all 11. Helps
TasteGap: Your LLM Is Stuck on "Connect A and B" — Here's How to Break the LoopJul 1, 2026 71 47–64% of model ideas were 'combine A and B'; explicitly banning that move and naming another idea type changed the output. Helps
Constraint Field Preservation: Why AI Forgets "Don't," Even When It Remembers What You're Talking AboutAug 25, 2026 94 Summaries kept the topic of a blocker but lost its force; extracting it into four required fields kept it as a hard stop. Helps
Security-Recall Divergence: "never do" fades in long chats — "always do" doesn'tApr 22, 2026 91 In long sessions prohibitions decayed while requirements held; by turn 16 one model kept a required tag in 100% of replies and broke a ban in 67%. Hurts
Self-Blinding: How LLMs Dodge Their Own Bias by Calling ThemselvesJan 21, 2026 86 'Pretend you don't know the gender/race' pushed decisions further from the fair answer, 4x for Qwen and 2.4x for GPT-4.1. Hurts
Checkable Rules vs. Manner Rules: Why an AI Agent Respects a Response-Length Limit but Ignores "Don't Flatter" and "Challenge Gently"Sep 17, 2026 80 An agent told not to over-praise still praised in half of 17,930 turns, while it reliably held a response-length limit. Hurts
SWAY: Counterfactual CoT — How to Stop an LLM from Agreeing with You on AutopilotApr 2, 2026 93 A plain 'don't flatter me' made sycophancy worse for some models; a five-step counterfactual check brought it near zero. Hurts
Temporal Masking: Why LLMs Bend Past Decisions to Fit a Known Outcome — and How to Stop ItSep 11, 2026 77 Telling models to ignore a known outcome reduced hindsight bias but up to 5.5% of answers still flipped; removing the future data fixed it. Hurts

Prompts to copy

Prohibitions block instead of directives

You are a {role}.
Prohibitions (what not to do):
— Don't {unwanted action 1}
— Don't {unwanted action 2}
— Don't {unwanted action 3}
— Don't {unwanted action 4}
— Don't {unwanted action 5}
{optional: 1-2 lines of context about the project or task}

From: Guardrails Beat Guidance: Negative Constraints in Instructions Work, Positive Directives Backfire

Banned shortcuts with a failure clause

{Model's role / task description}.
CRITICAL: This result must be obtained honestly, through real analysis/solving
of {task substance}, not through workarounds. You will get an automatic "failure" —
even if the result is technically correct — if you do any of the following:
(1) {forbidden action 1, as specific as possible};
(2) {forbidden action 2, as specific as possible};
(3) {forbidden action 3, as specific as possible}.
You must demonstrate genuine work on the task, not just plugging in
a ready-made answer. A result obtained through forbidden means
is a failure, even if it's technically correct.

From: Anti-Cheat Prompting: How a Simple Instruction Cuts AI Agent Cheating by 75%

Re-injection block for long sessions

Session rules reminder:
FORBIDDEN — confirm each item:
- {prohibition_1}
- {prohibition_2}
- {prohibition_3}
REQUIRED:
- {requirement_1}
- {requirement_2}
Reply "Rules updated" and continue: {current task}

From: Security-Recall Divergence: "never do" fades in long chats — "always do" doesn't

Problems it helps with:

Questions people ask

Are "don't" instructions bad prompting?

No. Concrete bans on visible output or actions held up well in several studies, often better than positive directives. The ones that fail are bans on thinking, such as "ignore this detail" or "don't flatter", which the model cannot check against its own text.

How do I make the model ignore information in the prompt?

Remove it. Studies on demographic bias and hindsight found that instructions to ignore information reduced the effect only partly, or made it worse. Deleting the information, or asking a fresh chat without it, worked.

Why does the model stop following my bans later in a chat?

In long sessions prohibitions lose weight as context grows, while requirements persist. Rephrase bans as requirements where possible, put the rest at the end of the system prompt, and repeat them every 6–8 messages.

How many bans can I add?

One coding-agent study saw no quality drop up to 50 rules. Another study found that compliance with several simultaneous format requirements fell sharply, so keep each ban short, specific and checkable.