▶ Stepthrough All tutorials Blog Glossary Prompts Videos Visual guides Start Learning Free

What is few-shot prompting?

Updated · By Robert Breen

Few-shot prompting means including a few worked examples in your prompt (sample inputs with the outputs you want) so the AI can copy the pattern, voice or format. It is useful when the result you want is easier to show than to describe.

Why it matters for a small business

Some things are hard to put into rules: the way your best salesperson writes, how short your ads really are, the exact layout your accountant expects. Two or three real examples carry that information instantly. The model picks up sentence length, word choice and structure from them, often better than from a paragraph of adjectives.

The risk is that examples are copied too closely. If all three samples mention the same product or open the same way, the AI may repeat that in every answer. Good few-shot examples are varied, current and genuinely your best work.

In a real lesson: Build a Custom GPT Ad Copy Writer for Search and Social Ads

In Build a Custom GPT Ad Copy Writer, you create an Ad Copy Writer GPT for Harbor & Pine Coffee Roasters, a made-up small-batch coffee brand. After pasting the instructions, you click Upload files and attach Harbor-Pine-Brand-Voice.pdf. The voice-over notes you can upload your style guide and ads that have worked for you before, and this guide includes sample ads alongside the tone rules, character limits and current offers.

Those sample ads are the few-shot part. The instructions tell the GPT to name flavor notes and roast level and to keep Google headlines to 30 characters; the samples show what a finished, on-brand ad with those qualities actually looks like. The examples sit in a knowledge file rather than in each message, but they do the same job.

If you prefer not to build a GPT, you can do the same thing in a normal chat: paste two of your best past ads under the heading "Examples of our style" before asking for new ones.

Plain ChatGPT gives Harbor & Pine Coffee Roasters a generic, emoji-heavy answer full of placeholders
Plain ChatGPT gives Harbor & Pine Coffee Roasters a generic, emoji-heavy answer full of placeholders

Try this lesson free or read the step-by-step guide.

Common confusions

Few-shot vs zero-shot

Zero-shot prompting uses instructions only. Few-shot adds examples. Start zero-shot and add examples when you can point to something the output keeps getting wrong.

Few-shot prompting vs fine-tuning

Few-shot examples live in the prompt or a reference file and affect only that request or that GPT. Fine-tuning trains a model on many examples so the change is permanent. For a small business, a few good examples in the prompt are usually enough.

Tips

  • Two to five examples is plenty. More adds length without adding much.
  • Make the examples differ from each other in topic, so the AI copies the style rather than the content.
  • Label them clearly as examples, so the model doesn't treat them as facts to repeat.
  • Remove customer names and private details from any real example before you use it.

Where you use it: free lessons

Prompt templates that use it

Frequently asked questions

How many examples count as few-shot?
Usually two to five. One example is sometimes called one-shot.
Will the AI copy my examples word for word?
It can, especially if they all look alike. Use varied examples and tell it to match the style, not reuse the wording.

All AI glossary terms, A to Z · Free prompt templates