few-shot prompting

Show AI what you want with a few examples (few-shot prompting)

Two or three examples teach tone and format faster than a paragraph of instructions.

In short

Few-shot prompting means giving AI two to five examples of what you want before your real request, so it copies the pattern.

  • Use it for tone, style, and format: paste a few input-and-output pairs, then your new input.
  • Label the parts so the pattern is obvious: Input and Output, or Before and After.
  • Three to five examples is the sweet spot. More rarely helps and costs you space.
  • Keep the examples consistent. The model copies whatever they share, including mistakes.
The short version

What few-shot prompting is

Few-shot prompting is the simplest way to get AI to match a style. Instead of describing what you want, show it two to five examples first, then give your real input. The model reads the pattern in your examples and applies it, which works far better than adjectives like 'make it punchy.' It is the same instinct as training a new hire by handing them three good examples of the report you want. Asking cold is zero-shot; asking with samples attached is few-shot. For anything with a consistent format, few-shot wins. Examples are the strongest single upgrade in how to write a good prompt, and they are what makes matching a tone of voice work at all. It is core prompt engineering.

The workflow

How to write a few-shot prompt

Show the pattern, then ask: examples first, real input last.

  1. 1

    Collect two to five good examples

    Pull real input-and-output pairs that show the exact pattern you want: a rough note and the polished version, a question and the ideal answer.

  2. 2

    Label them consistently

    Mark each pair the same way, 'Input:' and 'Output:' or 'Before:' and 'After:'. The labels make the pattern impossible to miss.

  3. 3

    Add a one-line format instruction

    Pair the examples with a short rule like 'match the tone and length of the outputs above' so the model knows what to copy.

  4. 4

    Give your real input last

    End with the new input in the same format and let the model produce the matching output.

  5. 5

    Prune examples that conflict

    If two examples pull in different directions, the model splits the difference. Keep only the ones that agree.

Copy this

A few-shot prompt template

Here are examples of what I want:
Input: [example 1 in] -> Output: [example 1 out]
Input: [example 2 in] -> Output: [example 2 out]
Match the tone, length, and format of the outputs above.
Now do the same for: [your real input]

Watch-outs

  • Consistency is everything. The model copies what your examples share, so a quirk in all three becomes a rule.
  • Three to five examples is plenty. A dozen wastes space and rarely improves the match.
  • For facts, examples teach format, not truth. Still verify the content of the answer.
FAQ

Common questions

What is few-shot prompting?

It is showing the AI a few examples of the input and the output you want before your real request, so it copies the pattern. Two to five examples usually do it. It steers tone, style, and format better than describing them in words.

How many examples should a few-shot prompt have?

Three to five is the sweet spot: enough to make the pattern clear without wasting space. One example (one-shot) helps for simple formats; a dozen rarely beats five and can crowd out your real request.

When should I use few-shot prompting?

When the output needs a specific tone, style, or structure: rewriting in your voice, formatting data a set way, sorting items into categories, or drafting in a house style. If describing the format is not landing it, show examples instead.

What is the difference between zero-shot and few-shot?

Zero-shot is asking with no examples and letting the model rely on its training. Few-shot adds a handful of examples in the prompt so it matches your specific pattern. Few-shot costs a little space and buys a lot of consistency.

See how you actually work with AI

The AI Skills Quiz scores your real habits, including how you steer the model toward the output you want. Free, and it takes a couple of minutes.

Professionals from these companies build their AI skills with Candova

Study.comMoneyGeekHatchOsteriaGuild CraftLearn.orgFGAParallelVestaboardRieckenProsperityStudy.comMoneyGeekHatchOsteriaGuild CraftLearn.orgFGAParallelVestaboardRieckenProsperity

The future belongs to AI‑native companies.
Make sure yours is one.

We make your people AI-fluent so your company becomes AI-native, with Cando, a personal AI trainer for every employee. Start with Candova AI today.

Free to start · Productivity gain guarantee · Built for your real job

Future-proof your work with AI

On-demand · start today

Get started