DEPLOYEDAI-era interview training
RankBootstrapping
XP 0 / 250
0
0%
Ready
Applied AI / Forward Deployed Engineer · Evaluation & Quality · Lesson 3 of 4

Building an eval set & choosing metrics

7 min

Build the dataset

  • Collect real inputs (from logs, the customer, or realistic synthetic ones), covering common cases and edge cases.
  • For each, define the expected output or a rubric for what 'good' means.
  • Start small — even 20–50 well-chosen cases beats none — and grow it as you find failures (every bug becomes a new test).

Pick the right metric for the task

  • Deterministic checks: exact match, JSON-valid, regex, does-it-contain, code-runs/tests-pass. Cheap and reliable — use whenever the task allows.
  • Classification metrics: accuracy, precision/recall/F1 for labeling tasks.
  • Reference-based: similarity to a gold answer (embedding similarity; older: BLEU/ROUGE).
  • Human evaluation: the gold standard for subjective quality — but slow and costly; sample it.
  • RAG-specific: context relevance (did we retrieve the right chunks?), faithfulness/groundedness (is the answer supported by context?), answer relevance.
Decompose the metricFor RAG, evaluate retrieval and generation separately. If answers are wrong, you need to know whether retrieval failed or the model ignored good context. One aggregate score hides the cause.

◆ Lock it in

  • Build an eval set from real + edge-case inputs with expected outputs/rubrics; grow it from every bug.
  • Prefer deterministic checks; use classification metrics, reference similarity, or human eval as fit.
  • For RAG, measure retrieval and generation separately (relevance + faithfulness).
Feynman drill — say it out loudYou improved a support bot. Describe the eval set and metrics you'd use to prove it got better.
Step 1 rate your confidence · Step 2 pick your answer
For a JSON-extraction task, the most reliable primary eval metric is:
Step 1 — how sure are you?