Case study 05
Evaluating an AI bug severity grader
A written severity rubric, 30 labelled public bug reports, a grading harness and a frozen holdout set, built to answer one question: can we trust an AI to set bug severity?
Claude · Node.js · LLM evaluation · GitHub CLI
- 93%
- within one severity level on the frozen holdout
- 67%
- exact match on the frozen holdout
- 30
- labelled public bug reports, split 15 / 15
The problem
Severity drives triage, fix priority and quality metrics. As AI agents start triaging bugs, someone has to show that their severity calls match the team's standard.
Most teams don't have that standard written down. Without one, there's nothing to test the model against.
What I did
1.Write the standard first
The rubric comes down to one question: can the affected person still complete what they were trying to do? Extra rules cover security, money, workarounds, recoverability and silent failures.
2.Use realistic data, graded the way a triager would see it
I used 30 closed bug reports from Saleor, an open-source commerce platform with payments, carts and stock. The grader sees only the title and the original description, not the discussion that followed, because that's all a triager has when a bug is first filed. The repo stores only a link, a one-line summary and the label; the report text is fetched at run time.
3.Protect the holdout
Half the reports are a frozen holdout. Its hash is checked on every run, it runs only with a --final flag, and every look at it is logged. Tuning scores always look better, so only the holdout counts.
src/holdout-guard.mjs (illustrative) import { createHash } from "node:crypto"; import { readFileSync, appendFileSync } from "node:fs"; const EXPECTED = readFileSync("data/holdout.sha256", "utf8").trim(); export function loadHoldout({ final }) { if (!final) throw new Error("Holdout only runs with --final. Tune on the tuning set."); const raw = readFileSync("data/holdout.json"); const actual = createHash("sha256").update(raw).digest("hex"); if (actual !== EXPECTED) throw new Error("Holdout changed since it was frozen."); appendFileSync("results/holdout-runs.log", `${new Date().toISOString()}\n`); return JSON.parse(raw); }4.Score misses, not only accuracy
Each run reports exact matches, within-one-level matches, a confusion matrix, and every miss with the grader's one-line reason. Reading the misses turned out to be the most useful part.
Outcome
- Prompt v1 scored 80% exact and 93% within one level on tuning, and 67% exact and 93% within one level on the holdout.
- Several holdout misses were cases where the grader's reading was arguably better than my label. Those go to label review, not prompt changes.
- The tuning misses exposed two gaps in the rubric itself: crashes in one optional configuration with a working alternative, and breakage limited to one third-party integration.
- The labels are my own draft grades and haven't been reviewed by a second person yet. That review is the next step.
Lessons learned
- An eval shows ambiguity in your own standard before it shows weakness in the model, so fix the definition first.
- Spend review time on the cases where the grader and the label disagree, rather than regrading everything.
Code samples are original demonstrations written for this site. They show the pattern, not any employer’s implementation.
Next case studyBuilding a scalable web automation framework from scratch →