Skip to content
mentoor

Topic 2 of 5 · 4 min read

Example sets of good and bad outputs

Goal: Build an annotated example set with good, bad and borderline outputs, each labelled with the rule it shows.

An example set is a table of real inputs paired with good, bad and borderline outputs, each one labelled with the rule it shows. For an AI feature, the examples are part of the requirement. Words describe what you want. Examples show it.

Check yourself · 1 of 3

Why does an example set include borderline outputs as well as good and bad ones?

Choose one answer

Why it matters

Two engineers can read the same rule, "keep answers short", and picture a one-line reply and a three-paragraph reply. A pair of examples ends that argument. Examples also become the first test cases and, in a prompt, the few-shot examples that steer the model. The OpenAI Model Spec uses this method: each rule comes with a compliant and a violating reply.

How to build the set

  1. Collect real inputs. Use actual support chats, search queries or tickets, not what you imagine users type. Include messy ones: typos, two questions in one, angry messages.
  2. Write golden answers. For each input, the reply you would be happy to ship. Keep them short and written by someone who knows the domain.
  3. Add known bad answers. The failures you fear: an invented policy, a promise you cannot keep, a leaked internal note. Get these by running a model on your inputs and keeping what goes wrong.
  4. Add borderline cases. Outputs that are almost fine. They teach the most, because they show where the line is.
  5. Annotate each row. Write the rule it shows and why it passes or fails. Without the reason, the example is a data point and the next person cannot generalise from it.

A useful set has a spread of the feature's jobs, covers each never rule at least once, and holds 20 to 50 rows to start. Add a row every time production surprises you.

Before and after

Before: Example: "Good answer: a clear reply about our refund policy."

This describes an example without being one.

Input Output Verdict Rule and reason
"Can I return shoes I wore once?" "Worn items cannot be returned. Unworn shoes can be returned within 30 days." Good Must cite the policy window; states the condition.
"Can I return shoes I wore once?" "Sure, we will refund you today!" Bad Never promise a refund; the policy excludes worn items.
"Can I return shoes I wore once?" "Our policy covers unworn items. I will pass you to a colleague to check your case." Borderline Correct and safe, but escalates when a direct answer was possible.

What goes wrong

  • Only golden answers are collected, so nobody knows what failure looks like.
  • Examples have no annotation, and the team argues about why a row passed.
  • The set is written once and never grows. It stops matching what users actually ask.
  • The examples all come from the author's imagination and miss messy real input.

Examples

A borderline row with its reason

Input: "My parcel is late, is this your fault?"

Output: "I am sorry the parcel is late. I cannot say whose fault it is, but I can check the tracking for you."

Verdict: borderline. Rule: no blame, one apology at most. It passes on tone and stays honest, but it asks a question the customer did not need to answer, so a reviewer may mark it down for length.

Where bad answers come from

A team ran 200 real support questions through a draft prompt and read every reply. Eleven invented a delivery time. Those eleven became the first known-bad rows, each tagged with the never rule it broke: "never state a delivery date that is not in the order data".

Key points

  • Examples are requirements: they show what words alone leave open to interpretation.
  • A good set has golden, known bad and borderline outputs, because the borderline cases mark where the line is.
  • Every row carries the rule it shows and the reason it passes or fails, so others can generalise from it.
  • Start from real inputs, including messy ones, and add a row each time production surprises you.
  • The same set later becomes test cases and few-shot examples in the prompt.

Common mistakes

  • Collecting only good examples, so the team never defines what failure looks like.
  • Leaving examples without a reason, which turns the set into data nobody can learn from.
  • Writing inputs from imagination instead of using real, messy user messages.
  • Treating the set as finished at launch instead of adding rows when production finds new failures.

Check yourself · 2 of 3

A row in an example set reads: Input, Output, Verdict "Bad". What is missing?

Choose one answer

Check yourself · 3 of 3

Where should a product manager find the inputs for the first examples?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic