Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Opinion

Start your evals by reading outputs, not by picking metrics

The fastest way to useful LLM evals is to read real outputs and write down what is wrong. Why error analysis comes before metrics, and how to do it.

By 8 min readUpdated
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

When a team decides to “add evals”, the first meeting is often about metrics. Should we measure faithfulness, relevance, toxicity, helpfulness? Which framework has the best scores? A dashboard appears with six numbers on it, and a month later nobody trusts them or knows what to do when one goes down.

The short answer to how to evaluate an LLM app: collect fifty to a hundred real traces, write a note on what is wrong with each, group the notes into categories and count them. Fix the biggest category, then write a specific check for that failure. Repeat. Metrics come after you know how your product fails.

There is a better order, and it is less glamorous: read a lot of outputs first, write down what is actually going wrong, and only then decide what to measure. This approach is usually called error analysis, and practitioners who teach evals, Hamel Husain and Shreya Shankar among them, have been making the case for it for a while. Husain calls it “the single most valuable activity in AI development” (A Field Guide to Rapidly Improving AI Products, March 2025). We agree with them.

Why metrics first goes wrong

Generic metrics measure generic qualities. Your product fails in specific ways. A support assistant might be perfectly “relevant” and “faithful” while consistently giving the refund policy for the wrong country, or answering in a tone your brand team hates, or offering to escalate when it should just answer. No off-the-shelf metric was looking for those.

You also cannot interpret a metric you have not calibrated. A faithfulness score of 0.82 is meaningless until you have looked at examples at 0.82 and decided whether they are acceptable.

There is a research finding behind this too. Studying people who graded LLM outputs, Shankar and colleagues found what they called criteria drift: “users need criteria to grade outputs, but grading outputs helps users define criteria” (Who Validates the Validators?, 2024). You find out what good means by reading outputs, so you cannot pick the right metric before you have read them.

And metrics chosen up front tend to be the ones that are easy to compute, not the ones that matter. You end up optimising what you can measure.

Error analysis in practice

The process is simple and takes a few hours the first time.

1. Collect real traces. Fifty to a hundred real interactions, with the full input, the context the model saw and the output. If you are not in production yet, write realistic inputs, including awkward ones, and run them. Tracing tools (Langfuse, LangSmith, Phoenix and others) make this much easier; a CSV is fine to start.

2. Read each one and write a note. For every trace, write one or two sentences about what, if anything, is wrong. Be specific: “quoted the UK returns window to a US customer”, not “inaccurate”. Do not try to categorise yet. One person with product knowledge should do this; it is not a task to delegate to an intern or a model.

3. Group the notes. Once you have notes for all of them, sort them into categories that emerge from what you wrote. You might end up with “wrong region policy”, “missed the actual question”, “too long”, “promised a callback we don’t offer”.

4. Count. How many traces fall into each category? Now you know your biggest problem, with evidence, and you probably did not guess it in advance.

5. Fix and measure the top category. Look at the traces in it and work out why: missing context, a confusing instruction, bad retrieval. Fix that. Then write a check for that specific failure: a code assertion if possible (“response mentions a returns window that matches the customer’s region”), a calibrated judge if not.

6. Repeat. Each round gives you a better product and an eval suite made of checks that matter.

A worked example

Here is what one round looks like for an imagined support assistant for an online shop that sells in the UK and the US. The traces, notes and counts below are made up to show the method, not measurements.

Collect. Export 60 recent conversations from your tracing tool or logs, each with the user’s message, the documents the assistant retrieved and its reply.

Note. Read each one and write one line. A few of the 60:

Trace Note
007 Fine.
012 Quoted the UK 14-day returns window to a customer in Ohio.
019 Answered the delivery question but ignored “and can I change the address?”
023 Fine, but four paragraphs for a yes/no question.
031 Said “I’ll ask a colleague to call you”. We have no call-back service.
044 Quoted the UK returns window again; the US policy was in the retrieved documents.
052 Missed the second question again (order status and invoice).

Group and count. Sort the notes into categories that come out of what you wrote:

Category Traces
Wrong region’s policy 11
Answered only the first of two questions 7
Far too long for the question 6
Promised a service we do not offer 3
Fine 33

Nobody guessed “wrong region’s policy” before reading, and it is the biggest category by a distance.

Fix the top category. Reading the 11 traces shows the cause: the system prompt never says which region the customer is in, so the model picks whichever policy it retrieved first. The fix is to pass the customer’s country in the context and tell the model to use that region’s policy.

Write a check for it. This failure has one right answer, so a code check works. Anthropic’s eval guide describes code-based grading as the “fastest and most reliable” kind, though it lacks nuance for complex judgements (Anthropic docs):

def check_region_policy(reply: str, customer_country: str) -> bool:
    """The returns window quoted must match the customer's region."""
    uk_window, us_window = "14 days", "30 days"
    if "return" not in reply.lower():
        return True  # the check only applies to returns answers
    if customer_country == "US":
        return us_window in reply and uk_window not in reply
    return uk_window in reply and us_window not in reply

Run it over every trace in the category before and after the fix, then add those traces to your test set so the failure cannot come back unnoticed.

Use a judge where code cannot. “Answered only the first of two questions” is fuzzier: no string match tells you whether both questions were answered. That category gets a model judge with a narrow, binary question (“Did the reply answer every question the customer asked? Yes or no.”), checked against your own labels on the seven traces before you trust it. LLM-as-a-judge shows how to calibrate one.

Repeat. Next round, read 60 new traces. The region category should be near zero; something else will be on top.

What you end up with

After two or three rounds you have:

  • A test set built from real failures, which is far more valuable than an invented one.
  • A short list of specific checks, each tied to a problem you have seen. When one fails, you know what it means.
  • A shared understanding in the team of how the product actually fails, which changes design decisions as much as prompts.

Notice what you do not have: a generic dashboard. You may add some general-purpose measures later. They will make more sense once you know what your outputs look like.

Objections we hear

“We do not have time to read a hundred outputs.” It takes a morning. Teams routinely spend more than that debating metrics, and the reading pays off immediately in fixes.

“Can a model do the reading?” It can help: summarising long traces, suggesting categories once you have notes. But the judgement about what counts as wrong for your product and your users has to come from people who know them. Use models to scale up a judgement you have already made and checked, which is what LLM-as-a-judge is for.

“Our outputs vary too much to test.” Variation is why property checks and pass rates exist. You test whether answers have the qualities you need, not whether they match a string.

The evals cluster on this site

Error analysis is the start. These pages cover the rest of the work, roughly in the order you will need them:

Stage Page
Collect traces Add tracing to an LLM app, trace an agent with OpenTelemetry, agent observability: what to log
Choose a trace store LLM observability platforms compared
Turn categories into checks Your first LLM eval, LLM evaluation metrics cheat sheet
Fuzzy categories LLM-as-a-judge
Gate every change LLM evals in CI with promptfoo, promptfoo vs DeepEval vs Ragas
Whole applications Test LLM applications
Retrieval Evaluate RAG with a golden set
Agents Evaluate AI agents, design tools an agent can use well
Coding agents Evaluate coding agents on your own repository
Agent Skills Test Agent Skills
Choosing a model How to choose an LLM for a task

If you prefer a guided route, the evals and safety learning path strings the core pages together with a quiz at the end.

Next steps

Covers

  • Write your first LLM eval

    Turn real outputs into a small test set, add code-based checks in promptfoo and run them in CI to catch regressions on every change.

    TutorialBeginner40 min

  • LLM-as-a-judge: grading outputs you can trust

    Write narrow grading criteria, check the judge's verdicts against your own labels and decide when its agreement is good enough.

    TutorialIntermediate45 min

  • Add tracing and cost tracking to an LLM app

    One trace per user action, with tokens, latency and cost for each model call, so slow and costly features stand out.

    WorkflowIntermediate1 h6 steps

  • Eval

    A repeatable test that measures how well an AI system performs on a defined set of cases, so you can compare versions instead of guessing.

    Glossary

  • LLM evals cheat sheet

    Check types, a judge prompt template, which metrics to use for RAG, agents, classification and extraction, sample sizes and a CI snippet, on one page.

    Article

Back to top