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:- 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.
- 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.
- 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.
- 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.
- 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.
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:unit_test
unit_test
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.
human_eval
human_eval
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.
model_eval
model_eval
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.
ab_test
ab_test
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 withexpect(output) in any test case.
Text and content
Text and content
Safety and compliance
Safety and compliance
JSON and structure
JSON and structure
Quality and style
Quality and style
Numeric and performance
Numeric and performance
Tagging assertions by cost
Some assertions are cheap (local string checks) and others are expensive (LLM-backed calls). UsewithCostTier() 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 runnpx @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.- SDK
- 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