Skip to content

2.3 — Rule #2 — Lead by example (the "Few-Shot")

🟢 In plain words — rather than describing the tone you want (“be warm but brief”), show it with 2-3 examples. AI imitates what it sees far better than it follows an abstract description.

Would you ask someone to sort invoices without ever showing them an example? In AI, starting with no example is called Zero-Shot (zero examples). Fine for simple tasks. But as soon as you want a precise tone or format, the queen technique is Few-Shot Prompting (a few examples).

  • The method: include 2 or 3 “input → expected output” examples in your message.
  • Example:
Aggressive customer email → Reply: calm and professional.
Confused customer email → Reply: a polite request for clarification.
Satisfied customer email → Reply: warm and brief thanks.
  • Why it works: AI is a champion imitator. Showing it examples is the most reliable way to make it adopt exactly the tone and structure you want.

🧩 Concrete example — you want to classify customer reviews by sentiment, always in the same format.

Weak prompt (zero-shot, vague format):

What's the sentiment of this review: "Fast delivery but damaged box"?

Improved prompt (few-shot, format set by the example):

Classify the sentiment. Reply in the format "Sentiment: … | Reason: …".
"Great product, highly recommend!" → Sentiment: Positive | Reason: satisfaction
"Never arrived, no reply from support." → Sentiment: Negative | Reason: delivery + support
"Fast delivery but damaged box" →

The second one guarantees a reusable format (parsable, exportable); the first lets the AI reply however it likes.

In short

  • Zero-shot = no examples; enough for simple tasks.
  • Few-shot = 2-3 “input → output” examples to fix tone and format.
  • AI is a champion imitator: showing beats describing.
  • Few-shot for style, Chain-of-Thought (next lesson) for reasoning.
How would you rate this lesson?
📝 My note

A training byBaxIA