Evaluating AI Systems: Criteria, Benchmarks and the Evaluation Pipeline

Evaluation-driven development, the criteria that matter (domain capability, generation quality, factual consistency, safety, instruction following, roleplay, cost and latency), navigating public benchmarks and data contamination, and a step-by-step evaluation pipeline: components, rubrics, business metrics, methods, annotated data, slicing, sample size and evaluating the evaluator.

On this page

Simple definition#

Evaluating an AI system means checking whether the whole application — prompts, retrieval, model, tools and guardrails — does its job well enough, safely enough and cheaply enough. It turns the methods in evaluation methodology into a repeatable pipeline that runs before every change and continuously in production.

Evaluation criteria#

Group criteria into four buckets.

1. Domain-specific capability#

Can the model do the work at all — write code in your language, understand your legal domain, reason over your tables? Measure with functional checks (code runs, SQL returns the right rows) or multiple-choice and closed-form questions from your domain.

2. Generation capability#

The quality of open-ended text:

Criterion Question
Fluency and coherence Is it readable and logically organised? (Rarely a problem with modern models)
Factual consistency Is it supported by the facts?
Relevance Does it answer the question asked?
Safety Is it free of harmful content?

Factual consistency#

Two settings:

  • Local — consistent with the context given (a document, retrieved passages). Central to RAG and summarisation.
  • Global — consistent with facts about the world. Harder: you need a source of truth.

Ways to check it:

Technique How
AI judge Ask a model whether each claim is supported by the context
Self-verification Sample several answers; if they disagree, the answer is probably made up
Knowledge-augmented verification Split the answer into atomic claims, search for evidence for each, judge each claim (as in SAFE)
Entailment classifiers A small model predicts whether the context entails, contradicts or is neutral to each claim

Safety#

Check for harmful or inappropriate content (violence, self-harm, illegal advice), toxicity and bias, privacy leaks, and policy violations specific to your organisation. Use moderation models and red-team prompt sets; see AI security.

3. Instruction-following capability#

Does the model follow the format, length, language and constraints you asked for? This matters most for structured outputs that downstream code parses.

Instruction type Example check
Format Valid JSON matching the schema; no preamble
Content Includes / excludes given keywords; stays on topic
Length Under n words, exactly three bullet points
Language and style Responds in French; formal tone
Roleplay Stays in character and persona; consistent style

Build a small set of verifiable instructions (like the IFEval benchmark) for your product’s actual constraints, and test them on every model or prompt change.

4. Cost and latency#

A perfect answer that takes 40 seconds or costs €2 may be useless. Track cost per request, TTFT, TPOT and total latency alongside quality, and decide what you would trade: a slightly worse but much cheaper model is often the right choice. See inference and serving.

Criterion Metric Dataset Hard requirement Ideal
Factual consistency Judge-scored grounding 300 internal Q&A ≥ 0.90 ≥ 0.97
Safety Policy-violation rate Red-team set 0 critical 0
Format Valid JSON rate 500 extraction samples ≥ 99% 100%
Latency p95 TTFT Load test < 1.5 s < 0.5 s
Cost € per 1k requests Production mix < €5 < €2

Public benchmarks: useful, not sufficient#

Public benchmarks and leaderboards narrow the candidate list. Three problems limit them:

  • Selection and aggregation. Leaderboards average benchmarks that may be irrelevant to you, and the weights are arbitrary.
  • Saturation. Top models cluster near the ceiling, so differences are noise.
  • Data contamination. Benchmark questions leak into training data — through web crawls, deliberate inclusion or synthetic data — inflating scores.

Detecting contamination: n-gram overlap between benchmark and training data (if you have it), and unusually low perplexity on benchmark items. Handling it: report results on a held-out, private set; prefer benchmarks with fresh or private questions.

Build a custom leaderboard: pick the public benchmarks that match your criteria, weight them by importance, and add your own private evaluation set. See model selection.

Designing the evaluation pipeline#

An evaluation pipeline, from components to iteration
flowchart TD
    C["1 · Evaluate every component<br/>retrieval, prompt steps, tools, final answer"] --> G["2 · Write guidelines and rubrics<br/>with scored examples"]
    G --> B["3 · Tie metrics to business metrics"]
    B --> M["4 · Select methods per criterion<br/>functional, judge, human"]
    M --> D["5 · Annotate evaluation data<br/>by slice, enough samples"]
    D --> E["6 · Evaluate the evaluator<br/>signal, reliability, cost"]
    E --> I["7 · Iterate<br/>version everything"]
    I --> C

Step 1 — Evaluate every component#

A system with several steps can fail at each one. Evaluate per step (was the right document retrieved? was the right tool chosen?) and end to end (was the final answer right?). Evaluate per turn and per task: a multi-turn conversation can have good turns and still fail the task.

Step 2 — Create guidelines and scoring rubrics#

Write down what good means, with examples of each score. A rubric such as “1 = wrong or ungrounded, 2 = partly correct, 3 = correct and grounded, with citations” makes humans and judges consistent. Include what a correct but unhelpful answer looks like — it is common.

Step 3 — Tie evaluation metrics to business metrics#

Map model quality to outcomes: “at 80% factual consistency we can automate 30% of tickets; at 98% we can automate 60%.” This tells you how much quality is worth, and when to stop improving.

Step 4 — Select evaluation methods#

Mix methods by criterion and by cost: cheap classifiers and functional checks on everything, AI judges on a sample, humans on a smaller sample and on disagreements. Use log probabilities where available as confidence signals. Keep human evaluation in production even after automation — it catches drift that automated metrics miss.

Step 5 — Annotate evaluation data#

  • Use real production data wherever privacy allows; add synthetic and adversarial cases for coverage.
  • Slice the data — by user type, topic, language, input length, channel — and report per slice. Averages hide failures; a change can improve the average while hurting your most important segment (Simpson’s paradox).
  • Keep a separate set for each criterion where needed (format, safety, grounding).
  • Use enough samples: to detect a difference of a few percentage points with confidence, you need hundreds to thousands of examples; small differences need more. Use bootstrapping — resample your evaluation set and check whether the result is stable.

Step 6 — Evaluate your evaluation pipeline#

Ask:

  • Does it give the right signal? Do better systems score higher, and do scores correlate with business metrics?
  • Is it reliable? Run it twice; do you get the same result?
  • Are metrics correlated? Two perfectly correlated metrics are redundant; two uncorrelated ones may reveal a problem.
  • What does it cost and how long does it take? A pipeline too slow to run on every change will be skipped.

Step 7 — Iterate#

Products, users and models change; so must the evaluation. Version the dataset, rubric, judge prompt, judge model and sampling settings, and log them with every result so runs are comparable.

Where evaluation runs#

Stage Purpose
Development Compare prompts, models and retrieval settings
CI / pre-release Regression gate — block changes that reduce quality
Canary / A/B Compare versions on live traffic
Production Sampled judges, user feedback, drift detection — see LLMOps and user feedback

Common mistakes#

Review questions#

What is evaluation-driven development? Defining evaluation criteria, data and methods before building, so every design choice is tested against measurable outcomes — the AI analogue of test-driven development.

How do you evaluate factual consistency? Against given context (local) or world knowledge (global), using AI judges, self-verification through sampling, claim-level search-and-verify, or entailment classifiers.

Why are public benchmarks insufficient for model selection? They may not match your task, are often saturated, aggregate arbitrarily and can be contaminated by training data. Use them to shortlist, then evaluate on a private set built from your data.

Why slice evaluation data? Averages hide failures. Per-slice results reveal segments where a change hurts quality, and avoid Simpson’s paradox, where the aggregate result points the opposite way to every individual slice.

How do you know your evaluation pipeline is good? It ranks systems the way users and business metrics do, gives stable results across runs, has non-redundant metrics, and is cheap and fast enough to run on every change.

Summary#

  • Design evaluation first; tie it to business outcomes.
  • Criteria: domain capability, generation quality (especially factual consistency and safety), instruction following, cost and latency.
  • Public benchmarks shortlist; private, sliced, sufficiently large datasets decide.
  • Evaluate every component and end to end; mix functional checks, judges and humans.
  • Evaluate the evaluator, version everything, iterate.

References#