Skip to content
AgenticAIWiki
  1. Learn
  2. Part 3
  3. 20. Regression gates in CI
  4. 20.3

Lesson 20.3 · 3 of 4 · 4 min read · Reviewed 24 Nov 2026

Tracking scores over time

By the end, you can

  • Track eval scores over time.
  • Use history to spot slow decline.

Store every run

{
  "run_id": "2026-11-24-pr-418",
  "release": {"prompt": "v15", "tools": "v6", "model": "<id>", "grader": "g3"},
  "suite": "standard-300",
  "scores": {"policy_accuracy": 0.93, "format_valid": 1.0, "tone": 0.84},
  "slices": {"long_input": 0.78, "non_english": 0.89},
  "cost_per_success": "...",
  "p95_seconds": 41
}

Chart it

policy accuracy
 95 |*  *
 93 |      *  *
 91 |            *  *
 89 |                  *     <- each step passed its max_drop gate
     Aug   Sep   Oct   Nov

Each change dropped a point, within the gate. The trend shows a real decline.

Defences against slow drift

  • Compare against a fixed baseline release as well as the last one.
  • Alert when a score is down more than X from its 90-day high.
  • Review the chart in a regular quality meeting.

Separate grader changes

When the graderGrader: The part of an eval that decides whether an output passes, using code, a model or a person. or the test set changes, mark it on the chart. Otherwise a jump caused by a new rubricRubric: A written set of criteria and score levels that a grader applies to each output. looks like a product change (18.5, 17.4).

Key points

  • Store every eval run with its versions, scores per criterion and per slice, cost and date.
  • Chart scores over time; slow declines are invisible if you only compare each change with the last.
  • Link scores to releases so you can see which change moved which metric.
Hands-on labRuns in the Playground

Catch slow drift in score history

Show how a per-change gate misses a slow decline, and add checks against a fixed baseline and a recent high.

You will have: A drift checker that flags the decline the max_drop gate let through, and skips the grader change.

Steps

  1. Read the stored runs: date, score and grader version.
  2. Confirm that each step passes a max_drop gate of 2 points against the previous run.
  3. Compare the latest score with the fixed baseline release and with the highest score in the window.
  4. Ignore comparisons across a grader change, and report them separately.

Done when

  • Every step passes the max_drop gate.
  • The drift check raises an alert of 6.0 points below the high.
  • The grader change from g2 to g3 is reported, not counted as drift.

Open in the Playground No API key needed.

Starter code (Python)
HISTORY = [  # (date, policy_accuracy, grader)
    ("08-01", 95.0, "g2"), ("08-20", 94.0, "g2"), ("09-10", 93.0, "g2"), ("09-28", 92.0, "g2"),
    ("10-15", 91.0, "g2"), ("11-01", 90.0, "g2"), ("11-10", 89.0, "g2"), ("11-20", 93.5, "g3"),
]
MAX_DROP = 2.0
ALERT_FROM_HIGH = 4.0

# TODO: 1) check each step against the previous one with MAX_DROP and print how many pass
# TODO: 2) using only runs graded by g2, compare the latest score with the first (fixed baseline)
#          and with the highest; alert if it is down more than ALERT_FROM_HIGH
# TODO: 3) print any grader changes as markers, not as drift
print("history has", len(HISTORY), "runs")
Show a solution
HISTORY = [  # (date, policy_accuracy, grader)
    ("08-01", 95.0, "g2"), ("08-20", 94.0, "g2"), ("09-10", 93.0, "g2"), ("09-28", 92.0, "g2"),
    ("10-15", 91.0, "g2"), ("11-01", 90.0, "g2"), ("11-10", 89.0, "g2"), ("11-20", 93.5, "g3"),
]
MAX_DROP = 2.0
ALERT_FROM_HIGH = 4.0

steps = [(a, b) for a, b in zip(HISTORY, HISTORY[1:]) if a[2] == b[2]]
passed = sum(1 for a, b in steps if a[1] - b[1] <= MAX_DROP)
print(f"max_drop gate: {passed} of {len(steps)} steps passed")

for a, b in zip(HISTORY, HISTORY[1:]):
    if a[2] != b[2]:
        print(f"marker: grader changed {a[2]} -> {b[2]} on {b[0]}; rescore a baseline before comparing")

same = [r for r in HISTORY if r[2] == "g2"]
baseline, high, last = same[0][1], max(r[1] for r in same), same[-1][1]
print(f"g2 runs: baseline {baseline}, high {high}, latest {last}")
if high - last > ALERT_FROM_HIGH:
    print(f"ALERT: down {high - last:.1f} points from the high")
Quick checkEach PR passes its gate, but quality has drifted down 6 points over three months. How do you see this sooner?
How sure are you?
Pick an answer and how sure you are