LLM evaluation: metrics, a framework and what to do next
LLM evaluation means scoring what a language model or an agent produces against criteria you chose, on cases that look like real use. You pick what good means, pick metrics that measure it, run them on a fixed set of cases, and decide what to change. Most guides stop at the score. This one covers the decision too.
What to evaluate in an LLM product
Start from the job the product does for a person, not from a list of metrics. For most products the useful questions fall into six groups.
- Task success: did the answer or the action get the job done?
- Answer quality: is it correct, complete and in the right tone?
- Faithfulness to sources: does the answer stay inside the material it was given?
- Safety: does it refuse what it should refuse, and stay within your policies?
- Cost and latency: what does an answer cost in tokens and seconds?
- User usefulness: could the person actually use the answer?
The last group is the one automatic checks cannot reach. A correct answer can still be useless to the person who asked. Write each group down as a criterion in your own words, for example "the answer names the source it used", so that anyone on the team can tell whether it was met.
LLM evaluation metrics: what each tells you and what it misses
A metric is a way to turn one of those criteria into a number. Three kinds of checks produce most of them: code checks (exact match, format, length), a language model acting as a judge, and people. Anthropic's documentation on building evaluations advises mirroring your real task distribution, including edge cases, and automating grading where you can.
Faithfulness has a published definition. A 2023 paper on evaluating retrieval-augmented generation (Es and colleagues) says an answer is faithful when the claims in it can be inferred from the given context. Answer relevance, in the same paper, asks whether the answer addresses the actual question.
| Metric | What it tells you | What it misses |
|---|---|---|
| Exact match or format check | Whether the output has the shape you need | Whether the content is any good |
| Faithfulness | Whether claims can be traced to the sources | Whether the sources were the right ones |
| Answer relevance | Whether the answer addresses the question | Whether it was correct or usable |
| Judge score against a rubric | How a model rates tone, completeness or helpfulness | What a real user would have made of it |
| User rating | Whether the person says it helped | Why, unless you ask |
How to evaluate an AI agent
AI agent evaluation adds a question: not only what the agent said, but what it did. IBM's overview of agent evaluation defines success rate or task completion as the share of tasks the agent completes correctly out of the total. It also points to the checks you can run on tool calls, such as a missing required parameter or a parameter that the tool does not define. And it recommends looking at the execution path across a multi-step problem, for example whether the agent picked the right tool.
Put together, agent evaluation has three layers you can measure separately.
- Task completion: did the whole task end in the right state?
- Tool-call correctness: were the right tools called with valid arguments?
- Steps taken: how many steps did it need, and were any of them wasted or repeated?
Read all three together. An agent can finish the task through a wasteful path, or call every tool correctly and still miss what the person wanted.
An LLM evaluation framework in five steps
Here "framework" means a way of working, not a software library. Any tooling can sit underneath it.
- Write the criteria. Say what good looks like in plain words, one criterion per line, and set a pass mark for each before you see any results.
- Build the cases. Collect real inputs and, where you can, real user answers. Keep the set fixed and check it by hand. A golden dataset is the name for such a set.
- Choose the checks. Use code for what code can decide, a judge model for what needs reading, and people for what needs a person. Then check the judge against people's labels, as LLM as a judge explains.
- Run it and read the misses. Look at the failing cases one by one before you look at the average.
- Decide. Name the one change the result points to, make it, and run everything again.
The loop is the point. The whole cycle, with the pillar view on top, is laid out in the guide to AI evals.
Offline or online evaluation?
Offline evaluation runs on a fixed set of cases before you ship, often in your CI. It is repeatable, cheap to run often, and needs no real users. Its weakness is that the set only holds the cases you thought of.
Online evaluation scores live usage as it happens. It finds the failures nobody planned for. Its weakness is that you learn about a problem after a user has met it.
Use both. Offline checks guard a release, and online checks feed new cases back into the set. Each catches what the other misses.
Chatbot evaluation metrics
A chatbot is judged over a conversation, not over one answer. The same single-answer metrics still apply to each reply: relevance, faithfulness to sources, safety. On top of them, add questions about the whole exchange.
- Did the person reach their goal, and in how many turns?
- Did the bot keep what the person said earlier in the conversation?
- Did it hand over to a human when it should have?
Chatbot performance metrics are therefore a mix: per-reply scores, per-conversation outcomes, and what the user says afterwards. Test whole conversations, not only first messages.
How do you evaluate a RAG system?
RAG, short for retrieval-augmented generation, means a language model answers using passages that a retrieval step fetched from your own material. The Ragas paper describes such systems as made of a retrieval module and a generation module based on a language model. A wrong answer can come from either one, so score them apart.
Retrieval quality asks whether the right passages came back. In the same paper, context relevance means the retrieved text exclusively contains the information needed to answer the question. Check two things: that the passage holding the answer was fetched at all, and that little else came with it.
Answer quality asks what the model did with those passages. Faithfulness is the check already described above: the claims in the answer can be inferred from the context. Answer relevance then asks whether the answer addresses the question. A faithful answer can still miss the question, and a relevant answer can still contain claims the sources do not support.
Read the two parts together. If retrieval failed, fix the search before you touch the prompt. If retrieval was fine and the answer is unfaithful, the problem sits in generation. Use the same fixed cases for both parts, and keep a human-checked label for which passage should have been found.
How to turn a score into a change
A score tells you that something is off, not what to fix. This is the step that most often gets skipped. A study led by Eva co-founder Willem van der Maden and published at ACM CHI 2026, "Results-Actionability Gap: Understanding How Practitioners Evaluate LLM Products in the Wild", found that 17 of 19 people building AI products gathered evaluation data but could not turn it into concrete improvements.
Three habits help.
- Tie each criterion to a place in the product or the code, so a failing criterion points somewhere.
- Rank by distance from the pass mark, not by how easy the fix looks.
- Measure everything again after the change. A fix for one criterion can quietly break another.
Eva is built around this step. It is in alpha: Eva judges every answer against criteria your team wrote, asks your users whether the answer helped, opens one pull request for you to review, and measures all criteria again afterwards. You can see the pieces on the features page.
What LLM evaluation cannot tell you
A metric measures only what you wrote down. It says nothing about needs you did not think of, and a judge model does not see your interface or know your users. A good score on a fixed set also does not guarantee a good week in production, which is why online checks and real user answers stay in the loop. Treat every number as a question to look into, not a verdict.