Few-Shot · Zero-Shot
Few-shot / Zero-shot
What is few-shot prompting?
- Zero-shot = straight in, no examples
- Few-shot = show a few examples first
- The basics of better prompts
The only formal difference between zero-shot and few-shot is whether you include examples, but in practice what separates them is output variance. In zero-shot, the model interprets the instruction in its own way, so sentence length, number of items, and tone vary every time, even for the same request. In few-shot, the examples effectively serve as an output spec, so the model replicates tone and format that are hard to describe in words. When you ask for meeting minutes, an instruction like “keep it short and to the point” is read differently by each person, but pasting in last week’s finished minutes settles the standard immediately. Two well-made examples are often faster than ten more lines of instructions.
More examples are not always better. For tasks with a fixed answer format, such as classification or extraction, 3 to 5 examples are usually enough. Beyond that you only add tokens with almost no gain in accuracy. What matters more is how the examples are composed: keep the number per label roughly balanced, deliberately include borderline cases, and account for the bias that gives examples placed near the end more weight in the result. Giving a single example (one-shot) is also quite effective for locking in a format. But work that requires your company’s own knowledge is a job for RAG or fine-tuning, not few-shot. Examples teach the model 'how to answer'; they do not fill in facts it does not know.
The most common mistake in practice is pasting real customer data as-is into the examples. If you use emails containing names, phone numbers and contract amounts as samples, the prompt itself becomes a leak path. Some teams believe more is better and attach 20 examples, but a long prompt raises both response time and cost. Another issue is that examples go stale: if you leave examples built on last year’s report template in place, the AI ignores the revised template and keeps producing the old format. Many teams keep rewriting the instructions when results look off and never find the cause, but the first place to look is the examples.
John KimInstructor John Kim, author of B2B Marketing Design and CEO of Nanum Consulting
Ara LimExpert in global leadership, AI, and business communicationIn 2020, OpenAI’s GPT-3 paper “Language Models are Few-Shot Learners” showed that large language models can perform new tasks from just a few examples, bringing the concept into wide use.
Consider a hypothetical case. Company A, an industrial parts distributor with 210 employees and KRW 48 billion (≈ US$35,912,000) in annual revenue, had its CS team sort an average of 320 customer emails a day into four categories (delivery, returns, quotes and technical) and hand them to the right owners. Two junior staff spent entire mornings on it, and 40 misrouted emails came back every week. They decided to fix it in three weeks by tuning prompts alone, with no system development.
- Manager Kim on the CS team simply typed 'Classify this email as delivery, returns, quote or technical,' and the same email came back as a quote in the morning and as technical in the afternoon.
- Manager Kim picked the email types that were most often misclassified over the last 3 months and built 6 examples pairing each original email with its correct label, balanced at exactly 1–2 per category.
- Kim put the examples at the start of the prompt and added one line: “If unclear, answer undecided.” Answers that forced borderline emails into a category dropped noticeably.
- She ran a test on 100 cases and reread the 17 wrong answers. She found that all 3 return examples were simple exchanges, so the model was labeling even complex claims that included shipping damage as returns.
- Manager Kim replaced 2 of the examples with complex-claim cases and agreed with the team lead to review the examples every quarter.
- Four weeks later, re-forwarded emails dropped from 40 a week to 7, and daily sorting time fell from 4 hours to 40 minutes. Manager Kim said, “Six lines of examples do the work of one person.”