Overview
A system that passed once drifts as inputs change and providers update models, so evaluation must be continuous: an offline suite gates every change, and online metrics watch production. The unit of evaluation is a task with a known-good outcome, scored automatically. This page is the ops view; agent-quality methods are in evaluation and retrieval metrics in rag-eval.
Build a golden set from real traffic
Sample representative inputs from production logs, with expected outputs or acceptance criteria. Include edge inputs, known failure modes, and adversarial prompts. Keep it in version control and add a case every time production surfaces a new failure (golden-set, golden-set).
Gate releases offline in CI, and expect noise
Run the golden set on every prompt, model, or retrieval change and block the merge on regression (prompt-evals, llmops-best-practices). Do not assume identical reruns: current Claude models (Opus 4.7 and later, Sonnet 5 and 5.5, Fable 5 and later) accept only the default sampling values and return 400 for anything else, so temperature 0 is not available for determinism. Run each case several times where it matters, gate on a pass-rate threshold with a tolerance, and treat a single flaky case as a signal to tighten its criteria.
Match the metric to the task
- Classification and extraction: exact match or F1 against golden-set.
- Retrieval: recall@k, MRR, nDCG (rag-eval).
- Open-ended generation: rubric scores from an LLM judge, plus faithfulness and hallucination.
One aggregate number hides the failure that matters; report per-category scores.
Calibrate LLM-as-judge against humans
A judge scales open-ended scoring but is biased toward verbosity and its own style, and drifts. Calibrate it on a human-labeled subset, measure judge-to-human agreement, and re-check whenever the judge model changes (llm-as-judge).
Measure online what offline cannot
Track thumbs up or down, edit and regenerate rates, task completion, escalation to a human, and refusal rate. Sample live traffic back into the golden set, and pair the signals with traces from llm-observability.
Re-run everything when the model changes
A pinned model can be deprecated, and a floating alias changes silently. Re-run the full golden set whenever the model ID changes and on a schedule, and store eval results beside the pinned ID.
Avoid these pitfalls
- A golden set made only of inputs the system already handles.
- Trusting an uncalibrated judge as ground truth.
- Shipping a model swap without a re-eval.
- Reporting one aggregate score that hides a regressed sub-category.