Skip to content

Evaluating an AI agent continuously: test sets, LLM-as-a-judge and Langfuse

An AI agent never answers the same way twice: it is tested on a set of real cases, run again at every change, and followed in production. The test set, the three ways to grade, what a judge model (LLM-as-a-judge) is worth and its biases, the tools your teams come across (Langfuse, LangSmith, promptfoo, Ragas…), a test case to copy, and the log of our own agents.

By Published on 26 November 2026

Evaluating an agent continuouslyEvery real failure becomes a test case, run again at every change.
  1. A real failure

    Found in the log

  2. A test case

    Run again at every change

  3. Grading

    Code, a judge model, a person

  4. The decision

    Extend, fix or stop

In production: every run traced, a sample reviewed by a person

Evaluating an AI agent continuously means running again, at every change (of instructions, tool or model), a set of cases drawn from real use, grading its results with code, a judge model or a person, and following in production what it does, what it costs and what it refuses. An agent never answers the same way twice: one successful run proves nothing, a series of graded runs does.

This article covers the test set, the three ways to grade, what a judge model is worth, the tools your teams come across, a test case to copy, and how we follow our own agents.

Why an agent is tested differently from software

Classic software gives the same result for the same input; an agent does not. It chooses its steps, calls tools, and can succeed once then fail the next time. Anthropic gives the scale of it in its January 2026 guide: an agent that succeeds in 75% of runs succeeds three times in a row only about 42% of the time. For a task that commits the company, repeated success is what counts, not the best run.

So we grade the outcome, not the path: two agents can call different tools and reach the same right result. The path only counts where it touches security, for instance a forbidden tool called along the way.

The test set: start from real failures

  • Real cases. Anthropic advises starting with 20 to 50 simple tasks drawn from real failures; a failure seen once becomes a case run again at every change.
  • Two families. Regression cases, which the agent must always pass, and progress cases, which it does not pass yet: they are never mixed into one score.
  • Trapped cases. An instruction hidden in a document, a request outside the agent’s role: see our article on the AgentSecOps method.
  • Several runs per case. A threshold written in advance: for instance three passes out of three runs for a regression case.

Three ways to grade: code, a judge model, a person

Who grades

What it checks well

Its limit

When we use it

Code

An expected field, a format, a tool called or not, an amount

Rigid: misses a right answer put another way

Wherever possible, first

A judge model (LLM-as-a-judge)

Meaning, tone, whether an explanation is right

Has its biases; must be compared with human grades before it is used

For what code cannot read

A person

Everything, including what nobody foresaw

Slow and costly

To calibrate the judge, and on a sample in production

LLM-as-a-judge: what it is worth, and its biases

LLM-as-a-judge means asking a language model to grade another one’s answer, against a grid. The study that launched it (Zheng and co-authors, 2023) measured that a strong judge model agrees with human graders in over 80% of cases, as much as humans agree with each other. It also named its biases: it prefers the answer placed first, the longer one, and sometimes its own.

What we take from it, in practice:

  1. A short, closed grid (no, partly, yes), rather than a mark out of ten.
  2. A reference answer when there is one, which the judge compares with instead of inventing.
  3. To compare two answers, two runs with their order swapped.
  4. A judge from another model than the agent being graded.
  5. Before relying on it, its grades compared with a person’s on a sample, then again at every change of model.

The tools your teams come across: Langfuse, LangSmith, promptfoo…

Tool

What it does

Licence and hosting

Langfuse

Traces of every run, datasets and experiments, model or code graders, prompt management, cost tracking

Open source (MIT, enterprise features aside), self-hostable; acquired by ClickHouse in January 2026

LangSmith

Traces, offline and online evaluations, judges, human annotation

A LangChain service; self-hosting on the Enterprise plan only

promptfoo

Command-line tests of prompts and agents, and attack tests (red teaming)

Open source (MIT); OpenAI announced its acquisition in March 2026, the project stays open

Ragas, DeepEval

Ready-made metrics, for a RAG system or an agent, in your tests

Open source (Apache 2.0)

Phoenix, Opik, MLflow

Traces and evaluations, self-hostable

Opik and MLflow under Apache 2.0; Phoenix under the Elastic License 2.0, which is not an open-source licence

Langfuse or LangSmith? Both do the same job. The first criterion is hosting: if your traces, which hold the data the agent handles, must stay with you, Langfuse self-hosts without a paid plan; LangSmith allows it on the Enterprise plan. The second, your framework: LangSmith integrates closely with LangChain and LangGraph, but follows the others too. For choosing the framework, see our comparison of agent frameworks.

A test case, to copy

The case of an agent that matches invoices with orders, written in a neutral format, to adapt to the tool you choose:

YAML
case: invoice-price-gap
origin: a real failure, found in the log
type: regression        # must always pass
input:
  invoice: supplier A, 3 lines, unit price of line 2 above the order
  order: no. 4521
expected:
  result: gap flagged on line 2, no payment prepared
  allowed_tools: [read_invoice, read_order, write_draft]
  forbidden_tools: [pay, send_email]
grading:
  - code: the draft names line 2 and the gap        # a script can check it
  - code: no forbidden tool was called
  - judge: is the explanation right and clear to the purchasing team?
    scale: [no, partly, yes]
  - person: review one case in ten, every week
threshold: 3 passes out of 3 runs

In production: following every run

Tests tell whether the agent is ready; production tells whether it stays so. There we follow, agent by agent: every run traced (what it read, called, produced), its cost, its refusals and errors, and a sample reviewed by a person. The OpenTelemetry conventions for generative AI, which describe these traces in a way shared by the tools, are still in development: check that the tool you choose exports its traces in a format you can take elsewhere.

According to LangChain’s survey of 1,340 respondents in late 2025, just over half of organisations (52.4%) run offline evaluations on test sets: the other half finds its regressions in production.

How we did it: the log of our own agents

The agents that run Idemys’s administration are followed the same way. Every run is written in a log that is only ever added to: what was read, checked, drafted, and what a person approved or corrected. Each correction becomes a written rule the agent reads at the next run. An agent only gains a step of autonomy, from read-only to drafts, then further, after a series of clean runs reviewed in that log.

The full case is on our case studies page: “Idemys, client zero”. For the agents already in service at your company, our approach Agent Check-up scores their quality, cost and security continuously, agent by agent, to decide whether to extend, fix or stop each one, and AgentSecOps sets the guardrails. For what an agent is, see our article on agentic AI.

Our work on agents is presented on the page Agentic AI.

Frequently asked questions

What is LLM-as-a-judge?

An evaluation method where a language model grades the answers of another model or of an agent against a written grid. It serves for what code cannot check, provided it is compared regularly with human grades.

How many cases does it take to start?

Anthropic advises 20 to 50 simple tasks drawn from real failures. A few real cases run again at every change beat many invented ones.

Can a model grade its own answers?

Better not: the 2023 study observed that some judge models favour their own answers. A judge from another model, compared with human grades, is safer.

Is Langfuse free?

Its code is open source under the MIT licence and can be self-hosted; only a few enterprise features (account provisioning, audit logs, retention rules) need a licence. It is also offered as a hosted service.

Sources

Written with an AI assistant from the sources cited, facts checked and reviewed by Mehdi Chafik on 25 November 2026.