What is few shot prompting?

Few shot prompting is a way of instructing an AI model by showing it examples of the output you want, right inside the prompt itself. Instead of describing what you need in the abstract, you give the model a pattern to follow: here is an input, here is the output I expect, now do the same for this new input.

The name comes from machine learning research. "Zero shot" means giving the model no examples. "One shot" means one example. "Few shot" means a small number, typically two to five. You do not need to know any of that history to use the technique. What matters is the practical idea: examples communicate format, tone, and reasoning constraints far more precisely than instructions alone.

A customer support manager writing escalation summaries, a content team standardizing product descriptions, a finance analyst formatting data extracts from messy tables: all of these get more consistent results when they stop describing what they want and start showing it.

The technique works across every major model. Whether your team uses ChatGPT, Claude, Copilot, or Gemini, the same principle applies. And it pairs naturally with other approaches covered in the full guide to prompting techniques.

How it works

When you include examples in a prompt, the model treats them as evidence about what a correct response looks like. It reads the pattern across your examples and applies it to the new input. No special syntax is required. You are just showing the model what you want before asking for it.

A few shot prompt has three parts:

  • Examples. Two to five input-output pairs that demonstrate the task. The model reads these to infer format, tone, length, and judgment calls you never spell out explicitly.
  • The new input. The actual thing you want processed. It follows the same structure as your examples.
  • An implicit (or explicit) instruction. Sometimes a short sentence up top, sometimes nothing at all. The examples often carry enough signal on their own.

The model does not update its weights or "learn" in any durable sense. It just reads your examples as part of the current context and generates a completion that fits the pattern. Close the chat, and the model forgets them entirely.

That is also why example quality matters more than quantity. A single sharp, representative example usually outperforms three vague ones. If your examples contain formatting inconsistencies or edge cases that are unrepresentative of the real task, the model will pick up those signals too, and your outputs will reflect them.

Worked examples

Each example below shows the prompt, a note on the output, and a short explanation of what the examples are doing.


Example 1: Rewriting customer feedback into a formal summary

Here are two examples of how we rewrite customer feedback:

Feedback: "The delivery took forever and the box was crushed."
Summary: "Customer reported delayed delivery and damaged packaging."

Feedback: "App keeps crashing when I try to checkout."
Summary: "Customer reported repeated application errors during the checkout process."

Now rewrite this feedback in the same format:
Feedback: "Nobody told me I'd be charged twice and support just hung up on me."

Output: [NEEDS REAL OUTPUT]

The two examples establish register (formal, third-person, no editorializing) and sentence structure. Without them, models frequently preserve the customer's emotional tone or shorten too aggressively.


Example 2: Generating a consistent product description

Write a product description in the style of these two examples:

Product: Wool Scarf. Description: "Soft merino wool. Warm enough for January, light enough for October. Hand wash only."
Product: Canvas Tote. Description: "Unbleached cotton canvas. Fits a laptop, a lunch, and a paperback. Spot clean."

Product: Leather Notebook Cover.

Output: [NEEDS REAL OUTPUT]

The examples lock in sentence count, rhythm, and the practical-detail-over-adjectives style. A zero-shot request for a product description rarely produces this kind of restrained copy unprompted.


Example 3: Classifying support tickets by urgency

Classify each ticket as Low, Medium, or High urgency.

"Password reset not working." → Medium
"Site completely down, no orders processing." → High
"Can I change my billing date?" → Low

Classify this ticket:
"Checkout page throwing 500 errors for half our users."

Output: [NEEDS REAL OUTPUT]

Without the examples, models often default to Medium for anything technical. The examples calibrate the model to your team's actual definitions of urgency, not its own defaults.

When to use it and when not to

Few shot examples earn their keep when the output format genuinely matters and describing that format in words would take longer than just showing it. Tone-matched email replies, structured data extraction, classification tasks with defined categories, and brand-voice copy are the clearest fits. If your team writes the same type of content repeatedly, a few examples in the prompt is usually faster than writing a detailed style guide in plain text.

It also helps when a model keeps drifting from what you want despite clear instructions. Sometimes showing is more corrective than telling.

That last point leads directly to when you should not use it. If your examples are mediocre, the model will replicate the mediocrity. It is also the wrong tool when the task is open-ended research, strategic thinking, or anything where you want the model to reason through a problem rather than match a pattern. In those cases, a zero shot prompt with clear context usually serves you better.

There is also a practical limit. Most models have a finite context window, and packing in five or six long examples eats into the space available for the actual task. One or two tight, well-chosen examples almost always outperform six loose ones.

How does few shot prompting compare with related techniques?

The table below summarizes the main options. Each has its place; the choice usually comes down to how much context you're willing to write and how consistent the output needs to be.

TechniqueWhat you provideBest forWatch out for
Zero shot promptingInstruction only, no examplesQuick tasks, broad questionsOutput format varies run to run
Few shot promptingInstruction plus two to five examplesConsistent tone, format, or classificationToken cost rises with each example
Chain of thoughtExamples that show reasoning stepsMath, logic, multi-step problemsVerbose; overkill for simple tasks
System promptsPersistent role or rules set before the conversationShared team behavior, brand voiceRequires platform access to configure

Zero shot is the right starting point when the task is straightforward and you're not worried about format. Few shot earns its extra words when you need the model to match a specific pattern. Chain of thought overlaps with few shot but emphasizes showing the model how to think, not just what the answer should look like. System prompts sit at a different level entirely: they set conditions that persist across a session rather than demonstrating a single task.

In practice, these techniques layer. A system prompt can establish the assistant's role while a few shot block in the user message shows the exact format you want. Neither cancels out the other.

Common mistakes

The most common one is giving examples that contradict each other. If two of your three examples use different tones, different structures, or different levels of formality, the model averages them rather than picking the best one. The output ends up muddled. Pick examples that are consistent in the dimension you actually care about.

A close second: choosing examples that are too easy. If you want the model to handle edge cases, your examples need to include edge cases. Showing it three clean, simple inputs trains it to expect clean, simple inputs. When the real data is messier, performance drops.

People also undercount how much the order of examples matters. Several published studies have found that the last example in a sequence has the most influence on the output, so put your best, most representative example last, not first.

One mistake that's easy to miss: using few shot prompting when the task actually needs explicit rules. If you need the model to follow a compliance checklist or apply a precise formula, a system prompt with explicit instructions will be more reliable. Examples teach style and format well. They teach rules poorly.

Finally, don't add examples just to add examples. Two strong, relevant examples consistently outperform five weak ones.

Using this across a team

Consistency is where few shot prompting pays its biggest dividend for teams. When one person figures out a set of examples that reliably produces the right tone, format, or level of detail, those examples can be shared so every team member starts from the same place, rather than reinventing the prompt each morning.

The practical problem is storage. Examples saved in a personal document or a Slack thread tend to drift: someone edits them slightly, another person loses the file, and within a month the team is running four different versions of what was supposed to be a standard prompt. A shared prompt library solves this. Instead of passing examples around informally, the team keeps a single source of truth that anyone can pull into ChatGPT, Claude, Copilot, or Gemini without copy-paste errors.

There's one thing worth getting right before you centralize anything: agree on what a good output looks like. The examples in a shared few shot prompt are essentially a miniature style guide. If the team disagrees about the standard, the examples will reflect that disagreement and the outputs will be inconsistent regardless of the tooling.

For teams managing multiple prompt types across different workflows, ready-made prompt templates can give you a starting point before you build your own example sets.

Frequently asked questions

What is few shot prompting?

Few shot prompting is a technique where you include two to five examples of the input-output pattern you want, directly inside your prompt, so the model can match that pattern in its response. Unlike zero shot prompting, which relies on instructions alone, few shot prompting shows the model what good output looks like before asking it to produce any.

How many examples should I include in a few shot prompt?

Two to five examples is the practical range for most tasks. One example often isn't enough to establish a clear pattern, and beyond five you risk filling the context window with examples rather than actual content. For short, consistent formats like subject lines or status updates, three examples tend to work well.

Does few shot prompting work the same way across ChatGPT, Claude, Copilot and Gemini?

The underlying principle is the same across all four models: examples in the prompt guide output format and tone. Minor differences exist in how each model weights recency or handles long example lists, but no special syntax is required for any of them.

Can few shot prompting replace fine-tuning a model?

For most team workflows, yes. Fine-tuning requires training data, technical access, and ongoing maintenance. Few shot prompting delivers comparable consistency for formatting and tone tasks without any of that overhead. Fine-tuning only makes sense when the task volume is very high and the prompt itself is hitting consistent limits.

Is few shot prompting suitable for sensitive or regulated content?

Examples alone do not add guardrails. If your output touches regulated content, medical information, or legal advice, you need system prompts with explicit constraints, not just examples of the right style.

Further reading

The research and resources below are worth bookmarking if you want to go deeper, whether you're refining your own prompts or building a shared library for your team.

"Chain-of-Thought Prompting Elicits Reasoning in Large Language Models" (Wei et al., 2022). The paper that formalized chain-of-thought prompting and showed why walking a model through reasoning steps, rather than just providing answer examples, improves performance on multi-step tasks. A natural next read after you've got few shot basics down. Available via Google Research.

Prompting techniques: a practical guide. Convergence's pillar guide covering the full range of techniques, from zero shot through to more structured approaches. Useful context if you want to understand where few shot prompting sits in the wider toolkit.

Zero shot prompting explained. The simplest baseline. Reading this alongside the present page clarifies exactly what examples add, and what they cost.

System prompts: how to use them. Few shot examples and system prompts are often used together. This guide explains how system prompts set context before the conversation begins, and how to combine the two without creating conflicts.

Ready-made prompt templates for teams. If you'd rather start from tested, structured prompts than build from scratch, this is where Convergence stores them. The templates are designed to be adapted, not just copied.


Published: [DATE NEEDED]. Last updated: [DATE NEEDED].