{"id":523,"date":"2026-07-30T05:01:12","date_gmt":"2026-07-30T05:01:12","guid":{"rendered":"https:\/\/abrarqasim.com\/blog\/few-shot-prompting-when-more-examples-make-it-worse\/"},"modified":"2026-07-30T05:01:12","modified_gmt":"2026-07-30T05:01:12","slug":"few-shot-prompting-when-more-examples-make-it-worse","status":"publish","type":"post","link":"https:\/\/abrarqasim.com\/blog\/few-shot-prompting-when-more-examples-make-it-worse\/","title":{"rendered":"Few-Shot Prompting: When More Examples Make It Worse"},"content":{"rendered":"<p>I spent an afternoon last week making a prompt worse, and I didn&rsquo;t notice until the eval numbers came back. My support-ticket classifier kept mislabeling refund requests as billing questions, so I did the obvious thing. I added more examples. Three became eight. Accuracy dropped four points. I stared at the diff for a bit, decided the model just needed a couple more, and added two more out of pure stubbornness. It dropped again.<\/p>\n<p>That&rsquo;s when I went looking for whether this was a known problem or just me having a bad day. It&rsquo;s a known problem. It even has a slightly annoying name: over-prompting. And once I understood what was happening, I stopped treating &ldquo;add more examples&rdquo; as a free lunch. Here&rsquo;s what I&rsquo;ve learned since, including the part where the research disagrees with the advice most of us have been repeating.<\/p>\n<h2 id=\"what-few-shot-prompting-actually-is\">What few-shot prompting actually is<\/h2>\n<p>Few-shot prompting means you show the model a handful of input-output examples before asking it to handle a new case. Zero-shot is when you just ask. One-shot is one example. Few-shot is a few. The idea got popular with the <a href=\"https:\/\/arxiv.org\/abs\/2005.14165\" rel=\"nofollow noopener\" target=\"_blank\">GPT-3 paper<\/a>, which was literally titled &ldquo;Language Models are Few-Shot Learners,&rdquo; and the headline finding was that you could steer a model&rsquo;s behavior with examples in the prompt instead of fine-tuning it.<\/p>\n<p>In practice it looks like this:<\/p>\n<pre><code class=\"language-text\">Classify each support ticket as: refund, billing, or technical.\n\nTicket: &quot;I was charged twice this month, please reverse one.&quot;\nLabel: billing\n\nTicket: &quot;The app crashes every time I open the export screen.&quot;\nLabel: technical\n\nTicket: &quot;I want my money back for the annual plan I never used.&quot;\nLabel: refund\n\nTicket: &quot;My card got charged after I cancelled. Fix this.&quot;\nLabel:\n<\/code><\/pre>\n<p>The model reads the pattern and fills in the last label. When it works, it feels like magic. You didn&rsquo;t train anything. You just showed it what you wanted. For a lot of tasks, especially formatting and classification, a few good examples beat a paragraph of instructions.<\/p>\n<p>So the folk wisdom became: if the output is wrong, add more examples. More is more. That&rsquo;s the part that turned out to be shaky.<\/p>\n<h2 id=\"the-over-prompting-trap\">The over-prompting trap<\/h2>\n<p>Over-prompting is what happens when extra examples stop helping and start hurting. My classifier is a clean case. The first three examples pinned down the format and the boundary between &ldquo;billing&rdquo; and &ldquo;refund.&rdquo; Examples four through ten mostly added noise. A few of them were edge cases I&rsquo;d hand-picked because they were tricky, which meant I was teaching the model that the tricky reading was the normal one.<\/p>\n<p>There&rsquo;s a paper from this year, <a href=\"https:\/\/arxiv.org\/abs\/2509.13196\" rel=\"nofollow noopener\" target=\"_blank\">The Few-shot Dilemma: Over-prompting Large Language Models<\/a>, that puts numbers on this. The authors test the standard assumption that more relevant few-shot examples always help. Their result, in their words, &ldquo;contradicts the prior empirical conclusion that more relevant few-shot examples universally benefit LLMs.&rdquo; Piling on domain-specific examples degraded performance for some of the models they tested. Not all. That&rsquo;s the part that makes this genuinely annoying to reason about.<\/p>\n<p>I wrote about a related failure a while back, where a longer prompt meant to reduce hallucinations <a href=\"https:\/\/abrarqasim.com\/blog\/llm-context-window-anti-hallucination-prompt-backfired\" rel=\"noopener\">made the output worse instead<\/a>. Same shape of problem. You add something that should obviously help, the model gets more to chew on, and quality goes down. Prompts aren&rsquo;t additive the way we keep pretending they are.<\/p>\n<h2 id=\"what-the-research-actually-measured\">What the research actually measured<\/h2>\n<p>The paper is worth reading properly rather than taking my summary for it, but here&rsquo;s the gist. They set up a framework with three ways of picking which examples to include: random sampling, semantic embedding similarity, and TF-IDF vectors. Then they ran it across a spread of models, including GPT-4o, GPT-3.5-turbo, DeepSeek-V3, Gemma-3, several LLaMA versions, and Mistral.<\/p>\n<p>Two findings stuck with me.<\/p>\n<p>First, there&rsquo;s no single magic number of examples. The optimal count is per-model. What helped GPT-4o wasn&rsquo;t the same as what helped a smaller LLaMA. So any blog post (including this one) that tells you &ldquo;use five examples&rdquo; is guessing. You have to measure it on your model and your task.<\/p>\n<p>Second, they got their best results not by cramming in more examples but by combining TF-IDF selection with a stratified sampling approach and tuning the quantity per model. In other words, the win came from picking better examples and stopping at the right point, not from volume. That matches my experience more than any prompting guide I&rsquo;ve read.<\/p>\n<p>I want to be careful here. This is one paper on a specific set of classification tasks. It&rsquo;s not a law of nature. But it lines up with a thing I keep seeing in my own work, and one clean study that confirms a suspicion is worth more to me than ten confident threads that don&rsquo;t cite anything.<\/p>\n<h2 id=\"why-i-think-this-happens\">Why I think this happens<\/h2>\n<p>I don&rsquo;t have a rigorous mechanism for you, just a working theory that&rsquo;s survived contact with a lot of prompts.<\/p>\n<p>Examples cost context budget, and they cost attention. Every example you add is more tokens the model has to weigh against the actual question. If your examples are near-duplicates, the extra ones don&rsquo;t add information, they just add mass that pulls the model toward whatever surface pattern they share. And if you hand-pick &ldquo;hard&rdquo; examples because you&rsquo;re proud of catching the edge cases, you can accidentally shift the model&rsquo;s sense of what a typical case looks like. I did exactly that. My tricky refund examples taught the model that ambiguous tickets are usually refunds, which is not true.<\/p>\n<p>The official prompting docs from the model vendors, like <a href=\"https:\/\/docs.claude.com\/en\/docs\/build-with-claude\/prompt-engineering\/overview\" rel=\"nofollow noopener\" target=\"_blank\">Anthropic&rsquo;s guide<\/a>, already hint at this when they talk about using relevant, diverse examples. Diverse is the operative word. Three examples that cover different cases beat eight that cover the same case three times over.<\/p>\n<h2 id=\"how-i-pick-the-number-of-examples-now\">How I pick the number of examples now<\/h2>\n<p>My process got less clever and more boring, which is usually a sign it got better.<\/p>\n<p>I start at zero-shot and actually check whether the model needs examples at all. Modern models are good enough that a clear instruction sometimes wins outright, and zero examples means zero tokens spent and zero chance of over-prompting. If zero-shot is close but sloppy on format, I add one example that shows the exact shape I want.<\/p>\n<p>If accuracy is the problem, I add examples one or two at a time and I re-run the eval after each change. No eval, no opinion. When accuracy stops improving, I stop, and if it drops, I roll back to the previous count. I aim for coverage of distinct cases rather than a target number. Two examples that disagree in an instructive way teach more than five that all say the same thing.<\/p>\n<p>I also keep the examples diverse on purpose and resist the urge to stack my favorite hard cases at the front. The model reads position as importance more than I&rsquo;d like it to.<\/p>\n<p>This is the same measure-then-decide habit I lean on for most of the AI work I take on, and I&rsquo;ve written up a few of those builds in my <a href=\"https:\/\/abrarqasim.com\/work\" rel=\"noopener\">portfolio<\/a> if you want to see it applied to real projects.<\/p>\n<h2 id=\"a-checklist-before-you-paste-ten-examples\">A checklist before you paste ten examples<\/h2>\n<p>Here&rsquo;s the thing you can actually do this week. Next time a prompt is underperforming and your instinct says &ldquo;add more examples,&rdquo; run a tiny experiment first. Take your eval set, or make a quick one of twenty cases if you don&rsquo;t have one. Test the prompt at zero, two, four, and eight examples. Plot the accuracy. You&rsquo;ll usually find a peak somewhere before eight, and often the peak is lower than you&rsquo;d guess.<\/p>\n<p>That fifteen-minute test has saved me from shipping bloated prompts more than once. My classifier, for the record, was best at three examples. The eight-example version I was so sure about was the worst of the lot. More wasn&rsquo;t more. It rarely is.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding more few-shot examples can quietly make your LLM prompt worse. Here is what the over-prompting research found and how I size the example set now.<\/p>\n","protected":false},"author":2,"featured_media":522,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"","rank_math_description":"Adding more few-shot examples can quietly make your LLM prompt worse. Here is what the over-prompting research found and how I size the example set now.","rank_math_focus_keyword":"few shot prompting","rank_math_canonical_url":"","rank_math_robots":"","footnotes":""},"categories":[4,217],"tags":[587,588,5,589,113],"class_list":["post-523","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-llm","tag-few-shot-prompting","tag-in-context-learning","tag-llm","tag-over-prompting","tag-prompt-engineering-2"],"_links":{"self":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":0,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/media\/522"}],"wp:attachment":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}