PromptMake
2026-06-18·12 min read

Few-Shot vs Zero-Shot Prompting: Which Gets Better Results in 2026

Zero-shot first, few-shot only when evals prove it helps. Decision guide for format, classification, reasoning models, example count, and when examples hurt.

prompt-engineeringguidechatgptclaudetips

Generate optimized prompts for ChatGPT, Claude & more

Free prompt generator — no account needed.

Try Prompt Generator →

The default advice is still "add a few examples, quality goes up." That's sometimes true. Sometimes examples cost tokens, anchor the wrong pattern, and perform worse than zero-shot. In production the curve is non-monotonic: it rises, peaks, then drops.

Zero-shot means instructions only — no input/output demos in the prompt. Few-shot means two to five (sometimes more) worked examples before the real task. The model pattern-matches your examples instead of inferring purely from the instruction.

In 2026 the decision isn't which technique is better. It's which technique is better for this task on this model with your eval data. Start zero-shot. Earn few-shot with measurements.

Zero-shot: what it is and when it wins

You describe the task. The model relies on pretraining plus instruction tuning. No demos.

Zero-shot wins when:

  • The task is common in training data: summarization, translation, sentiment, general Q&A, simple code generation
  • You want flexibility — creative writing, brainstorming, open-ended analysis
  • Token budget is tight and examples would crowd out actual context
  • You're prototyping and don't know the failure mode yet
  • You're on a reasoning model where extra example chains can interfere with internal thinking

Zero-shot weakness: inconsistency. Same prompt, three runs, three formats. The model fills gaps you didn't specify — tone, length, label choice, field order.

If 95% accuracy on a generic task is enough, zero-shot is often free performance. Don't add examples because blog posts say to.

Few-shot: what it is and when it wins

You show input → output pairs. The model learns label boundaries, format, tone, and edge-case handling from the pattern.

Few-shot wins when:

  • Output format must be rigid: JSON field order, ticket labels, extraction schema
  • Categories are custom or non-standard (your internal taxonomy, not "positive/negative")
  • Brand voice or style must match existing content
  • Zero-shot gets the logic right but the shape wrong
  • Classification boundaries are subtle — one example per class beats vague definitions

Few-shot weakness: cost, maintenance, and bias toward your examples. Bad examples teach bad habits. Stale examples drift from current product rules. Long example blocks trigger lost-in-the-middle — middle examples contribute least.

One-shot: the middle ground people skip

One example is underrated. If the model produces correct content in the wrong format, one clean input/output pair often fixes it without the token cost of five examples.

Try: zero-shot → one-shot (format fix) → few-shot (label boundary fix) → dynamic retrieval (high task diversity).

Escalation beats starting at five examples because you never measured whether you needed them.

How many examples?

Brown et al. (2020, GPT-3) showed gains from in-context examples with diminishing returns past roughly 5–8. Production sweet spot for most classification tasks: 2–4 examples.

Rules of thumb:

  • One example per category or output type you need to distinguish
  • Cover edge cases, not five variations of the easy case
  • Prefer diverse examples over redundant ones
  • Put your strongest or most representative example last (recency bias)
  • Stop adding when eval scores plateau — more examples can hurt

If you need 10+ examples for stable accuracy, consider fine-tuning or a classifier. Few-shot has a ceiling around low-to-mid 90s on hard tasks.

When few-shot hurts

Examples constrain the output distribution toward your demo set instead of the broader learned distribution. Harmful when:

  • Task is already well-covered by pretraining (adding sentiment examples to sentiment analysis)
  • Examples are outdated or contradictory
  • Reasoning model copies visible reasoning chains from examples instead of using internal search
  • Examples push critical instructions into the middle of a long prompt
  • Dynamic inputs vary wildly — static examples never represent the current query

Production teams call this few-shot collapse: performance peaks at 2 examples, drops at 6 because the prompt is noisy and middle examples are ignored.

Measure. Don't assume.

Zero-shot vs few-shot vs few-shot CoT

These are separate knobs:

  • Zero-shot vs few-shot = whether you show input/output demos
  • CoT = whether reasoning steps appear (in instruction or examples)

Combinations:

  • Zero-shot + CoT trigger: standard chat model, hard reasoning (see our CoT guide)
  • Few-shot without CoT: format and classification
  • Few-shot CoT: domain reasoning with mandated step format on chat models — risky on reasoning models

Don't stack every technique because a guide showed a matrix. Pick the minimum set your eval requires.

Decision flowchart in prose

  1. Write clear zero-shot prompt with role, task, format.
  2. Run eval set (10–50 real inputs). Record pass rate.
  3. If format wrong → add one-shot example showing exact output shape.
  4. If labels/categories wrong → add few-shot with one example per class including a hard boundary case.
  5. If multi-step reasoning fails on chat model → try CoT (not more classification examples).
  6. If task diversity is high → dynamic example retrieval (pick 2–3 semantically similar demos per query).
  7. If still below target at 5+ examples → fine-tune or change model tier.

Never skip step 2. Teams that skip baselines optimize vibes.

Task-type cheat sheet

Summarization, translation, general writing: zero-shot usually enough.

Custom classification, tagging, routing: few-shot 2–4 examples.

JSON extraction with strict schema: one-shot or API structured output (prefer API — see our structured output article).

Code generation with clear spec: zero-shot; few-shot only for house style matching.

Creative marketing copy: zero-shot for variety; few-shot if brand voice must be exact.

Reasoning / math / debug on reasoning model: zero-shot spec, no example chains.

Multi-document RAG answer: zero-shot instruction; few-shot rarely helps retrieval quality.

Dynamic few-shot (2026 production pattern)

Static examples in every request don't scale when queries span dozens of intent types. Dynamic few-shot:

  1. Store labeled examples in a vector database
  2. Embed incoming query
  3. Retrieve 2–3 nearest neighbor examples
  4. Inject into prompt before the live query

You get few-shot benefits without maintaining one giant prompt that tries to cover everything. Cost: retrieval latency and example curation still matter.

Example quality beats example quantity

A bad few-shot set:

  • All easy cases from one category
  • Inconsistent label rules (example 2 contradicts example 4)
  • Outputs that don't match your current schema
  • Examples longer than the actual task context

A good few-shot set:

  • One clear example per label including a borderline case
  • Consistent formatting across all examples
  • Inputs similar length/complexity to production traffic
  • Updated when product rules change

Curate examples like test fixtures. Version control them.

Zero-shot and PromptMake

promptmake.net/text generates structured prompts from a rough idea — role, task, format for your target model. That's zero-shot by default: no curated examples, but strong structural scaffolding.

If zero-shot + PromptMake hits your format needs, you may not need few-shot at all. If labels still drift, add examples surgically to the generated base rather than hand-writing everything from scratch.

Frequently asked questions

Should I always use few-shot in production?

No. Zero-shot first. Few-shot when evals show inconsistency or wrong labels/format.

Is zero-shot the same as zero-shot CoT?

No. Zero-shot CoT adds "think step by step" or similar. Plain zero-shot has no examples and no CoT trigger.

How many examples for GPT-5.5 vs Claude vs Gemini?

Same process: measure on your data. On reasoning tiers (GPT-5.5 effort, Opus 4.8, Gemini 3.1 Pro), start zero-shot. On fast tiers (Gemini 3.5 Flash), 2–4 examples when format or labels drift.

Can few-shot replace fine-tuning?

For moderate accuracy needs, sometimes. For 99%+ on narrow tasks with lots of data, fine-tuning usually wins.

Do reasoning models need few-shot?

Rarely for reasoning chains on GPT-5.5, Opus 4.8 / Fable 5, or Gemini 3.1 Pro. Sometimes one format example. Test — often zero-shot with clear spec wins.

Where do examples go in the prompt?

After system instructions, before the live query. Bookend critical rules at end. Best example last.

Related articles

Chain-of-thought when to use — when to add CoT on top of zero/few-shot.

Lost-in-the-middle — why long example sets fail.

Prompt engineering best practices 2026 — Rule 6 on example count.

Bottom line

Zero-shot is the default. Few-shot is the upgrade you buy with eval data, not with intuition. One-shot fixes format. Two to four examples fix boundaries. More than that needs justification.

The teams winning in 2026 don't prompt with the most examples. They prompt with the fewest examples that pass the test set.

Ready to generate your own prompts?

Free. No sign-up required. Works with all major AI models.

Related articles