Defining Success Metrics for AI Systems
A representative evaluation set is built from real-world examples that reflect the mix of work a system will actually face.
Does the System Actually Do the Job?
Suppose you have built a system that reads incoming documents and flags the parts that need attention. Before anyone relies on it, you need an honest answer to a simple question: does it actually do the job? Answering that question requires a set of test cases, and the quality of your answer depends almost entirely on which test cases you chose. This article is about choosing them well.
The working example throughout is a contract-review system. The reasoning, however, applies to any system whose output must be checked against real work.
Following the Contract-Review Deployment
The source describes a contract-review deployment built for a mid-market commercial real estate firm. The system was meant to read inbound vendor contracts, identify clauses that departed from the customer's standard playbook, and produce a redline memo. The practical purpose was that a general counsel who used to spend about an hour on a review should be able to finish it in ten minutes.
This purpose sets the requirement for testing. The system is only useful if it performs well on the documents the firm actually handles, so the test cases have to resemble those documents. A test set built from documents that are easier, stranger, or simply different from the firm's real work would not tell the firm whether the system is ready.
The evaluation set in the source was assembled quickly, in the first three days of the validation work. The deputy general counsel pulled forty-two real contracts from the six months before the project began.
Composition of the Evaluation Set
The forty-two contracts were not all alike. They fell into three groups, and each group carries a different level of difficulty. Because of this, a single overall score is not the whole story. Separating the groups lets you ask how the system behaves on simple work and on demanding work, rather than hiding both behind one average.
| Contract type | Count | What the contract needed |
|---|---|---|
| Simple NDAs | 12 | Signed without any changes |
| Vendor service agreements | 23 | Redlines on between two and seven clauses |
| Complex landlord-tenant agreements | 7 | Redlines on more than ten clauses, and at least one issue that required outside counsel |
The three groups in the source's evaluation set
The groups together account for the whole set of forty-two. The simple group tests whether the system leaves clean documents alone, the middle group tests routine redlining, and the complex group tests whether the system can handle heavy, high-stakes revisions. Because the groups are reported separately, a weak result on the complex contracts cannot be hidden by strong results on the twelve NDAs.
Why Real Examples Beat Invented Ones
The word representative carries most of the weight in the definition of an evaluation set. A representative evaluation set is built from real-world examples that reflect the mix of work a system will actually face. A set that is large but made up only of easy or unusual cases will report misleading performance.
The aim is a set whose mix of cases matches the mix the system will meet in practice. In the source, this was achieved by having the person who would be affected by the system's output select the documents, rather than having an outside party guess at what typical work looks like. Evaluation sets should be chosen with input from the people who do the real work.
Consider a system that sorts customer support emails into categories such as billing, technical fault, and account access. If you assembled a test set made only of short, clearly worded emails, the system could score well and still fail on the long, rambling messages that real customers often send. Applying the source's principle here means drawing a mix of email lengths and clarity levels from the support queue itself, so the test reflects the real traffic.
Common mistake Testing only on large volumes of easy cases
What it looks likeA set of two hundred clean NDAs with no redlines needed.
Why it failsSize does not compensate for an unrepresentative mix. The set reports performance on easy work, not on the work the firm actually handles.
Do this insteadDraw cases in the proportions the system will meet, and keep the demanding groups in the set.
Common mistake Letting the builders choose the documents without the users
What it looks likeAn outside party selects contracts it considers typical.
Why it failsThe source achieved a representative set by having the person affected by the output select the documents, because outside guesses about typical work can be wrong.
Do this insteadInvolve the people who do the real work when choosing the examples.
Metric Versus Threshold
Three ideas in this part of the course are easy to confuse because they all concern measurement. The evaluation set is the material being tested. A success metric is a quantifiable measure of how well the system is doing its job. A validation threshold is the specific target the metric must reach before the system is considered acceptable.
A success metric names the quantity being measured. A validation threshold states the target that must be reached, and it may include accuracy conditions.
In the contract-review case, the customer's success metric was the number of attorney review minutes spent per contract. The validation threshold attached a target to that metric: a sixty percent reduction in those minutes, with no missed redlines on the cases the firm cared most about. The threshold therefore combines a measured reduction with a second condition about accuracy.
The metric tells you what to measure. The threshold tells you what result counts as success. A reader who knows only the metric cannot tell whether the system passed. A reader who knows the threshold knows exactly what passing means.
Applying the Threshold to the Set
Now trace how a single evaluation example moves through the process. Each contract from the set is passed through the system. The system produces a redline memo. The review effort is measured as the metric. That measured value is then checked against the threshold, which yields a pass or fail decision for the system.
What do you think happens?
Suppose the system cuts review minutes by 70 percent but skips several important changes on the priority cases. Does it pass the threshold?
Reveal answer
It fails, because the accuracy condition is not met.
The source's threshold combined a measured reduction with a second condition about accuracy. A system could satisfy the time goal and still fail the threshold if it skipped important changes.
Notice that the outcome depends on both conditions. The time reduction alone is not enough. The result for the system is the combined judgement of the metric and the threshold, applied across the whole evaluation set.
Practising the Evaluation Design
A team wants to test a system that sorts customer support emails into billing, technical fault, and account access. They propose a set of one hundred short, clearly worded emails, all taken from the team's own examples. Explain two problems with this set, and describe how you would build a more representative one.
Hints
- Ask whether the set reflects the traffic the system will meet in the support queue.
- Consider email length and clarity, and who should select the examples.
Key Takeaways
- 1A representative evaluation set is built from real-world examples that reflect the mix of work a system will actually face.
- 2The source's forty-two contracts spanned simple NDAs, vendor service agreements, and complex landlord-tenant agreements, so results could be read across difficulty levels.
- 3A success metric names the quantity being measured, while a validation threshold states the target that must be reached, and may include accuracy conditions.
- 4Evaluation sets should be chosen with input from the people who do the real work, and results should always be reported alongside the set's composition.
At a glance
- A representative evaluation set is built from real-world examples that reflect the mix of work a system will actually face.
- The evaluation set should be chosen with input from the people who do the real work, and its composition should be reported with every result.
- A success metric names what is measured, while a validation threshold states the target that must be reached, possibly including accuracy conditions.
- A system can meet a time-reduction metric and still fail a threshold that includes an accuracy condition.