Don't Use Examples When Prompting Large Language Models A controlled test on 128 meals found that including examples in prompts biases large language model outputs substantially, with a doubled example versus a halved example shifting Claude Haiku 5.5 energy estimates by +13.9% and Claude Sonnet 5.5 by +8.5%. The experiment, run across seven prompt conditions on claude-haiku-5-5 and claude-sonnet-5-5 at low effort with JSON schema output for 5,376 calls, also produced protein shifts of +15.6% (Haiku 5.5) and +12.8% (Sonnet 5.5) and gram shifts of +12.7% (Haiku 5.5). The author, writing in December 2026, argues the results support dropping examples from prompts, especially for functional LLM calls inside software, because models overfit to the examples and miss the underlying task. Don't Use Examples When Prompting Large Language Models Written in December 2026 For years now, people on the Internet and in workshops have recommended putting examples in prompts for large language models. The advice has become as common as telling a model to assume a persona. Today I’m telling you the opposite: do not use examples in your prompts. This matters most for functional LLM calls inside software, but it also matters when you’re just talking to a model. I’ll first explain why I’m so opposed to examples, and then give tips for working around them when you talk to chatbots or to agents built on large language models. A few months ago it began to dawn on me that when I discussed something with a coding agent or a chatbot, I would bring up or explore examples; you know, as humans do. Afterwards I’d find it very hard to steer the conversation away from those concrete examples and towards the abstract idea underneath them. While people were taught to include examples in their prompts, I have been telling people in workshops for years to have large language models write prompts for large language models, because they are very good at it. I still stand by that, even with the latest models of 2026. But I have also noticed something problematic, and it shows up all the time. Whenever a coding agent writes a prompt for a model call in an app, or instructions for a subagent, or a skill file or similar , it leans heavily on examples, positive and negative. I haven’t measured it, but my impression is that this happens every single time . I believe that this is bad. In my experience it leads the model to overfit hard on the examples and miss the forest for the trees. A few weeks ago it occurred to me that this should be easy to test, and today, I finally sat down, took one of my datasets and tried it. The setup The task is one large language models are great at: turning unstructured data into structured data. I used my dataset of meal nutrient estimates. It’s a good test because it is fairly complex and multimodal. To have a model turn unstructured data into structured data, you usually give it a schema, in XML, JSON or something similar. The schema defines which fields exist and what values they can take, and marks some fields as optional and others as required. So far, so good. Then come the examples. For the experiment, I ran the same prompt without examples and with them. Some sets of examples were built to bias the model towards certain ranges of values. Others were built to bias it towards filling in or leaving out the optional fields. I ran all of this on 128 meals from my dataset; small, I know, but I just wanted to test my hunch. - 128 meals from my dataset, each with a photo and logged amounts. Three estimates per meal and condition. - The example, appended to the system prompt: pasta with tomato sauce, 180 g, 650 kcal. - Conditions: no example; the example; every number doubled; every number halved; optional fields filled; optional fields empty; the doubled example labelled as a wrong answer. - claude-haiku-5-5 and claude-sonnet-5-5 , each on all seven conditions. Effort low , JSON schema output, 5376 calls. - Shift: how much the estimates for the same meal change between two conditions, averaged over all 128 meals. In brackets: the range the result stays in 95% of the time when the meals are resampled. Results When I test a hypothesis like this, I usually expect the first results not to support it; then I have to rethink my view and work out where my intuition went wrong. Not in this case, though. Examples bias the model substantially , which fits my experience of performance degrading when they are used. | Comparison, same 128 meals | Measure | Haiku 5.5 | Sonnet 5.5 | |---|---|---|---| | Doubled example vs halved example | Energy | +13.9% +10.6, +17.0 | +8.5% +7.1, +9.9 | | | Protein | +15.6% +11.4, +20.0 | +12.8% +4.7, +21.9 | | | Grams | +12.7% +10.5, +15.0 | +9.4% +7.8, +11.0 | | One example vs no example | Energy | +3.9% +1.7, +6.6 | +4.7% +3.2, +6.4 | | Doubled example, labelled wrong, vs no example | Energy | +5.2% +2.6, +7.5 | +4.6% +3.3, +6.0 | Table 1. Shift of the estimate between two conditions on the same meals. Energy rows: Holm-corrected p < 0.001. | Model | Condition | Energy error | Energy vs no example | MAE kcal | MAE vs no example | |---|---|---|---|---|---| | Haiku 5.5 | No example | +3.6% -5.4, +13.8 | baseline | 170 | baseline | | | Example | +10.8% -0.8, +24.7 | +3.9% +1.7, +6.6 | 177 | +7 -3, +19 | | | Doubled | +14.8% +3.3, +27.9 | +9.0% +6.2, +11.5 | 174 | +4 -9, +17 | | | Halved | -0.3% -9.1, +9.5 | -4.3% -5.9, -2.6 | 179 | +9 +1, +18 | | | Optional fields filled | +5.9% -3.5, +16.2 | +2.2% -0.2, +4.3 | 165 | -5 -13, +2 | | | Doubled, labelled wrong | +11.7% -0.3, +25.8 | +5.2% +2.6, +7.5 | 175 | +6 -5, +17 | | | Optional fields empty | +7.1% -2.9, +17.9 | +2.8% +0.3, +4.9 | 168 | -2 -10, +6 | | Sonnet 5.5 | No example | -7.0% -12.9, -0.6 | baseline | 145 | baseline | | | Example | -2.0% -8.5, +4.6 | +4.7% +3.2, +6.4 | 144 | -1 -7, +5 | | | Doubled | +0.1% -6.1, +6.8 | +7.5% +6.1, +9.1 | 136 | -10 -17, -2 | | | Halved | -7.5% -13.5, -1.1 | -0.8% -2.2, +0.5 | 151 | +6 +1, +11 | | | Optional fields filled | -2.8% -9.2, +4.2 | +4.0% +2.7, +5.3 | 144 | -1 -7, +5 | | | Doubled, labelled wrong | -2.6% -8.9, +4.0 | +4.6% +3.3, +6.0 | 138 | -7 -13, -2 | | | Optional fields empty | -3.4% -9.6, +3.1 | +3.6% +2.4, +4.8 | 142 | -4 -9, +2 | Table 2. Energy error against logged amounts, and mean absolute error in kcal. "vs no example": paired over the same 128 meals, energy as mean log ratio, MAE as mean difference in kcal, 95% intervals from resampling the meals. | Condition | Haiku 5.5 | vs no example | Sonnet 5.5 | vs no example | |---|---|---|---|---| | No example | 10% | baseline | 5% | baseline | | Example | 7% | -3 pp | 0% | -5 pp | | Optional fields filled | 15% | +5 pp | 7% | +2 pp | | Optional fields empty | 12% | +2 pp | 1% | -4 pp | Table 3. Share of answers that filled the optional nutrition basis field. Filled vs example, McNemar: Haiku 13 meals against 2, Holm-corrected p = 0.052; Sonnet 9 against 0, p = 0.031. Holm runs over the eight fill-rate comparisons. What I recommend Don’t use examples at all. I would need to see proof that they are worth the tokens they take up before reconsidering. Even where the bias they introduce is acceptable, examples don’t improve the output beyond hammering that bias in. If you do use examples, at least be aware of the problems they bring. When you write a prompt yourself, this is easy: you just leave the examples out. But how do you stop a coding agent from adding them? Examples seem to run so deep in these models’ post-trained nature, that rules and instructions won’t keep them out. In the following I share two things I use, and you’re welcome to use them too. A hook. I set up a hook for Claude Code that makes a cheap Haiku call whenever the main agent modifies an instruction or rule file, and blocks the edit when it tries to add examples. I feel it fires on pretty much every edit. It seems like whenever the agent writes anything more than a tiny change, there is an example in it. This hook has helped me enormously and made my workflows far better. ~/.claude/hooks/rule examples.py : """PreToolUse on Write|Edit: deny a write that adds example markers to a rule file. Counts markers in the text being replaced and in the new text, so existing wording is left alone and only additions are refused. """ import json import os import re import sys RULE FILE = re.compile r"/.claude/projects/ ^/ +/memory/|/CLAUDE.md$|/AGENTS.md$|/SKILL.md$" MARKER = re.compile r"e.s?g.|for ?:example|instance |such as", re.IGNORECASE, def main - None: payload = json.load sys.stdin tool input = payload.get "tool input", {} path = tool input.get "file path", "" if not RULE FILE.search path : return if payload.get "tool name" == "Write": new = tool input.get "content", "" old = open path, encoding="utf-8" .read if os.path.exists path else "" else: new = tool input.get "new string", "" old = tool input.get "old string", "" if len MARKER.findall new <= len MARKER.findall old : return print json.dumps { "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "This write adds an example marker to a rule file. " "State the rule as a principle without examples, then write again." , } } if name == " main ": main ~/.claude/settings.json , with one prompt-hook entry per if pattern: Edit and Write on /CLAUDE.md , /AGENTS.md , /SKILL.md and ~/.claude/projects/ /memory/ . { "hooks": { "PreToolUse": { "matcher": "Write|Edit", "hooks": { "type": "command", "command": "uv run --no-project -q python -I ~/.claude/hooks/rule examples.py", "timeout": 20 }, { "type": "prompt", "model": "claude-haiku-5-5", "prompt": "You review one edit to a rule file for Claude agents.\n\n