Guides  /  Evaluation and quality

How do you evaluate an agent when there is no single right answer?

Answer

Grading is scoring each response against the criteria you set for a good answer. Structured output is graded by a rule: a generated SQL query either returns the rows the task required or it does not. Unstructured output is graded by a second model reading it against criteria written in advance.

Akka grades every run against the interaction record the agent already wrote. Rule-based evaluators and the LLM judge write their verdict onto that record, so the grade stays attached to the run it scored.

The mechanism

The kind of output decides which evaluator grades it.

A deterministic evaluator is a check that returns the same verdict on the same output every time it runs. Generated SQL executes against a database and the returned rows are compared with the rows the task required. A JSON payload validates against its schema or fails on a named field.

An LLM judge is a second model that reads a response and scores it against criteria written before the run. A support reply has no single correct text, and the criteria name what it had to contain: the account status and the policy that applied.

agent runSTRUCTURED OUTPUTdeterministic evaluatorruns it and compares the resultUNSTRUCTURED OUTPUTLLM judgescores against written criteriathe run and its gradethe interaction record
What a judge needs

A judge detects only what the criteria name.

Criteria written in advanceThe criteria name what a good answer contains for this task. A criterion nobody wrote down produces an indefensible grade.
A reference setResponses graded by the people who own the task, sampled across the range of the work.
Calibration against human gradesThe judge is measured against the human grades before its output gates a release.
A recorded reasonThe verdict carries the criterion that failed, so the prompt owner sees which requirement the answer missed.
What this changes

The grade that gates a release is the grade an auditor reads.

Evaluations run offline against recorded traffic and online against traffic as it is served. An offline run answers whether a change improved quality before it ships, and an online run answers whether quality fell afterward.

Akka Verify reads the interaction record for governance and Akka Optimize reads it for training, and both read the grades already attached to the run. A stack of separate products copies the trace into an evaluation tool that stores the grade apart from the run.

Grading works against agents running in a third-party coding tool such as Cursor, Claude Code, or Copilot. A grade that stops an action requires the agent to run on Akka.

Questions

Related questions.

How is this different from a unit test?

A unit test asserts one expected output and fails on every other. Two agent responses can differ in wording and both be acceptable, so the evaluator scores properties of the answer: the fields it contains and the policy it applied.

What stops the judge itself from being wrong?

The judge is measured against a reference set graded by people before it grades anything that gates a decision. Disagreement between the judge and that set means the criteria need rewriting.

What happens when quality falls after deployment?

Online evaluation grades traffic as it is served, so the fall appears on the same record the release was gated on. A model promoted on that record is rolled back at the gate that promoted it.

Can an evaluation stop a response before it reaches a customer?

An evaluation running inline in the transactional path returns its verdict before the response is emitted, and the runtime blocks or escalates on that verdict. An inline check adds its duration to every response it guards, so compliance chooses which controls run inline.

On Akka. Deterministic evaluators, LLM-as-judge grading, and the interaction record are capabilities of Akka Verify and Akka Optimize. Tools named. Cursor, Claude Code and Copilot are third-party products.