Skip to content
mentoor

Topic 2 of 5 · 4 min read

Choosing varied, realistic examples

Goal: Pick a set of examples that covers the real range of inputs, including a hard case, and reject an example whose output is wrong.

Choose examples that look like your real inputs, cover the range of them, include one hard case, and have outputs you have personally checked. The model learns the pattern from your set, so a narrow or flawed set teaches a narrow or flawed pattern.

Check yourself · 1 of 3

You are building examples for a ticket sorter. Which set is best?

Choose one answer

Why it matters

An example is a lesson. If all your lessons are easy and similar, the model learns an easy and similar rule. Then a real input arrives that looks different, and the answer falls apart. Research on in-context learning (Min et al., 2022) found that the format and the kind of inputs and labels in the examples matter a great deal. That is why careless examples hurt.

How to choose

  1. Start from real inputs. Pull five to ten genuine items, such as past emails, tickets or product names. Invented examples tend to be cleaner than real life.
  2. Cover the range. Look at what varies: short and long, polite and angry, one category and another. Pick examples across those differences.
  3. Add one hard case. Pick an input that is a bit ambiguous or unusual, and show the right way to handle it. For a ticket sorter, that might be a message that mentions both billing and a bug.
  4. Keep it balanced. If you sort items into categories, show each category, and do not let one category dominate. Three examples of "billing" and none of "other" teaches the model that most things are billing.
  5. Check every output. You are the teacher. Read each answer in your examples and confirm it is correct. An example with a wrong output is worse than none, because the model will treat it as the truth.

Before and after

Before: Three examples, all short, polite billing questions, all labelled BILLING.

The model learns "everything polite is billing". A rude message about a login problem will probably also come back as BILLING.

After: Four examples: a short billing question (BILLING), a long angry message about a login failure (TECHNICAL), a one-word message "refund??" (BILLING), and a message that asks about both a charge and a bug, labelled with the main issue and a note on why (BILLING).

The set now covers length, tone, category and one hard case.

What goes wrong

  • Only easy cases. The model handles tidy inputs and stumbles on messy ones.
  • One category dominates. The model leans toward whatever label it saw most.
  • A wrong or sloppy output. You copied an AI answer into the examples without reading it, and an error became part of the lesson.

Examples

A balanced set for sorting tickets

Input Why it is in the set Label
"Charged twice for March" Short, clear billing BILLING
Three angry paragraphs about login failing Long, emotional, technical TECHNICAL
"refund??" Very short, vague BILLING
"Charged for a plan, and the app crashes" Hard: two issues BILLING (main request is money)

Catching a bad example

You asked an assistant to draft three sample summaries and plan to paste them in as examples. One summary says the meeting was on Tuesday, but your notes say Thursday. Fix it first. If you paste it as is, the model learns that invented details are acceptable.

Key points

  • Examples are lessons: the model learns the pattern of your whole set.
  • Start from real inputs and cover the range, such as short and long or calm and angry.
  • Include at least one hard or ambiguous case and show the correct handling.
  • Show every category you expect, in balanced numbers.
  • Read every example output yourself, because a wrong output teaches a wrong rule.

Common mistakes

  • Choosing only tidy, easy inputs because they are quicker to write.
  • Letting one label or style take up most of the examples.
  • Pasting AI-generated examples without checking each output.
  • Leaving out a hard case, so the model has never seen how you want it handled.

Check yourself · 2 of 3

One of your examples has an output that you now see is wrong. What should you do?

Choose one answer

Check yourself · 3 of 3

Your examples show categories BILLING, TECHNICAL and OTHER. Four of the five examples are BILLING. What risk does this create?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic