Skip to content
Edition NigeriaGlobal
Country: Mexico

You are in the Mexico edition. Type your country to switch.

The Americas

Set up your profile

You are learning in the Mexico edition, with examples in pesos and from Mexico.

Build AI automations and agents · Lesson 5 of 7

Testing and evaluating AI outputs

Testing turns a hopeful demo into evidence. This lesson builds a test set of real and tricky cases with expected results, scores outputs with a rubric, works out pass rates that add up, re-runs the set after every change, compares two versions fairly and samples live outputs once the system is running.

Advanced10 min read5 steps

This lesson is complete in writing. A video for it is on its way.

What you will learn

  • By the end you can build a test set of real and tricky cases with expected results written in advance.
  • You can score outputs with a rubric and report pass rates that add up, overall and by kind of case.
  • You can compare two versions fairly, case by case, and block a release on a risky regression.
  • You can set up weekly sampling of live outputs.

Key terms in this lesson

Test set
Data kept aside and not used to build or tune a model, so it gives an honest check of performance on unseen cases. It loses its value if it is used again and again.
Ground truth
The real outcome a model is trained and judged against, such as actual job performance; if that label is flawed or biased, the model learns the flaw.
Expected output
The correct result for a test case, written down before the system is run, against which the system's actual output is compared and scored.
Evaluation rubric
A written set of criteria, with a scoring rule for each, used to judge AI outputs consistently across many cases and reviewers.
Pass rate
The share of test cases a system gets right under an agreed rubric, worked out as cases passed divided by cases run, and reported for each kind of case as well as overall.
Regression testing
Re-running earlier tests after any change to a system, such as a new prompt, model or document, to confirm that nothing that used to work has broken.
Pairwise comparison
Judging two versions of a system by running both on the same cases under the same settings and comparing their results case by case rather than only by overall score.
Live sampling
Checking a small random selection of a running system's real outputs each week against the source documents, to catch errors the test set did not foresee.
Spot check
A quick manual check of a few items, chosen deliberately, to catch errors in a larger output such as a spreadsheet column or a long list.

Step 1 of 5

Build the test set from real cases

Opening this step…

Step 2 of 5

Expected results and a rubric

This step opens when you finish the one above.

Step 3 of 5

Pass rates that add up

This step opens when you finish the one above.

Step 4 of 5

Regression tests and fair comparisons

This step opens when you finish the one above.

Step 5 of 5

Sampling live outputs

This step opens when you finish the one above.

Key takeaways

The key takeaways open when you finish every step.

Lesson quiz

5 questions. You need 85% to pass.

The quiz opens when you finish every step.

Read first

Stockertim Learn is education. It explains how investing works and never recommends buying or selling anything.

Up next

Skills for the AI ageRunning it: costs, monitoring an…Read nowRunning it: costs, monitoring and failuresSkills for the AI age · Advanced · 15 minSkills for the AI ageSafety, and when not to automateRead nowSafety, and when not to automateSkills for the AI age · Advanced · 15 minAI at workTesting and monitoringRead nowTesting and monitoringAI at work · Advanced · 15 minAI at workEvaluating prompts and outputsRead nowEvaluating prompts and outputsAI at work · Beginner · 15 minAI at workTesting and optimisationRead nowTesting and optimisationAI at work · Intermediate · 15 minSkills for the AI ageWorking alongside AI with good j…Read nowWorking alongside AI with good judgementSkills for the AI age · Beginner · 15 minSkills for the AI ageInterviews, including AI screeningRead nowInterviews, including AI screeningSkills for the AI age · Beginner · 15 minSkills for the AI ageAI as a coding partner: read, te…Read nowAI as a coding partner: read, test and fix its codeSkills for the AI age · Beginner · 15 minSkills for the AI ageUsing AI assistants in spreadshe…Read nowUsing AI assistants in spreadsheets safelySkills for the AI age · Beginner · 15 minSkills for the AI ageDesigning an agent: limits, huma…Read nowDesigning an agent: limits, human approval and logsSkills for the AI age · Advanced · 15 minSkills for the AI ageConnecting AI to tools and data:…Read nowConnecting AI to tools and data: connectors and MCP explainedSkills for the AI age · Advanced · 15 minSkills for the AI ageAI changes tasks, and the skills…Read nowHow AI changes tasks, and the skills that stay humanSkills for the AI age · Beginner · 15 min
English