Skip to content

Give Examples Instead of Explanations

🎯 Learning goals

  • Understand the principle of “few-shot prompting”
  • Learn how many examples is optimal
  • Be able to create effective examples for custom instructions

The previous sections covered structuring your instructions and answering the right questions. Now you’ll learn one of the most powerful techniques in prompt engineering: showing instead of telling. A single well-chosen example can replace several sentences of explanation — and give dramatically better results.

You’ve probably experienced it: you carefully explain exactly what you want, but the tone is wrong, the format strange, or the level of detail not at all what you had in mind. There’s a simpler solution — and that’s what we look at now.

The fact that examples work better than explanations isn’t a coincidence — there are four concrete reasons why the technique is so powerful.

The difference between using and not using examples is easiest to understand with a concrete case. Here’s a direct comparison.

One of the most common questions about few-shot prompting is: how many examples do I actually need? The answer is more nuanced than you might think.

Knowing that you need examples is one thing — creating good examples is another. Here’s what actually distinguishes an effective example from an ineffective one.

Few-shot prompting is one of the most powerful techniques in prompt engineering — and easier to get started with than you think.

  • Examples beat explanations — they show the model exactly what you want, including tone, format, and level of detail that are hard to describe in words.
  • Start with 1 example — only add more if the output still doesn’t match your expectations.
  • 2–3 examples are usually enough — more examples give diminishing returns and increase cost without proportional improvement.
  • Make examples realistic — reflect real usage and variation, not constructed textbook cases.
  • Show negative examples — demonstrating what you don’t want eliminates up to 80% of generic responses.
  • Consistent formatting — use the same structure (Input/Output) across all examples so the model clearly sees the pattern.

Test your knowledge

5 questions · 100% correct to pass · Review your answers when done