Few-shot and zero-shot prompting
Including a few worked examples in a prompt so the AI follows their pattern; one-shot uses a single example and zero-shot uses none.
How settled is it?
Mostly settled
Most people and products mean the same thing, with small differences.
How did we score this?Who uses it?
Power users
Common among people who use AI heavily or build things for their team.
What it is
Few-shot prompting means putting a handful of examples in your prompt, each showing an input and the output you'd want, so the AI picks up the format, tone or judgment from them rather than from a description alone. Zero-shot means asking with instructions only, and one-shot means giving a single example. It's like handing a new colleague two finished reports from last quarter instead of a style memo: the examples show what the description can't.
Keeping it straight
How you'll hear it
“Zero-shot, it kept guessing the categories. I gave it three labeled tickets and it got the rest right.”
People also say few-shot learning or multishot prompting.
Not to be confused with
Few-shot prompting shows examples inside one prompt and changes nothing permanently. Fine-tuning trains a model on many examples so the change sticks.
The honest part
Examples are often the strongest part of a prompt, sometimes stronger than the instructions around them, so choose them with care: the AI copies their quirks too. Google's Gemini guidance recommends always including examples but warns that too many can make the model copy them too closely, and Anthropic advises examples that vary and cover edge cases. If every example is a two-line email, expect two-line emails. You'll also hear "few-shot learning", which OpenAI's and Microsoft's current guides still use as a heading, but nothing is permanently learned: Microsoft's guide says the examples steer only the current response. And watch the slang: when builders say an AI "one-shotted" an app, they mean it got it right on the first try, not that it was given one example.
Your move
What this looks like in your work, and how to handle it.
People and HR
Writing rejection emails for a large applicant pool? Paste two you've sent before that struck the right tone, then the candidate details, and ask for a draft in the same style. The drafts come back warm and brief like your examples, not stiff template language.Finance
To get expense lines coded to the right category, give the AI five lines you've already coded correctly, including one tricky one, then the new batch. It returns the batch categorized your way, and you check only the lines that don't resemble any example.Sales
Give the AI two discovery-call summaries your manager praised, then today's call notes, and ask for a summary in the same structure. You get a summary that fits your CRM fields instead of a generic recap.Marketing
When product descriptions keep coming back too salesy, paste three approved ones before the new product's specs. The new description matches their length and tone, and you can drop most of the adjectives from your instructions because the examples carry the voice.Operations
To turn messy incident notes into consistent reports, show the AI one or two notes paired with the finished report you wrote from each. It converts this week's notes into the same format, with the same headings and level of detail.Legal
When sorting a stack of clauses into risk levels, give the AI a few clauses you've already rated, each with one line on why. It rates the rest with reasons in the same form, which you spot-check against your own calls.Customer Support
Paste three well-handled replies to angry customers, each with the original complaint, then the new ticket. The draft follows the pattern your best reps use: acknowledge, explain, fix, instead of a scripted apology.
In your tools
- Claude: Prompting best practices (use examples effectively)Official docs for Prompting best practices (use examples effectively) (opens in a new tab)
- OpenAI: Prompt engineering (few-shot learning)Official docs for Prompt engineering (few-shot learning) (opens in a new tab)
- Gemini: Prompting strategies (Gemini API)Official docs for Prompting strategies (Gemini API) (opens in a new tab)
- Microsoft: Prompt engineering techniques (Microsoft Foundry)Official docs for Prompt engineering techniques (Microsoft Foundry) (opens in a new tab)
Read next
- Fine-tuningGiving an existing AI model extra training on a smaller set of targeted examples, so the new behavior is built into the model itself.
- SkillA saved set of instructions, often with examples and files, that teaches an AI how to do one specific task your way, every time.
- Chain of thoughtAn AI working through a problem in intermediate steps before answering, whether you prompt it to or the model does it on its own.
Missing a word? Suggest one