Part 1
Before you measure anything, you need to know what "good" means for your system. This part lays the groundwork: what evaluation is, how business goals differ from metrics, how to make results trustworthy, and how to design experiments and benchmark datasets you can rely on.
AI evaluation is the disciplined practice of measuring how well an AI system performs. You define what you care about, collect evidence (model outputs, user feedback, benchmark results), and compare that evidence against a target. The output of evaluation is information you can act on: which changes improve the system, which regressions you introduced, and whether the system is ready to ship.
Evaluation is not a one-time step. It happens during development, before release, and continuously after deployment. A good evaluation answers a question like "Did the new prompt make answers more accurate?" rather than a vague "Is the model good?"
A common mistake is confusing a metric with an objective. An objective is a business or product goal — "customers trust our support answers" or "users complete sign-up without frustration." A metric is a measurable number you track as a proxy for that goal — "the percentage of answers a human expert rated as correct."
| Objective | Example Metric |
|---|---|
| Customers trust support answers | Answer accuracy, citation accuracy |
| Users find answers quickly | Time to first useful answer, search top-3 hit rate |
| Fewer support tickets | Ticket deflection rate |
| Safe experience for everyone | Toxicity rate, refusal-to-unsafe-request rate |
The relationship is rarely perfect. Metrics can be gamed, and an objective can improve while a proxy metric stays flat. Whenever you pick a metric, ask: "If this number goes up, does the user experience actually get better?" If not, the metric is the wrong proxy.
Two qualities separate trustworthy evaluation from noise:
For human ratings, reliability is often quantified with inter-rater agreement measures such as Cohen's kappa or Krippendorff's alpha. Low agreement tells you your rating instructions are ambiguous — fix the rubric before trusting the scores.
When you compare two model versions, the difference you see might be chance. Statistical testing tells you how confident you can be that a difference is real.
import numpy as np
scores_a = [0.92, 0.88, 0.95, 0.81, 0.90]
scores_b = [0.94, 0.91, 0.93, 0.85, 0.96]
# Paired differences
diffs = np.array(scores_b) - np.array(scores_a)
mean, sd = diffs.mean(), diffs.std(ddof=1)
n = len(diffs)
se = sd / np.sqrt(n)
print(f"mean diff = {mean:.3f} +/- {1.96*se:.3f} (95% CI)")
A reliable experiment controls for everything except the change you are testing. Design principles to follow:
For online experiments, split traffic so that each user sees one consistent version — switching versions mid-session contaminates the comparison. Plan the minimum sample size before you start so the experiment can actually detect the effect size you care about.
A golden dataset (also called a golden test set or benchmark) is a curated collection of examples with known, trusted answers. It is the fixed yardstick you measure against across versions and over time.
Build one well: