AI Platform and Security · Module 5 · Delivery and Operations

Evaluation and Testing of AI Systems

The lesson defines a testing strategy for systems whose most important component behaves probabilistically. Participants learn the six layers of the evaluation pyramid, the governance of golden datasets, the use and limits of a judge model, regression testing with repeated runs and champion comparison, acceptance criteria as code, and the place of red teaming and human evaluation, with Nordvik Region's claims-routing suite and evaluation report as worked material.

Lesson 20 of 25Chapter 2090 minutes

Read the chapterThe whitepaperThe slides

All courses / AI Platform and Security / Module 5 / Chapter 20

Learning objectives

After the lesson the participant can:

Key concepts

Evaluation pyramid
Six layers from numerous, cheap, deterministic tests run on every commit to few, costly ones run per release: unit tests for code, data tests, model metrics, behavioural and scenario tests, red teaming and human evaluation.
Golden dataset
A curated, versioned collection of inputs with expected outputs or labels, the reference for model metrics and scenario tests. It is mishandled through contamination, staleness, unclear ownership and personal data without proper controls.
LLM-as-a-judge
Using a strong LLM to grade outputs that have no reference answer. Judge models show position, verbosity and self-enhancement bias, so the judge is calibrated against a human-labelled sample, pinned, never of the same family as the system, and kept under a human layer.
Evaluation suite definition
The file that turns the pyramid into a pipeline gate. It declares datasets, metrics, thresholds and judge configuration; the pipeline fails if any threshold is not met and attaches the report to the evidence manifest.
Pass rate with confidence interval
Because a single pass or fail is not meaningful for a non-deterministic system, each scenario is run several times and the result compared with the champion, with a minimum improvement or a maximum permitted regression.

Interactive exercises

Do them here and get feedback at once. Choose a card and then where it belongs, or drag it.

Interactive exercise 1 · Sort

Which layer of the pyramid?

Sort each check under the layer of the evaluation pyramid where the chapter places it.

Interactive exercise 2 · Scenario

A pass at the edge of the threshold

Apply the chapter's reading of an evaluation report to a result at Nordvik Region.

Teaching plan

10 minThe teacher asks what a unit test can assert about a classifier or an LLM, and uses the answers to motivate a layered, continuous strategy.
25 minPresent the pyramid, then the golden dataset datasheet of Nordvik Region; participants find the line that answers each of the four mishandlings.
15 minRead the judge rubric and the evaluation report summary; discuss the check whose interval crosses the threshold and why the gate result is still not the release decision.
30 minExercise: participants write an evaluation suite for one system and a one-page red-team test plan that references scenarios by identifier only.
10 minClose with the sampling design for human evaluation and the smoke, full and per-release cadence.

Discussion

  1. A model that gains two points of accuracy and loses ten points of calibration has not improved for decision support. Which single headline number does your organisation report, and what does it hide?
  2. Changes to expected outputs in an eligibility golden set are reviewed by the business owner, not by engineers. Who owns the expected answers in your evaluation sets?
  3. Nordvik Region's red-team plan separates what is tested from how, and includes a caseworker among the testers. What does each of those choices make possible?

Written exercise

Exercise · 30 minutes

An evaluation suite with acceptance criteria

For an AI system of your own, or for Hansa Mutual's claims assistant, write an evaluation suite definition. Name the datasets with a version reference and a datasheet, the number of repetitions and the fixed settings for runs, and at least four checks: one overall task metric with a minimum and a maximum regression from the champion, one sliced by a group or market that matters with a minimum per slice, one judged check with the judge configuration, and one resistance or refusal check. Name the business approver. Then write the datasheet lines for the golden dataset that cover contamination, refresh cadence, ownership of expected outputs and personal data.

Deliverable: An evaluation suite definition with four checks and thresholds, and a datasheet extract for its golden dataset with known limitations stated.

Self-test

Choose an answer to see whether it is right, or open the answer below each question.

  1. Which rule about thresholds does the chapter set for changes to the evaluation suite?

    Show the answer

    B. A threshold is never lowered in the same pull request that changes the model
    Keeping the two changes apart means the decision to change the model and the decision to change the bar are made and recorded separately.

  2. Which of these is one of the chapter's rules for using a judge model?

    Show the answer

    D. Calibrate the judge against a human-labelled sample and record the agreement rate as evidence
    The other rules are to prefer relative comparison, never use the same model or family as the system, pin the judge version, and keep a human layer above the judge.

  3. In Nordvik Region's evaluation report the automated gate passed. Why did the release not proceed on that alone?

    Show the answer

    C. Because the gate is necessary but not sufficient: human evaluation and business approval were still open
    The report lists an open item for human evaluation of sampled explanations and a pending business approval; the release proceeds only after both.