Interview Q&A / AI & Generative AI

BeginnerQuick answer1 min readUpdated 3 Oct 2026

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

SHORT ANSWER

Zero-shot gives only the instruction. Few-shot adds a handful of worked input and output examples in the prompt so the model copies the format and style. Few-shot often improves consistency without any training.

Explain it simply

Telling a new intern "classify these emails" is zero-shot. Showing three emails with the label you want for each, and then handing over a fourth, is few-shot.

Examples show things instructions struggle to say: exact label names, tone, length, edge cases. The model spots the pattern in the prompt and continues it, which is called in-context learning. No weights are updated, and the effect lasts only for that call.

Choose examples that are varied, correct and close to real inputs. Bad or one-sided examples mislead the model, for example if all your examples are "positive", it may lean positive. Examples also use tokens, so a long list adds cost and latency.

Example

text
Classify the message as BILLING, DELIVERY or OTHER.

Message: "Charged twice for my order" -> BILLING
Message: "Parcel hasn't arrived in 6 days" -> DELIVERY
Message: "Do you have a store in Pune?" -> OTHER

Message: "Refund not received yet" ->

What to say in the interview

"Zero-shot relies on the instruction alone; few-shot adds examples in the prompt to fix format, labels and tone through in-context learning. I pick diverse, correct examples and check cost, since examples add tokens."

Common mistakes

  • Using examples that all share the same label.
  • Confusing few-shot prompting with fine-tuning.

#prompting#few-shot#in-context-learning

Related questions

Practise more AI & Generative AI questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AI & Generative AI quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.