AI systemsevalseval setgolden setoffline evaluation

LLM evaluation

Definition

LLM evaluation scores a system's outputs on a fixed set of representative inputs, using deterministic checks, reference answers, retrieval metrics and graded rubrics, to detect regressions and compare variants.

In practice

Request metrics cannot see answer quality: a wrong answer is a 200 with normal latency. A golden set of real questions with expected facts or sources, versioned alongside code, turns "seems better" into a score. Combine cheap deterministic checks (format, required facts, citation validity) with graded scoring, and measure retrieval and generation separately. Gate prompt and model changes on the eval, then canary them and compare online metrics by version.

An eval set is only as good as its coverage: it drifts away from real traffic unless refreshed from production samples and failures. Outputs are non-deterministic, so run cases more than once and treat small score differences as noise. Overfitting prompts to the eval set gives a good score and a worse product.

Example

A prompt change raises the golden-set score from 82% to 85% on 400 cases but fails 6 of 40 "must refuse" cases, so the eval gate blocks the deploy.