Skip to main content

Evaluations: test suites for AI outputs

Learn how EvalGate evaluations work: test cases, assertions, evaluation types, runs, quality scores, and baseline comparison for regression gating.
An evaluation in EvalGate is a structured test suite for AI outputs. Like unit tests for application code, evaluations define what correct behavior looks like and run assertions to check whether your AI system meets that standard. The difference is that AI outputs are probabilistic, multi-dimensional, and sensitive to prompt changes in ways that traditional tests are not — so EvalGate’s evaluation model is built specifically for those properties.

2026 evaluation practice map

As of June 24, 2026, strong AI evaluation programs use a loop rather than a single score. EvalGate’s model follows that loop:
  1. Curate offline datasets from golden cases, labeled production failures, synthetic edge cases, and adversarial/red-team examples. Keep a held-out set for release gates and a working set for iteration.
  2. Run layered evaluators on every candidate change: deterministic code checks for exact structure, semantic or similarity checks for reference-backed tasks, LLM judges for rubric-based quality, pairwise comparison for subjective regressions, and human review for high-impact or high-disagreement cases.
  3. Version every evaluator as an artifact: dataset version, prompt/rubric, model, sampling params, parser, thresholds, and calibration data. Scores are comparable only when that provenance is compatible.
  4. Promote production misses back into tests. Sample online traces, apply lightweight online evaluators for safety and format, route uncertain cases into review, and add confirmed failures to the offline dataset before the next deployment.
  5. Gate on slices, not just averages. Track task type, customer tier, language, tool path, retrieval source, cost, latency, and safety labels so a global pass rate cannot hide a regression in a critical segment.
This matches the direction in current evaluation tooling: OpenAI evals define datasets plus testing criteria and graders, OpenAI graders cover exact string checks, text similarity, score-model graders, and code execution, LangSmith separates offline dataset experiments from online production evaluation, and Phoenix treats dataset evaluators as a repeatable harness similar to a unit test suite. Sources: OpenAI evals, OpenAI graders, LangSmith evaluation concepts, LangSmith online/offline workflow, and Phoenix datasets and experiments.

A-grade release gate checklist

Use this checklist before trusting an eval suite to block production changes:

Evaluator stack

A strong eval program uses multiple evaluator types instead of expecting one judge to answer every quality question. EvalGate stores the evidence from each layer so a regression is not just “score went down.” Reviewers can see which slice failed, which evaluator fired, which judge configuration was used, and whether the failed case came from production, synthetic expansion, or a hand-authored golden case.

What an evaluation contains

Every evaluation has three building blocks: a set of test cases, the assertions that check each case, and an executor function that calls your AI system to produce an output for each input.
TypeScript
Python

Evaluation types

EvalGate supports four evaluation types, each suited to a different stage of the quality lifecycle:
Deterministic assertions that run fast and require no human input. Use unit tests for checks you can express programmatically — keyword presence, JSON schema validity, PII absence, sentiment, and latency thresholds. Unit tests are the backbone of CI gating.
Cases reviewed by a person, typically for subjective quality dimensions like tone, helpfulness, or factual accuracy that are difficult to automate reliably. Human evals produce labels that feed your golden dataset and calibrate your LLM judges.
Assertions backed by an LLM judge that scores outputs using structured reasoning. Use model evals for checks that require language understanding — hallucination detection, semantic correctness, and open-ended quality rubrics. See LLM judge orchestration for how judges work.
Side-by-side comparison between two versions of your AI system — for example, before and after a prompt change. A/B test evaluations let you measure whether a change improves, degrades, or has no effect on quality before you ship it.

Built-in assertions

EvalGate ships with 20+ assertions purpose-built for LLM outputs. Use them with expect(output) in any test case.
See the full assertions reference for detailed signatures and examples.

Tagging assertions by cost

Some assertions are cheap (local string checks) and others are expensive (LLM-backed calls). Use withCostTier() to make execution tiers explicit and control when each type of check runs:
TypeScript

Evaluation runs and baseline comparison

Running a suite produces an evaluation run: a timestamped record of every case result, pass/fail outcome, score, and any judge reasoning. Runs are stored so you can compare them over time. When you run npx @evalgate/sdk gate, the built-in local gate compares your current test/eval command against evals/baseline.json. If your repo uses EvalGate spec runs, npx @evalgate/sdk ci --write-results --base main writes run artifacts and compares the head run against a base run. This makes each run a regression checkpoint instead of a one-off quality check.
Scores are only comparable between runs that used the same judge configuration. When the judge config changes, EvalGate shows a discontinuity marker in trend charts instead of drawing a misleading trend line across incompatible methodologies.

Creating evaluations

You can create and manage evaluations from the SDK or directly in the dashboard.
Use createTestSuite to define evaluations in code. This is the recommended approach for evaluations you want to version-control and run in CI.
TypeScript