# Evals (AI evaluation)

> Evals are structured tests that measure how well an AI system performs on a fixed set of realistic inputs, scoring its outputs so that changes to prompts, models or data can be judged by evidence rather than impression.

Also called: AI evaluation, LLM evals, model evaluation, evaluation suite, eval set. Category: Delivery and quality. Source: https://aibuildindex.com/glossary/evals

## In the index

- Search over internal documents: median $2,150, middle half $300 to $8,800, 918 priced briefs (https://aibuildindex.com/cost/document-search-rag)
- Custom AI agent: median $3,850, middle half $600 to $10,000, 2,831 priced briefs (https://aibuildindex.com/cost/custom-ai-agent)
- Document data extraction: median $1,400, middle half $250 to $5,000, 423 priced briefs (https://aibuildindex.com/cost/document-data-extraction)

An AI system can look excellent in a demo and still fail on the cases that matter. Evals are how builders find out before users do. An eval runs the system on a set of realistic inputs, compares each output with what a good answer looks like, and produces a score. Without evals, every change to a prompt or model is a guess. With them, a buyer can see whether the system is getting better, staying the same or quietly getting worse.

## How it works

An eval has three parts. First, a set of test cases, ideally drawn from real work: actual customer questions, real invoices, genuine support tickets. A carefully checked set of these with known correct answers is a [golden dataset](https://aibuildindex.com/glossary/golden-dataset). Second, a way of scoring each output. Third, a report that shows the score overall and on the cases that failed.

Scoring depends on the task:

- **Exact checks** suit extraction and classification: did the system pull the right invoice number, choose the right category?
- **Rule checks** test format and constraints: is the output valid JSON, does it cite a source, does it stay under a length?
- **Model-graded checks** use a second model to judge qualities that are hard to define with rules, such as whether an answer is faithful to its sources. These need spot-checking by people.
- **Human review** remains the reference for judgement-heavy tasks.

Evals run whenever something changes, which makes them a form of [regression testing](https://aibuildindex.com/glossary/regression-testing) for AI behaviour. They sit alongside [red teaming](https://aibuildindex.com/glossary/red-teaming), which looks for failures deliberately, and [observability](https://aibuildindex.com/glossary/observability), which watches the live system.

## What it means for cost

Building evals takes real effort, mostly in collecting and checking test cases, so builds with proper evaluation tend to price higher than builds without it. That cost usually pays back: evals catch [hallucinations](https://aibuildindex.com/glossary/hallucination) and errors before launch, make model upgrades safe, and give the buyer a clear acceptance test.

When reviewing a quote, ask:

- How will you measure whether the system is good enough?
- Where will the test cases come from, and who checks the correct answers?
- What score counts as acceptable, and on which cases?
- Will we receive the eval set and be able to run it ourselves?

A builder who cannot describe how they will test outputs is asking the buyer to judge quality by feel.

## Common questions

### What is the difference between evals and normal software testing?

Normal tests check that code does exactly what it should, with a clear pass or fail. AI outputs vary and are often partly right, so evals score quality across many examples. Both are needed: tests for the code around the model, evals for the model's behaviour.

### How many test cases does an eval need?

Enough to cover the common cases and the known hard ones. A small, carefully chosen set from real data is more useful than a large synthetic one. The set should grow as new failures are found in use.

### Should I own the evals for my system?

Yes. The eval set encodes what good looks like for your business. Owning it lets you check a new model, a new builder or a new version without starting again.

## Related terms

- [Golden dataset](https://aibuildindex.com/glossary/golden-dataset): A golden dataset is a carefully checked set of real example inputs paired with their correct outputs, kept fixed and used as the reference for measuring whether an AI system gives the right answers.
- [Regression testing](https://aibuildindex.com/glossary/regression-testing): Regression testing is re-running a system's existing tests after every change to confirm that features which already worked still work, catching new bugs or quality drops before they reach users.
- [Hallucination](https://aibuildindex.com/glossary/hallucination): A hallucination is output from an AI model that sounds plausible but is false, unsupported or invented, such as a made-up fact, citation, figure or policy presented with the same confidence as a correct answer.
- [Red teaming](https://aibuildindex.com/glossary/red-teaming): Red teaming is deliberately trying to make an AI system fail, by attacking it with misleading, harmful or adversarial inputs, to find unsafe behaviour, data leaks and weaknesses before real users or attackers do.
- [Observability](https://aibuildindex.com/glossary/observability): Observability is the ability to see what a live system is doing and why, through logs, traces and metrics, so that errors, slow responses, rising costs and poor AI outputs can be found and explained.
- [LLMOps](https://aibuildindex.com/glossary/llmops): LLMOps is the set of practices for running applications built on large language models in production, covering prompt versioning, evaluation, monitoring, cost control, model updates and safety checks after launch.
