You ask ChatGPT a question and get an answer that's technically fine but flat, too long, or badly formatted. You rewrite your instructions three times and the result barely budges. The problem is rarely the model: it's that you're describing what you want instead of showing it.
Few-shot prompting fixes exactly that. The technique fits in one sentence: before you make your real request, you slip in two to five examples of the result you want. The AI spots the pattern and reproduces it. It's the fastest way to get a stable format, a consistent tone, and answers you can use without touching them up.
Below you'll find the definition in plain language, the difference between zero-shot, one-shot, and few-shot, the four-block structure of a prompt that works, five complete prompts you can copy as-is, three ways to practice, and the mistakes that make the method fail. No technical skills required: it all happens in a normal chat window.
What Exactly Is Few-Shot Prompting?
Few-shot prompting means dropping a few examples of "request / ideal answer" pairs into your prompt so the AI copies that model instead of improvising its own.
The word shot here means "example." So we talk about a prompt with zero examples, one example, or several examples. Nothing more complicated than that.
| Technique | Examples provided | When to use it |
|---|---|---|
| Zero-shot | 0 | Simple request, open-ended answer: "Summarize this text in 5 lines" |
| One-shot | 1 | You want to enforce a specific format on a simple task |
| Few-shot | 2 to 5 | Tone, style, classification, industry vocabulary, repetitive format |
The term took off with the research paper Language Models are Few-Shot Learners, published in 2020, which showed that a large language model could handle a brand-new task purely from a handful of examples placed in the instructions, with no retraining at all. Today, the technique works on every consumer assistant: ChatGPT, Claude, Gemini, Mistral.
Worth remembering: you're not training the AI. Your examples only count for the current conversation, a bit like a template document you'd leave on a new coworker's desk before handing them a task.
Why a Few Examples Beat a Long Set of Instructions
An example conveys in three lines what written instructions would need a full paragraph to explain, and it leaves no room for interpretation.
Take an instruction like "answer in a professional but warm way, keeping it concise." Everyone has their own definition of "warm" and "concise." So does the AI. Show it a four-line reply that opens with a thank-you and ends with an open question, and the ambiguity disappears.
In practice, a good example carries six pieces of information at once that you'd never have thought to write down:
- the expected length, down to the word;
- the exact format (list, table, paragraph, single sentence);
- the tone and the person used (I, you, we);
- the vocabulary of your industry, including your in-house phrasing;
- the internal structure (hook, argument, call to action);
- how to handle edge cases (what to do when information is missing).
These models work by continuing patterns: when they see three blocks built on the same logic, producing a fourth one from the same mold becomes the most natural path. It's the direct complement to the fundamentals covered in our complete method for writing a good prompt: context says what, examples show how.
The Structure of a Few-Shot Prompt That Works
Four blocks, always in the same order: context, instructions, examples labeled identically, then your real request deliberately left hanging.
Block 1, the context. Two lines are enough: who's speaking, to whom, in what setting. "You are the customer service lead for a hiking gear store."
Block 2, the instructions. What you want to get, in one sentence. "Write a public reply to each customer review posted on Google."
Block 3, the examples. Two to five pairs, all built with the same labels. This is the heart of the technique and where most people slip up: if you write "Review:" in the first example and "Customer comment:" in the second, you break the pattern.
Block 4, the new input. You lay out your real case with the same label, then you write the output label and stop. That blank is a strong signal: the AI understands it has to fill it in.
Review: Fast delivery, but the size doesn't match the guide. Reply: Thanks for the feedback, and we're glad the delivery hit the mark. We're sorry about the sizing discrepancy: our guide has just been corrected. Write to us at contact@exemple.fr and we'll set up a free exchange.
Review: Product as described, packaging damaged on arrival. Reply: Thanks for taking the time to write to us. Damaged packaging isn't normal, and we're flagging the issue with the carrier today. If the product itself was affected, reply to this message and we'll replace the item.
Review: Three weeks of waiting and zero response from customer service. Reply:
Two formatting rules make all the difference. First, keep your separators strictly identical from one example to the next. Second, vary the cases: a positive review, a mixed one, a negative one. Anthropic's documentation on multishot prompting recommends three to five relevant and varied examples, precisely so the model picks up the general rule rather than one specific case.
Five Few-Shot Prompting Examples to Copy
Here are five complete prompts covering tasks you can test in the next ten minutes; just swap in your own content.
1. Responding to Customer Reviews
That's the example above. Three reviews covering the three possible tones, and you get consistent replies anyone on the team can publish. Typical gain: from about ten minutes per review down to under a minute of proofreading.
2. Sorting Messages by Urgency Level
Classify each message as URGENT, NORMAL, or INFO, then give the action to take in five words max.
Message: The order page has been throwing a 500 error since 9 a.m. Classification: URGENT | Action: alert the tech team
Message: Can you send me the notes from Tuesday's meeting? Classification: NORMAL | Action: send the document
Message: The September newsletter went out this morning. Classification: INFO | Action: none
Message: A client is threatening to cancel their contract tomorrow. Classification:
The pipe and the all-caps aren't decorative: they make the output easy to paste into a spreadsheet.
3. Turning a Feature into a Customer Benefit
Feature: 5000 mAh battery Benefit: Two full days without hunting for an outlet
Feature: Recycled aluminum case Benefit: As tough as a standard model, with a smaller footprint
Feature: 120 Hz display Benefit:
Three lines, and the model has understood that you want short, use-focused phrasing with no marketing adjectives. Written instructions would have taken a full paragraph.
4. Extracting Information from a Text
Extract the information as a table row: Name | Company | Need | Deadline. Write "not specified" if the information is missing.
Text: Hi, I'm Marc Dupuis from Verlaine LLC, we're looking for AI training for six sales reps before December. Row: Marc Dupuis | Verlaine LLC | AI training for 6 sales reps | December
Text: Hey, it's Léa, I'd like some info on your pricing. Row: Léa | not specified | pricing information | not specified
Text: [paste your email here] Row:
The second example exists purely to show how to handle missing information. Without it, the AI invents company names. That's the highest-payoff kind of example: the one that covers the awkward case.
5. Writing in Your Own Style
Paste three of your own texts (three posts, three emails, three intros), each preceded by its topic, then add the topic of the fourth and stop. No description of your style will ever beat your actual sentences. It's the best way to avoid that generic, polished writing you can spot from a mile away.
Where to Practice Few-Shot Prompting: Three Approaches
The most effective route is practicing on real cases with structured feedback, then experimenting freely in the consumer tools.
Approach 1: Skilzy's program and AI Lab
Skilzy is a French e-learning platform for learning AI and, above all, actually using it. The prompt fundamentals program covers few-shot step by step, with graded exercises and reusable templates for your own tasks. What sets it apart is the built-in AI Lab: you write your prompts in the real tools, credits included, without stacking up extra subscriptions on the side.
The platform has more than fifteen programs (images, video, UGC, faceless channels, avatars, voice-over, music, automation with n8n, AI-assisted coding) and prepares you for two government-recognized, fundable certifications: RS7439 in AI content marketing and RS6792 in AI and sales. Subscriptions start at €29.90 a month with no commitment, and there's a B2B offering for training organizations.
To try before you pay, the discovery demo gives you 7 days with 1 image, 1 video, 1 music track, and 10 messages, no credit card required (an account is enough).
Approach 2: Straight into ChatGPT, Claude, or Gemini
The free versions of these three assistants are more than enough to practice few-shot. The method: pick a task you repeat every week, write three examples of the perfect output by hand, and compare the results with and without examples. The gap will convince you in a single session.
Keep the prompts that work in a simple document, sorted by task. A well-built few-shot prompt stays reusable for months: you only change the last block.
Approach 3: The vendors' prompt libraries
Anthropic, OpenAI, and Google publish freely accessible prompt libraries and prompt engineering guides. The point isn't to copy the prompts as-is, but to see how the examples are labeled and separated. One caveat: these resources are mostly in English and written for developers, which makes them less comfortable when you're just starting out.
The Mistakes That Sink a Few-Shot Prompt
Most failures come down to three things: examples that are inconsistent with each other, examples that are all the same, or mediocre examples the AI faithfully reproduces.
- Changing labels halfway through. "Review:" then "Comment:" is enough to blur the pattern. Copy-paste your structure.
- Giving examples that are too similar. Three positive reviews, and the model will reply cheerfully to a furious complaint. Cover the extreme cases.
- Providing sloppy examples. The AI imitates what you show it, typos included. One rushed example produces ten rushed answers.
- Cramming in fifteen of them. Past five, you're lengthening the prompt without gaining precision, and you risk locking the model onto irrelevant details.
- Skipping the instructions. Examples show the how, not the why. Keep one sentence explaining the goal.
- Writing the output for the AI. End on the empty label. If you start the answer, you'll get a variation on your own sentence.
These habits line up with the traps listed in our article on prompting mistakes that ruin your results. And when the task calls for reasoning rather than a format (calculation, analysis, decision), combine few-shot with chain-of-thought, which makes the AI reason step by step: that way you show not just the answer, but the path to get there.
Key Takeaways
Showing costs less than explaining. Two to five well-chosen examples, labeled the same way, varied, and ending on a blank to fill in: that's the whole technique. Take a task you repeat every week, build the prompt once, reuse it a hundred times.