Chapter 2 · Practice 2 of 5
Build the eval set from real inputs, including the awkward ones
Why it matters
Synthetic, tidy examples make every model look good. To learn how your app really behaves, test it on what real users send.
Collect real inputs from logs or a pilot, with permission and with personal data removed. Then add the awkward cases on purpose:
- empty input
- very long input
- the wrong language
- off-topic or hostile messages
- cases where humans disagree
Start with 50 to 100 examples and label the expected output or grading rule for each one. Keep a held-out slice you never tune prompts against, so you can tell real gains from overfitting.
Grow the set every time a bug reaches users. Each production failure you fix should become a test case, so it cannot quietly come back.
Do
- Label expected outputs or grading rules for each case
- Keep a held-out slice you do not tune prompts against