Build the test set before you build the agent
Why every build starts with real examples and a pass rate, and how to make your first test set in a week.
Every buyer asks the same question: how do we know it works? The honest answer is a test set. That means real cases with known right answers, run against the agent before launch and again after every change.
We build the test set first, before prompts or code, because it defines what done means. It turns “does this feel right?” into a number both sides can see.
What goes in it
- Real cases, not invented ones. Pull recent examples straight from the inbox, the CRM or the shared drive.
- The answer a good employee would give. The right route, the right field values, a reply you would be happy to send.
- The messy middle. Incomplete forms, duplicate records, off-topic messages and the odd cases your team still talks about.
- Enough to matter. We start a pilot with 50 to 100 cases, and grow toward a few hundred as new edge cases show up in production.
How we grade
We split every output into two kinds. Some can be checked exactly: the routing destination, a field value, a yes-or-no classification. Those checks run automatically.
Others need judgment, like the quality of a drafted reply. For those we write a short rubric. Does it answer the question? Are the facts right? Does it sound like you? Does it avoid promises the business cannot keep? A model grades each output against the rubric, and a person reviews a sample of those grades to keep the grader honest.
Set the bar before you see results
Decide the pass rate you need before the first run, so the results cannot talk you into a lower bar. Different outputs get different bars. Routing may need to be right almost every time. A draft reply that a person approves can start lower, because the person is the safety net.
That bar is also what moves a workflow from approve-first to automatic. More on that in Approve first, then automatic.
When to run it again
- Before launch.
- After every change to prompts, tools or connected systems.
- After every model update from the provider. New models are usually better, but behavior shifts. A test run catches the change before your customers do.
- Every month, with fresh cases added from live use.
What else it gives you
- One definition of done that the business and the builders share.
- A fair way to compare models and costs. Run the same set on a faster or cheaper model and see whether the pass rate holds.
- An asset you own. If you change tools or vendors, the test set comes with you.
Make one this week
- Pick the workflow. Here is how we choose.
- Export 50 recent, real cases.
- For each one, write down the right output. The version your team actually sent, corrected where needed, works well.
- Tag the hard ones so you can track them separately.
- Keep it in a spreadsheet with four columns: input, expected output, tags, notes.
That spreadsheet is the most useful thing you can hand a builder on day one, including us.