Skip to content
mentoor

Topic 2 of 6 · 4 min read

Testing prototypes on real user data

Goal: Assemble a prototype test set that covers common, hard and edge cases and spot a cherry-picked demo set.

A prototype is only as convincing as the inputs it was tested on, so test it on 30 to 100 real, messy examples, not on the ones that make a good demo.

Check yourself · 1 of 3

Which way of choosing 50 test inputs is most trustworthy?

Choose one answer

Why it matters

Models do well on tidy, typical inputs and fail on odd ones. Real users send typos, mixed languages, blank fields, screenshots and long rambling messages. A demo set chosen by the team is almost always cleaner than real life, because people pick examples that look good. The result is a success rate that real traffic will never match.

How to do it

  1. Collect real inputs. Take them from the system the feature will sit in: last quarter's support tickets, real invoices, real search queries. Thirty is a minimum for a rough read; up to 100 gives steadier numbers.
  2. Sample, do not select. Pick at random, or by a rule written down before you look, such as "every 50th ticket". Do not skim for good ones.
  3. Make sure three kinds are present.
    • Common: the everyday case, about half of the set.
    • Hard: ambiguous, long, or needing judgement.
    • Edge: empty, wrong language, a different request than expected, or an attempt to break it.
  4. Write the right answer for each input before running the model, ideally by someone who does the job today.
  5. Handle personal data properly. Remove names, emails, account numbers and health or payment details where you can. Check that your company allows sending the data to the model provider you are using, and which plan keeps it out of training. When in doubt, ask your privacy or security team first.

An optional engineer's view: keep the set as a file so every prompt change runs on the same inputs.

cases = [{"input": t["text"], "expected": t["category"]} for t in sampled]
hits = sum(run_model(c["input"]) == c["expected"] for c in cases)
print(f"{hits}/{len(cases)} correct")

Before and after

Before: The team tests on 8 tickets they remember as interesting. 8 of 8 are correct.

After: The team samples 60 tickets from last month, of which 28 are routine, 22 are ambiguous and 10 are odd. 41 of 60 are correct, and 7 of the 19 misses are in the odd group.

What goes wrong

  • Cherry-picking by accident: examples the team remembers are usually the memorable ones.
  • Cleaning the inputs until they look nice, which removes the very messiness users bring.
  • Leaking personal data into a public tool because it was quicker than redacting.
  • Using the test set to tune the prompt until it scores well, so the final score no longer shows how the prompt does on new inputs. Keep some inputs aside that you never tune on.

Examples

A test set for a refund-routing prototype

Sampled by taking every 40th ticket from March.

Group Count Example
Common 30 'Item arrived broken, want my money back'
Hard 20 Two complaints in one message
Edge 10 A reply in Portuguese, an empty body, a ticket that is really a sales question

Expected category written by a support lead before the run.

Spotting a cherry-picked set

A demo deck says 'tested on 20 real emails, 19 correct'. Questions to ask: who chose them, are any longer than a paragraph, are any in another language, were any emails the system got wrong left out? If nobody can say how the 20 were picked, the 19 means little.

Key points

  • Test on 30 to 100 real inputs sampled by a rule, not on examples chosen to look good.
  • Include common, hard and edge cases so the success rate is not inflated by easy ones.
  • Write the expected answer for each input before running the model.
  • Remove or protect personal data and check the provider's data terms before sending anything.
  • Keep some inputs aside that you never tune the prompt on.

Common mistakes

  • Choosing test examples by memory or by how good they look.
  • Cleaning up real inputs until they stop being messy.
  • Pasting raw personal data into a tool without checking the provider's terms.
  • Tuning the prompt on the same inputs used to report the final score.

Check yourself · 2 of 3

A test set has 60 inputs, all of them routine requests. What is missing?

Choose one answer

Check yourself · 3 of 3

Real support tickets contain customer names and card details. Before running them through a hosted model, what comes first?

Choose one answer

Practice items, not counted towards your mastery.

Start here