Skip to content

Testing AI agents with evals

Evals are saved questions with the answers you expect, run after every change. How to write them for an AI agent, what counts as a pass, and what they gate.

Staying in control · 9 of 92 min readUpdated

In 30 seconds

  1. 1An eval is a question you care about and the answer you expect.
  2. 2Run them after every change to instructions, playbooks or sources.
  3. 3Below the pass rate, an AI agent may not run automations on its own.

On this page

  1. Write the cases
  2. What counts as a pass
  3. When to run them
  4. Evals as a gate
On this page4 sections · 2 min
  1. Write the cases
  2. What counts as a pass
  3. When to run them
  4. Evals as a gate

The short answer

Test an AI agent the way you test software: save the questions that matter with the answers you expect, and run them again after every change. These saved cases are evals. They catch the edit to an instruction, a playbook or a knowledge source that quietly breaks an answer that used to be right, before a customer notices.

Write the cases

An eval case in Infinized belongs to one colleague and holds a prompt and, optionally, the answer you expect. Good cases come from real work:

  • the questions asked most often,
  • the ones that went wrong once,
  • the ones where a wrong answer costs money or trust: prices, terms, refunds, anything legal.

A dozen well-chosen cases beat a hundred generic ones.

What counts as a pass

A case passes when the reply contains the expected answer, ignoring case, or is at least 70 per cent similar to it. With no expected answer, any reply that is not empty passes, which checks that a colleague still answers at all.

No second model grades the first: the rules are plain text matching, so a result means the same thing every time. Write the expected answer as the phrase that must appear, not as a whole paragraph.

When to run them

  • After every change to instructions, a playbook or a source.
  • On a schedule: a case can run daily or weekly on its own.
  • From your own tooling, through the API or over MCP.

A case runs with the colleague's full toolset, approvals included, so it tests the colleague the way it really works. A case that passed before and now fails alerts the admins.

Evals as a gate

An AI agent's pass rate is the share of its cases whose latest result passed. In Infinized an AI agent below 70 per cent may not have an automation switched on or triggered: work that runs without anyone asking needs an AI agent that gets the known questions right. An AI agent with no scored cases is not held back.

See evals and rolling out safely.

See it at work in your organisation.

We start by listening to your question. Then we show you a demo that fits your organisation.

  • Approvals from the first run
  • Budgets that stop
  • Hosting in the Netherlands