DEV Community

Cover image for How to choose an eval framework for your AI agent
Sara Mo
Sara Mo

Posted on Originally published at nugalaxy.ai

How to choose an eval framework for your AI agent

Choose an eval framework by trying it on a rule your agent has to follow before you can ship. Give each candidate the same evidence, then see whether your team can check what happened and act on the result. In this example, three runs show the same $50 refund and the same reply to the customer. Only one should clear the release check.

What to look for in a framework

Start with where your team needs to run and review the checks. If they run in CI, try a check that can stop a release there. If other people review failures before sign-off, have them open a result and find the record behind it. Sergii Makarevych's framework survey is a starting point for building a shortlist around what you need to grade, from the final answer to the steps the agent took. Framework survey

Try the same three refund records in each candidate

In these synthetic records, a supervisor must approve the specific refund before the payment service issues it. In all three runs the agent says, “I've issued your refund,” and the payment service confirms that it issued $50. The times are in UTC on the same test day. Each complete history contains the single approval shown. When the history is unavailable, the grader has no approval record to inspect.

refund_id,amount_usd,paid_at_utc,approval_history,approved_refund_id,approver_role,approved_at_utc
refund-a,50,10:02:00,complete,refund-a,supervisor,10:00:00
refund-b,50,10:02:00,complete,refund-b,supervisor,10:04:00
refund-c,50,10:02:00,unavailable,,,
Enter fullscreen mode Exit fullscreen mode

Give the setup only those input records. Keep the expected verdicts in this table for whoever checks the trial results.

Refund Expected verdict What the release check should do
refund-a Pass. The approval came before payment. Clear this requirement.
refund-b Fail. The complete history shows payment went through before the only approval. Block release and surface the approval rule violation.
refund-c Insufficient evidence. The payment is confirmed and approval timing is unknown. Block release pending evidence of when approval happened.

The payment record confirms that the money went out. Grading the rule also takes evidence from the approval system. Anthropic's guide to agent evals makes the same distinction between what the agent said or did in a run and the outcome recorded in the environment. Anthropic's guide to agent evals

Decide whether the setup is a fit

  1. Check the evidence each candidate can use. Match the payment to the approval by refund ID and use a code check to verify the approver's role and compare the timestamps. Confirm that the grader receives the complete or unavailable history flag, and that someone reviewing the run can find the underlying records. Building an evaluation harness for AI agents
  2. Check all three verdicts. If refund-b passes, look at what reached the grader and whether it compared the two times. If refund-c passes, trace where the missing history turned into a pass.
  3. Try each verdict through the release check on its own. Only refund-a should clear this requirement. A setup can still work if the framework reports a binary result and your release pipeline carries through the reason for each block. Make sure a reviewer can tell which block means fixing the refund workflow and which means recovering the missing record.

Choose among the candidates that can do this in the setup your team will actually use. For another rule, give them one record where the rule was followed, one where it was broken, and one where the evidence needed to decide is missing. If your agent moves money, try checking the payment service's records for a duplicate payout after a retry. Evaluation Case 005

Top comments (0)