Prompting Anti-Patterns
Five prompt habits that silently make models worse: polite filler, banned-word lists, mega-prompts, described-not-shown formats, and buried instructions. Each one has a small mechanical fix.
Why Does This Exist?
You wire a model into a review pipeline. One call cleans the text, pulls the product name, rates urgency, translates the result, and returns JSON for the dashboard. In the demo it works. In production it drops a different constraint every run: today the JSON is missing a comma, tomorrow the urgency rating vanishes, the next day the translation never happens. Each failure looks random, so each fix is another angry paragraph soldered onto the top of the prompt, and the prompt keeps growing while the reliability keeps falling.
That is the shape of this whole topic. Newcomers treat the model like a person: they pad requests with politeness, they forbid mistakes with long lists of banned phrases, and they stack five jobs into one call because one call feels simpler. The result is slow, wasteful, and brittle. You feel it when the parser crashes at 2 a.m. on output that looked fine yesterday.
This page names the five habits that cause that grief and gives each one a mechanical fix. It does not re-teach the neighbours: where the parts of a prompt go lives in prompt anatomy, splitting work across calls lives in prompt chaining, showing formats with examples lives in few-shot prompting, and hard guarantees on shape live in structured outputs. Here you learn what to stop doing.
You need one idea before the rest. A model writes by predicting the next token from all the tokens before it, over and over, which is the whole story in next-token prediction. Every word you add to the prompt becomes part of the evidence for every token it writes. Filler is never free: it steers.
Think of It Like This
A recipe card buried under sticky notes
Picture a recipe card for one dish, buried under sticky notes. The margins are full of chat ("Hi! If you have a moment, could you maybe cook..."), three notes say what NOT to do ("DO NOT use salt", "NEVER burn the onions", "do not plate sloppily"), and someone taped four more recipes to the same card because one trip to the kitchen felt efficient. The cook now spends half their attention decoding the notes instead of cooking, and the words "salt" and "burnt onions" are sitting right in front of them at the exact moment they should be thinking about anything else.
The one photo clipped to the card outperforms every note: a finished plate, plated right. The cook copies what they can see.
It stops here. A cook knows what you meant and can ask. The model cannot ask, and it has no intent behind your words, only the text itself. Every stray word is a steering input, which is why the notes hurt instead of helping.
How It Actually Works
The mechanism in one paragraph
Call the whole prompt , the next token the model must pick , and the vocabulary it picks from . The model scores every candidate in with a distribution : the probability of each next token given the full prompt so far. In plain words, is the one token being chosen right now, is every token of your prompt plus everything already written, and is the list of all tokens it knows. Attention spreads a finite budget of weight across , so each filler token takes a share that your real instruction no longer gets. Repeat a banned phrase inside and you have raised its salience at the worst moment. Stack constraints into one call and the model must satisfy all at once, with no checkpoint between them, so one slipped constraint poisons everything downstream of it.
Worked example: a 244-word prompt with 14 words of filler
Take a triage prompt built the way most first drafts are built:
- Standing instruction: 24 words ("Classify the ticket into billing, shipping, or account, and rate urgency low, medium, or high.")
- Polite filler: 14 words ("Hello! Could you please help me with this if you have a moment? Thanks so much!")
- Customer ticket, the actual data: 180 words
- Format described in prose, no example: 26 words ("Output a JSON object where the key is the category and the value holds urgency...")
Add them: words in. The filler share is , about 6% of every call spent on words that steer nothing. Four jobs ride in that one call: extract, judge, translate, format.
Now rewrite mechanically. Cut the 14 filler words to zero: . Swap the 26-word format essay for one 18-word example and save more. Split the 4 jobs into 2 chained calls: step one extracts and rates urgency from the ticket ( words in), step two translates and formats with the example beside it. Filler is gone, each call carries two jobs instead of four, and the shape is shown rather than described. That is the whole method, and the diagram above draws exactly this before and after.
The five anti-patterns and their fixes
- The mega-prompt. One call, five jobs: extract, judge, translate, format, summarise. It fails because attention is finite and there is no checkpoint: the model drops whichever constraint is weakest that run, and the dropped one varies. Fix it with prompt chaining: one job per step, each step's output checked before the next runs. The trade-off is honest: a chain costs extra calls and their latency, so spend it where a dropped constraint breaks something downstream, not on a one-line extraction.
- Negative constraints. "Do not write an intro. Never say 'Here is the code'. Do not use markdown." Each ban repeats the banned tokens inside , raising for exactly the tokens you forbade. Fix it by stating the positive target: "Start immediately with the first data point." Name the opening line of the reply you want, then show it once.
- Conversational filler. "Could you please help me parse this if you have a moment?" In a chat product warmth is the job, so keep it there. In an API call it is 6 tokens of steering noise on every request that also dilutes the instruction's share of attention. Fix it by writing imperative commands: "Extract the names."
- Zero-shot formatting. Describing nested JSON in English paragraphs and hoping, which is zero-shot prompting asked to do the thing it is worst at. Parsers crash on the missing comma and the friendly intro before the first brace. Fix it by showing: one input-output example beats a paragraph of schema prose, the few-shot prompting move. When a crash is unacceptable rather than annoying, move to structured outputs, which constrain the reply instead of requesting it.
- Burying the lead. The real instruction sits at the end of three pages of context, or the critical rule hides in the middle. Models weight the start and the end of long contexts most, so middle rules get skipped under load. Fix it with placement: standing rules first, the long context in the middle, the one critical instruction repeated last. Long prompts deserve a budget, covered in context windows.
The assumption underneath all five: the model continues the most repeated, most recent, and most specific pattern in . That assumption fails the moment your prompt repeats the wrong pattern (the ban), recites five patterns at once (the mega-prompt), or hides the pattern in the middle. Write the pattern you want, once, where it cannot be missed.
Code
The point of this snippet is a check you can run in review: count the words, measure the filler share, and flag lines that ban instead of direct. It encodes three of the five fixes above.
def count_words(text: str) -> int: return len(text.split())
def filler_share(prompt: str, filler: tuple[str, ...]) -> float: words = [w.strip(".,!?").lower() for w in prompt.split()] hits = sum(1 for w in words if w in filler) return hits / max(1, len(words))
def negative_lines(prompt: str) -> list[str]: bans = ("do not", "don't", "never", "avoid") return [line for line in prompt.splitlines() if line.lower().startswith(bans)]
prompt = "Please kindly extract the names.\nDo not write an intro."print(count_words(prompt)) # -> 10print(round(filler_share(prompt, ("please", "kindly")), 2)) # -> 0.2print(negative_lines(prompt)) # -> ['Do not write an intro.']Two filler words out of ten is a share of : a fifth of this tiny prompt steers nothing. The flagged line is the rewrite candidate. Turn it positive ("Start immediately with the first name.") and the flag goes quiet.
Watch Out For
The banned-word list that summons the banned words
Symptom: you add "Never start with 'Here is...'" and the model starts more replies with "Here is...". It feels like defiance. It is arithmetic: the ban put those tokens in , so for them rose.
Fix: delete the ban, write the opening you want as the first line of the reply spec, and add one example that opens that way. If the phrase still leaks, the prompt still repeats it somewhere: search for the banned tokens instead of adding stronger bans.
You fixed the format and broke the extraction
Symptom: after pasting a strict JSON schema into the mega-prompt, the parser passes and the fields are wrong. Category says billing on a shipping ticket. The format constraint ate the attention the extraction needed, and nothing checked the middle of the chain.
Fix: split first, constrain second. Step one extracts and judges with no format pressure; step two formats step one's checked output. Log the text between steps so a wrong field points at step one, not at the schema. Lock the habit with prompt regression testing before the next edit lands.
The Quick Version
- One call with five jobs drops a different constraint each run, so give each step one job and check between steps.
- Every banned phrase repeats the banned tokens inside the prompt and raises their odds, so state the positive target and show it once.
- Politeness in an API call is steering noise on every request, so write imperative commands and save warmth for chat.
- A paragraph describing JSON crashes parsers, so show one formatted example, and constrain the reply when a crash is unacceptable.
- Rules buried in the middle of long context get skipped, so put standing rules first and repeat the critical instruction last.