Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

What Is Few-Shot Prompting? (And Zero-Shot, Explained)

Few-shot prompting means including a few examples in your prompt so an AI tool copies their style, format or pattern; zero-shot means giving instructions with no examples. Examples usually make results more consistent. The catch: too many can make the model copy them too closely.

Some of the best advice I give people using AI is also the simplest: show it what you want instead of just describing it. That's the whole idea behind few-shot prompting, and its opposite, zero-shot. Once you see the difference, your emails, product descriptions and social posts start sounding more like you.

Few-shot and zero-shot prompting side by side

Google's Gemini documentation puts it neatly: prompts that give no examples are called zero-shot, and prompts that include examples are few-shot. The word "shot" simply means an example.

  • Zero-shot: you give an instruction only. "Write a friendly reminder email for an overdue appointment."
  • Few-shot: you give the instruction and a couple of finished examples first, then ask for a new one in the same style.

Wikipedia illustrates few-shot with a tiny pattern: you list a couple of word pairs, such as maison to house and chat to cat, then give a new word and the model completes the pattern. No retraining is involved. The model picks up the pattern from the prompt itself.

Why examples steer an AI tool so well

Anthropic's prompting guide says examples are one of the most reliable ways to steer output format, tone and structure, and that a few well-crafted examples improve accuracy and consistency. Google says examples help regulate the formatting, phrasing, scoping and general patterning of responses.

Words alone leave a lot of room for guessing. "Short and warm" means different things to different people. A real sample of your own writing removes the guesswork.

How to write a few-shot prompt, step by step

  1. State the task in one line. For instance, "Write a two-sentence product description in the style of the examples below."
  2. Add two or three examples. Use real pieces you're proud of. Anthropic recommends three to five examples for best results.
  3. Keep the layout identical. Google advises making the structure and formatting of every example the same so the model doesn't copy odd formats.
  4. Label clearly. Put each example under a plain heading such as "Example 1", and separate them from your instructions. Anthropic suggests wrapping examples in tags so they can't be mistaken for instructions.
  5. Finish with the new request. Give the new input and leave the output blank, so the model fills it in.

If you want ready-made starting points, my collection of ChatGPT prompt examples is a good place to begin, and you can add your own samples to any of them.

A few-shot prompting example for a small business

Say you sell handmade candles and want consistent product descriptions. You'd paste in the task, then two descriptions you've already written, each with the same layout: a scent line, a feel line and a use line. Then you'd add the details of a new candle and ask for its description. The reply will usually mirror the layout and the voice of your examples.

The same trick works for subject lines, replies to common customer questions, short bios and LinkedIn openers. If social posts are your thing, my set of LinkedIn post prompts for ChatGPT pairs well with a couple of your best past posts as samples.

Choosing good examples for few-shot prompting

Anthropic says examples should be relevant, diverse and clear. In practice that means picking pieces that look like the job you want done, not your best work from a different context. If you want replies to difficult customers, don't use cheerful launch announcements as your samples.

Include at least one example that is a little different from the rest, such as a shorter one or one that handles an awkward case. That tells the model the pattern is flexible, not a rigid template. It also helps to ask the assistant to review your examples and tell you if any are inconsistent, which Anthropic suggests as a way to check relevance and diversity.

How many examples is too many?

More isn't always better. Google warns that including too many examples can make the model overfit to them, so the output starts copying your examples too closely. It suggests experimenting to find the right number. Google also advises using specific and varied examples to help the model narrow its focus.

Variety matters. If all your examples are the same length and open the same way, you'll get more of the same.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

The limits of few-shot prompting

Wikipedia notes that what a model learns from your examples is temporary. It doesn't persist after the prompt, so you'll need to paste the examples again in a new chat unless your tool offers a way to save instructions. It also reports that results can be sensitive to the order of the examples, so if the first attempt is off, try reshuffling them.

Examples also can't fix facts. If you need accuracy about your business, give the tool the facts directly as well, and check the result.

When zero-shot prompting is enough

Zero-shot is fine for simple, common jobs: summarising a paragraph, fixing grammar, or translating a sentence. Google still recommends including examples whenever you can, saying prompts without them are likely to be less effective. My view is that if the result matters to your brand, or the style is specific, add examples. If it's a throwaway task, don't bother.

And if you'd like help building prompts your whole team can reuse, that's something I cover as an AI consultant.

Frequently asked questions

What is few-shot prompting?

It's giving an AI tool a few examples of what you want inside your prompt, so it can copy the pattern, style or format.

What is zero-shot prompting?

It's asking an AI tool to do something with instructions only and no examples.

How many examples should I use?

Anthropic recommends three to five. Google warns that too many can cause the model to overfit to them, so experiment.

Does the AI remember my examples afterwards?

Not usually. Wikipedia notes that learning from a prompt is temporary and doesn't persist after the prompt.

Is few-shot the same as fine-tuning?

No. Few-shot examples live inside your prompt. Fine-tuning changes the model itself by training it further on a dataset.

When should I use zero-shot instead?

For simple, common tasks where style doesn't matter much, such as quick summaries or grammar fixes.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.