@lotte_verheyden: Before you write good evals, you have to pick the right things to evaluate. Main take-aways: - source metrics from fail…
Summary
This article provides guidance on building and maintaining evaluation sets for AI systems, emphasizing the importance of selecting the right metrics based on observed failures and actionable insights.
View Cached Full Text
Cached at: 08/19/26, 12:44 PM
Before you write good evals, you have to pick the right things to evaluate. Main take-aways:
- source metrics from failures you see in traces
- keep the set small and maintainable
- only keep a metric if you’d take action when it moves https://t.co/G2FZjfidrb
How to build an eval set you can maintain
“I have traces, how do I set up evals?” is a very common question, and an important one to get right. This article will guide you through choosing the right metrics to evaluate.
Three kinds of metrics
In the end, you’ll end up with a set of metrics that each fall in one of the following categories:
A good setup uses a mix of the three together. Goal metrics are the ones you actively push up, guardrails catch the failures you can’t afford even once, and operational metrics give you more insight into the system.
The fewer metrics you can keep without feeling like you’re missing visibility, the better:
-
every metric is an extra evaluator/dataset to run and maintain
-
when everything is important, nothing is
**Your metric set is a living artifact **Your north star changes over time. Even if you have your evals set up, it’s important to keep a recurring process of looking at a sample of your traces manually. You’ll discover failures your evals didn’t cover yet, or notice that some metrics became less important over time.
Where candidate metrics come from
The first step towards getting a good metric set is sourcing candidate metrics. These come from two places:
1. Observed failures
Most of your metrics will come from you going through your traces, discovering how your agent behaves and how you’d like it to behave instead. There’s a structured process for translating what you see into metrics to evaluate, called Error analysis. This should, in most cases, be your default way of deciding on metrics: write evaluators for errors you discover; don’t focus on imaginary ones.
2. Goals and hard constraints
There are requirements you know you need to monitor before seeing your agent in action. Compliance rules, safety requirements, and format contracts get an evaluator from day one, even if you have never seen them break. These are often guardrail metrics.
**Metric catalogs are good for exploration, but tailor them to your product **Evaluator libraries with ready-made metrics like hallucination, toxicity, or helpfulness measure abstract qualities that may not match how your application fails.
Which candidates deserve a metric?
Not all criteria candidates should be tracked.
One-time fix or generalization problem?
Sometimes, an agent fails at something because you didn’t specify how you wanted the agent to behave on that aspect. If a simple prompt change resolves a failure mode, just make the change and forget about it. Only keep a metric when a simple prompt change doesn’t solve your problem, and you need to continuously track a failure mode over time.
Examples of likely one time fixes:
-
The output isn’t valid JSON
-
The reply uses the wrong date format
-
The response uses markdown on a plain-text channel
-
The bot doesn’t disclose it’s an AI assistant
Example generalization problems:
-
whether the answer is supported by the retrieved context
-
whether the right context was fetched to answer the question
-
whether the response actually answered the user’s request
-
whether the agent picked the right tool and passed the right arguments
Tie every metric to a decision
For each metric candidate, determine what the action changes when the metric moves: block the deploy, roll back the prompt, open an investigation. If no action changes, the metric would be noise, and should not be tracked.
Two examples:
-
Conversation length rises both when users are engaged and when they are stuck, so the number moves for unrelated reasons and you can’t act on it alone. This is not a good metric.
-
In OpenAI’s receipt-processing walkthrough, merchant-name extraction was wrong 85% of the time, but those errors turned out to be uncorrelated with the audit decision the system existed to make, so the team stopped tracking it.
Mind the budget
This one is more helpful to prune once you have set up your evaluators. Some evaluators cost more than others to run:
-
Code evaluators are close to free
-
An LLM-as-a-judge evaluator costs money to run, and is also harder to maintain (see writing good evaluators)
If a metric is not that important and is expensive to track, it might be a good decision to scratch it.
Starting from zero
Before you have your metric set, you’ll need to determine your agent’s failure modes. This will help you derive metrics.
To start, bootstrap with two generic scores: a free-text note describing what happened and what seems wrong, and an overall pass/fail. Read 30 to 50 traces with only those, cluster the notes into named failure categories, and then create one boolean score per category. This process is called error analysis.
Keeping the set alive
A metric set describes your application as it is today. Three habits keep it current:
-
Re-run error analysis after significant changes. Prompt rewrites, model swaps, and new features might change the failure distribution; when to run it is covered on the error analysis page.
-
Retire metrics that stopped catching things. With the exception of guardrail checks, a score that sits at 100% for months carries no information and you can most likely drop it.
-
Watch the metrics you optimize. Goodhart’s law applies here: when you tune prompts against certain metrics, you can overfit at some point. It’s important to re-validate against new human labels from time to time.
Where to start
-
Run error analysis if you haven’t.
-
Write down the product goals and hard constraints, and turn each goal into a signal you can observe in traces.
-
Apply the filters: fix what a prompt change fixes, keep only candidates tied to a decision, and let the judge budget push back.
-
When you are happy with the set of metrics you assembled, implement the evaluators for it. The deep dive on writing good evaluators covers how.
This is a page from the Langfuse Academy. Explore more on langfuse.com/academy.
Similar Articles
Everyone says write evals for your agent. But what should you actually test?
A practical guide on writing effective evaluations for AI agents, focusing on starting from observed failures and using a mix of deterministic checks and LLM judges.
@businessbarista: Hot take: evals are the #1 thing keeping companies from becoming AI-native. If you want to understand evals, read this …
文章主张评测(evals)是企业成为 AI-native 的最大障碍,并给出了 eval-driven development 的指南:定义好的行为、对 agent 进行测试、将失败案例转化为回归测试,并介绍了 grader、case、run、trace 四个核心概念以及确定性检查、参考答案比对等四种打分方式。
@OpenAI: Let’s talk about evals. We’re always looking for better ways to measure and forecast model progress, especially as benc…
OpenAI discusses the importance of evals (evaluations) for measuring and forecasting model progress, especially as benchmarks become saturated or gamed, featuring insights from Tejal Patwardhan and Andrew Mayne.
@suraj_sharma14: As an AI Evals Engineer, you must build these projects. 1.) Trajectory Grading Engine Build: Step-level evaluator that …
A practitioner outlines 15 must-build projects for AI Evals Engineers, covering trajectory grading, shadow routing, calibrated LLM-as-a-Judge, CI/CD regression gates, adversarial RAG testing, DPO fine-tuning flywheels, statistical significance, agent red-teaming, drift monitoring, cost-quality dashboards, counterfactual replay debugging, synthetic edge-case generation, context-window eviction tests, dataset contamination checks, and public eval methodology teardowns.
Why eval startups fail (2025)
This article explores why independent AI evaluation startups rarely succeed, citing talent drain to more lucrative parts of the stack, a narrow customer base, and optimization pressures that degrade eval utility.