Complete AI Training

Prompt framework course · 6 chapters · 15 min · certificate

Few-Shot Prompting: Teach the AI With Examples

Zero-shot, one-shot and few-shot: how examples steer format, tone and quality more than any instruction.

What you'll learn

  • Tell zero-shot, one-shot and few-shot prompts apart
  • Pick the right example level for a task
  • Choose relevant, diverse and correct examples
  • Format labelled input and output pairs clearly
  • Capture your brand voice with real samples
  • Build and refresh a reusable example bank

Chapters

6 chapters · 14:53
  1. 2:53 01Start here Members Zero, one or few This lesson explains what a prompt framework is and how zero-shot, one-shot and few-shot prompting differ, with examples as the cheapest quality upgrade.
  2. 2:26 02Mechanism Members Why examples work This lesson explains why giving the AI three to five examples is the most reliable way to control format, length, tone and detail at once.
  3. 2:27 03Craft Members Choosing good examples This lesson teaches how to choose few-shot examples that are relevant to the task, diverse from each other, factually correct, and include one edge case so the model handles unusual inputs.
  4. 2:21 04Structure Members Formatting examples This lesson teaches you to label examples clearly, show input and output pairs, and place the real task after the examples so the AI copies your pattern.
  5. 2:11 05Voice Members Examples for style and voice This lesson teaches you to paste your best writing, have the AI describe the style, and reuse that description so every draft sounds like your brand.
  6. 2:35 06Apply it Members Examples in your job This lesson shows you how to build an example bank for your most common outputs, add one example to any framework like CO-STAR, and refresh examples whenever your standards change.

Study guide

Few-Shot Prompting: Teach the AI With Examples

Most people write instructions and hope the AI guesses the rest. It usually guesses wrong. This course shows you a simpler and more reliable method: give the AI a few examples of the output you want, and let it copy the pattern. You will learn the difference between zero-shot, one-shot and few-shot prompting, where those terms come from, and how to choose the right level for the task in front of you.

The course is built for busy professionals who use ChatGPT, Claude or Gemini at work and want consistent results without technical setup. Every lesson covers the why, the how, a worked example from a real job, and a common mistake to avoid. By the end you will have a small example bank, a reusable template, and a monthly routine that keeps your prompts sharp as your standards change.

What is a prompt framework?

A prompt is the request you type into an AI tool such as ChatGPT, Claude or Gemini. A prompt framework is a reusable structure for that request: a short checklist of the parts a good prompt contains, usually named with an acronym so it is easy to remember. Why it helps: the AI fills in whatever you leave out with generic guesses. A framework makes sure you include the parts that change the answer, such as who it is for, what you want to achieve and the format you need.

Frameworks make prompts repeatable: you fill the same parts each time, save the prompt as a template and share it with colleagues. They are not magic words: the value comes from the detail you put in each part. They help most when a request is complex or open to interpretation; a quick, simple question can stay short. There are well over sixty named frameworks, and most of them remix the same ingredients: role, task, context, audience, format, constraints and examples.

In this course you learn Few-shot, which is a prompting technique from AI research: instead of slots to fill, it changes how the AI works through a task, and you can add it on top of any fill-in framework. It is best for: matching a style, classification, extraction and consistent formatting.

Zero, one or few: choosing your level

Zero-shot prompting gives the AI an instruction with no examples at all. It works well for simple, familiar tasks, but it tends to produce generic output because the model has to guess your intent, tone and format. One-shot prompting adds a single example to the instruction. That one example is often enough to lock in a format or a tone, which makes it a very efficient step up from zero-shot. Few-shot prompting gives several examples, and it is the strongest of the three when the task has a pattern, a house style or a structure the AI needs to copy rather than invent.

The terms come from the GPT-3 paper by Brown and colleagues in 2020. That paper showed that models can learn a task from examples placed in the prompt, with no retraining and no technical setup. Examples are the cheapest quality upgrade in prompting. Rewriting an instruction takes effort and may not help at all. Adding one clear example usually shifts the output immediately toward what you want.

Choosing a level is a judgement call, not a rule. Start low, check the output, and move up a level whenever the answer feels generic, off-format or in the wrong voice. If a zero-shot summary reads like a press release when you wanted a plain update, add one example of a plain update. If the format still drifts, add two more.

Why examples work better than descriptions

An example carries four signals at once: format, length, tone and level of detail. You do not need to describe these in words because the example shows them directly. Anthropic calls examples one of the most reliable ways to steer output and recommends using three to five examples. That range gives the AI enough pattern to follow without wasting space in your prompt.

Research found that few-shot prompting with three to five examples is often the best cost-to-quality trade-off. You get most of the quality benefit without a huge prompt. The AI does not guess what you want. It matches the pattern it sees in your examples, so clear examples lead to consistent output.

Using fewer than three examples can leave the pattern too weak. Using more than five rarely adds much and makes your prompt longer than it needs to be. For most workplace tasks, three well-chosen examples are the practical sweet spot.

Choosing good examples: relevance, diversity, correctness

Relevance means the example looks like the real task. If the example is from a different job family, industry or format, the model learns the wrong pattern and applies it to your task. Diversity stops the model copying surface details. Vary the names, roles, lengths and phrasing across examples so the model picks up the underlying rule, not the specific story.

Correctness is non-negotiable. A single wrong fact in an example teaches the model to guess or invent. Check every example against the source before you paste it into a prompt. An edge case is one example where something unusual happens, such as a career gap or a missing qualification. It shows the model how to behave when the real input does not fit the normal pattern.

Keep the shape of each example the same. Same fields, same order, same labels. Change the content, not the structure, so the model can see the pattern clearly. If one example lists a name, a date and a reason, every example should list a name, a date and a reason in that order.

Formatting examples so the AI copies the right thing

Labels tell the model where an example starts and stops. Use the same label wording every time, such as Example 1 and Example 2, or wrap each one in tags like example and end example. A transformation example only works as an input and output pair. The input shows what arrives, the output shows the exact result you want, and together they define the change.

Order matters in the prompt structure. Examples come first and the real task comes last, so the model knows which item to act on and which items to learn from. Unlabelled examples blend into your instructions, and the model may convert them as if they were real data. Clear edges prevent extra or wrong outputs.

For repeated work, keep your labelled example pairs in a template you can paste into any chat. You swap only the real input at the end each time. That turns a fiddly prompt into a two minute job.

Examples for style and voice

Show, do not tell. Adjectives like friendly or professional mean different things to different people. Two or three real samples remove the guesswork because the AI can see the pattern in your own words. Describe before you write: asking the AI to name the style first gives you a written description you can save. That description is reusable and it explains why a draft works, so you are not relying on luck.

Generate and prune. Once the style is described, ask the AI for more examples in that voice, then keep only the good ones. The kept lines become fresh samples for the next round, so your set improves over time. Sample quality sets the ceiling. The AI copies what you give it, so rushed or off-brand samples produce rushed, off-brand output. Choose pieces you would show a new colleague.

Keep the set small. Two or three strong samples usually beat ten mixed ones. Too many samples blur the pattern and the AI averages them into something bland.

Examples in your job: build an example bank

An example bank is a small saved collection of outputs you are happy with, covering the three things you produce most often at work. It turns prompt writing from a blank page into a copy and paste job. Any framework improves when you add one example. CO-STAR plus one example beats CO-STAR alone, because the example shows the model the finish line rather than only describing it in words.

The model copies what you show it. If your examples are old, you get old wording and old formats back. Refresh your examples whenever your standards change, ideally the same week. Place your example just before the instruction in the prompt. The model reads the pattern first, then applies it to your new task, which is the practical version of in-context learning.

A short monthly routine keeps the bank useful. Check each example still matches how you work, replace anything stale, and add one new example from recent work you were proud of. Ten minutes a month is enough to keep your prompts producing output you would actually send.

Frequently asked questions

What is the difference between zero-shot, one-shot and few-shot prompting?

Zero-shot gives the AI an instruction with no examples. One-shot adds a single example. Few-shot adds several, usually three to five. Start with zero-shot, then move up a level whenever the output feels generic or off-format.

How many examples should I use in a few-shot prompt?

Anthropic recommends three to five examples, and research found that range is often the best cost-to-quality trade-off. Fewer than three can leave the pattern too weak. More than five rarely adds much and makes your prompt longer than it needs to be.

Where should examples go in my prompt?

Put your examples first and the real task last. The model reads the pattern in the examples, then applies it to your new input. Label each example clearly so the model does not treat it as real data.

Can I use few-shot prompting to match my brand voice?

Yes. Paste two or three pieces of your best writing, ask the AI to describe the style, then save that description. Use it to generate more lines in that voice, keep only the good ones, and your sample set improves over time.

How often should I update my examples?

Refresh your examples whenever your standards change, ideally the same week. A short monthly check works well: confirm each example still matches how you work, replace anything stale, and add one new example from recent work.