Home › Guides › Core skill

How to give AI examples: few-shot prompting for beginners

Few-shot prompting means showing the AI examples of what you want. Learn how to use it in ChatGPT and Claude to match your writing style, format, and tone.

By Learn2Prompt · Updated October 25, 2026 · 5 min read

Some things are hard to describe but easy to show. You might struggle to explain your writing style in words, but you can paste three emails you've written. You might not know how to describe the exact format you want, but you have a sample from last month. Giving the AI examples is one of the most reliable ways to improve results, and it has a slightly technical name: few-shot prompting.

"Shot" just means example. A "zero-shot" prompt gives no examples. A "one-shot" prompt gives one. "Few-shot" means a handful, usually two to five. You don't need to remember the terms; the idea is simply: show, don't just tell.

Why examples work so well

When you describe what you want ("friendly but professional"), the AI has to interpret your words, and its interpretation might differ from yours. An example removes that guesswork. It shows length, tone, vocabulary, structure, and formatting all at once, including details you might not think to mention.

Weaker prompt

Write product descriptions for my candles in a fun, quirky tone.

Stronger prompt

Write product descriptions for my candles. Here are two I've already written that capture our style: [example 1] [example 2]. Write new ones for these scents in the same style and length: [list scents].
Why it works"Fun and quirky" means different things to different people. Two real examples show the AI exactly what your version of fun and quirky looks like.

The basic few-shot template

Copy-ready prompt

Few-shot template

I need you to [task]. Here are examples of what I want: Example 1: [paste example] Example 2: [paste example] Example 3: [paste example] Now do the same for: [your new input]. Match the examples' length, tone, and format. Don't copy their content.
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

The final line is important. Without "don't copy their content", the AI sometimes reuses phrases or ideas from your examples too closely.

Use case 1: Matching your writing voice

This is the most popular use for everyday users. If AI drafts sound stiff or generic, paste a few things you've written and ask it to write the way you do.

Copy-ready prompt

Write like me

Here are three emails I've written that sound like me: [paste them]. Describe my writing style in a few bullet points (sentence length, tone, how I open and close, words I tend to use). Then write an email to [recipient] about [topic] in that same style.
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

Asking the AI to describe your style first has a bonus: you can save that description and paste it into future prompts, even when you don't have examples handy.

Use case 2: Getting a consistent format

When you need several outputs that look the same (meeting notes, product listings, weekly updates), an example is far clearer than a description.

Copy-ready prompt

Same format every time

Format my weekly update exactly like this example: --- **This week:** Finished the client proposal; started onboarding plan. **Next week:** Send proposal; schedule kickoff call. **Blocked on:** Budget approval from finance. --- Here are my notes for this week: [paste notes]
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

Use case 3: Sorting or labeling things

Examples are great for teaching the AI how you categorize things, such as sorting expenses, tagging customer feedback, or classifying emails.

Copy-ready prompt

Categorize like my examples

Sort these items into categories, following my examples. "Coffee with client" → Business meals "Monthly software subscription" → Software "Train ticket to conference" → Travel Now categorize: [list your items]. If any item doesn't clearly fit, mark it "Unsure" instead of guessing.
Fill in the [blanks], then paste into Claude or ChatGPT (free account). Leave out account numbers and addresses.

That last instruction ("mark it Unsure") is a good habit any time you ask AI to sort things. It surfaces edge cases instead of quietly misfiling them.

How many examples should you give?

Choose examples that are genuinely good and reasonably varied. If all your examples are about the same topic, the AI might think the topic is part of the pattern.

Common mistakes with examples

Examples that contradict your instructions. If you say "keep it under 50 words" but your examples are 200 words, the AI may follow the examples. Make them consistent.

Using bad examples. The AI will copy weaknesses as faithfully as strengths. Pick your best work.

Pasting private information. If your example emails include names, addresses, or confidential details, remove or replace them before pasting.

Forgetting to say what to copy. Be clear whether you want the AI to match tone, format, length, or all three.

Combining examples with the rest of the formula

Few-shot prompting works best alongside the other basics: a clear task, context, and a stated format. You can think of examples as a powerful version of the "format" and "tone" parts of the 5-part prompt formula. Pair them with a role (see role prompting) for even more control.

Frequently asked questions

What is few-shot prompting in simple terms?

It means including a few examples of what you want in your prompt, so the AI can see the pattern instead of guessing from a description.

Does few-shot prompting work in ChatGPT and Claude?

Yes. Showing examples is a general technique that works across AI chat assistants.

How many examples should I include?

Two or three is a good starting point for most everyday tasks. One can work for simple tone matching.

Will the AI copy my examples word for word?

Sometimes it borrows too closely. Adding "match the style and format but don't copy the content" usually prevents that.