Few-shot lift flattens after 3-6 examples while token cost stays linear; the right count is the smallest set that covers every distinct output shape and known edge case.
Picture teaching a new hire how to format a report. Show them one good example and they get the rough shape. Show them three covering the variations they will see and they get it solidly. Show them twelve and you are now training, not onboarding. The fourth through twelfth example each adds less than the one before, but the time you spend reading them through together does not shrink. At some point you are no longer teaching the format. You are doing the new hire's first month of work for them, on the clock, in the meeting. A prompt with twelve few-shot examples has the same shape.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Few-shot prompting is one of the cleanest wins in prompt engineering: a handful of examples can transform a model's output quality on a task. The mistake is treating example count as a dial that monotonically improves quality. The curve flattens fast, while the cost keeps scaling linearly, so the engineering question is not 'how many examples will help' but 'how many examples are still earning their tokens'.
This card unpacks the shape of the tradeoff, gives concrete sizing rules, and explains the signals that tell you the task has graduated from few-shot to fine-tuning territory.
What examples actually do
An example is a demonstration: input on one side, ideal output on the other, placed in the prompt before the actual user input. The mechanism is in-context learning. The model attends to the demonstrations when shaping its output, biasing the distribution toward the demonstrated pattern.
The first example does the most work. It converts an abstract instruction ("return JSON with these fields") into a concrete pattern the model can pattern-match. Adding a second example introduces variation: "here is what it looks like for a case slightly different from the first". A third example often covers an edge case.
Where the lift comes from
- Format adherence: examples lock in field names, indentation, casing, separator characters.
- Tone and style: examples demonstrate voice in a way instructions cannot.
- Edge-case handling: examples show what to do when the input is malformed, ambiguous, or empty.
- Output schema: examples are often more precise than a written schema because they show the schema being used rather than described.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- OpenAI's 2026 prompt engineering guide for GPT-5.5 explicitly notes diminishing returns past 4-5 examples on most tasks and points to fine-tuning for richer pattern coverage.
- Anthropic's Claude Opus 4.7 documentation recommends 2-4 well-chosen examples for structured-output tasks and prompt caching for the example block.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does example ordering affect output, and which example matters most?
Recency bias is real; the last example before the user input has outsize influence. Order examples so the one whose pattern you most want followed sits last.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Adding examples until quality stops improving without checking whether each example covers a distinct case. Three carefully chosen examples that span the actual output shapes usually beats twelve that all demonstrate the same case slightly differently.
60 second bullets to scan on the way to the call.
Shape of the few-shot lift curve and where the knee sits
Why cost stays linear while lift flattens
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.