LLM evaluation: how to test enterprise AI applications before and after launch
By AKINO Labs · Updated
The short answer
LLM evaluation is the practice of testing an AI application against a fixed set of real cases, with an agreed standard for each, before launch and after every change. For enterprise systems that means scoring retrieval, groundedness, correct refusals and task success separately, grading with rubrics, and monitoring live answers once it is in use.
Key takeaways
- Evaluate the application on your own tasks; public model benchmarks say little about your documents and users.
- Build the evaluation set from real traffic, and include the cases the system should refuse or escalate.
- Score retrieval, groundedness, refusals and task success separately, because one accuracy figure hides the trade-offs.
- LLM judges speed up grading but have known biases, so calibrate them against human grades.
- Rerun the set on every change and keep sampling live answers after launch.
What is LLM evaluation, and how is it different from a benchmark?
LLM evaluation, for an enterprise team, means testing your application, not the model in isolation. A public benchmark tells you how a model does on someone else's questions. Your evaluation tells you whether your prompts, retrieval, tools and guardrails, together, do your task well enough on your data.
The unit of evaluation is the whole system. A RAG assistant can fail because the right passage was not retrieved, because the model ignored it, or because a guardrail blocked a good answer. An agent can reach the right answer by taking an action it should not have. Testing only the final text misses most of this.
For a typical enterprise application, the parts worth testing on their own are:
- Retrieval: whether the right documents and passages come back for each question, filtered by the user's permissions.
- Generation: whether the answer is correct, complete and supported by what was retrieved.
- Guardrails: whether out-of-scope, sensitive and manipulated inputs are declined or escalated.
- Tools and actions: whether an agent calls the right tools, with the right arguments, and nothing more.
Evaluation also has a job beyond launch. It is the only reliable way to tell whether a new prompt, model version or chunking rule made things better or worse. Without it, every change is a guess.
How do you build an evaluation set from real traffic?
Build it from the questions, documents and tickets the system will actually face, label the expected outcome for each with the people who do the work today, and fix it before tuning starts. An evaluation set written by the build team tests what the build team expects, which is rarely what users ask.
- Collect real inputs. Helpdesk inboxes, search logs, past tickets, last quarter's documents. Remove or mask personal data before use.
- Cover the spread. Common question types, rare but important ones, ambiguous phrasing, typing errors, different languages and different user roles.
- Define the expected outcome. The correct answer and its source, or the acceptable behaviour, such as declining or escalating to a named queue.
- Hold part of it back. Keep a portion unseen during tuning so the final score is not flattered.
- Version it. Scores are only comparable on the same version of the set.
- Keep adding. Every production failure becomes a new test case.
Why should an evaluation set include refusal cases?
Because the most damaging failures in enterprise systems are confident answers to questions the system should not have answered. An evaluation set that only rewards answers will push the system towards answering everything.
Include cases where the right behaviour is to decline or hand over:
- Questions the documents do not cover
- Questions about an individual's case that need a person
- Requests outside the system's scope or the user's permissions
- Sources that conflict, where the system should flag rather than choose
- Inputs carrying instructions the system should ignore
Score these separately. A system that answers slightly more questions but invents answers to the ones it should have refused is worse than one that answers a little less and declines the rest. A worked example is in evaluating a workflow that should refuse.
Which metrics matter for RAG and agent evaluation?
Score each stage separately, so a failure can be traced to the part that caused it. The RAGAS paper on evaluating retrieval-augmented generation frames the same split: whether retrieval finds relevant, focused passages, whether the model uses them faithfully, and the quality of the answer itself.
Groundedness deserves the most attention in enterprise use. An answer can be fluent, relevant and wrong; checking each claim against the passage it cites is what catches it.
| Metric | Question it answers | How it is usually measured |
|---|---|---|
| Retrieval recall | Was the passage that holds the answer retrieved? | Check labelled source passages against the top retrieved results |
| Groundedness | Is every claim supported by the passage it cites? | Claim-by-claim check by a grader or a calibrated LLM judge |
| Answer correctness | Is the answer right and complete? | Compare with the labelled answer using a rubric |
| Refusal accuracy | Did it decline or escalate when it should, and only then? | Score refusal cases and answerable cases separately |
| Task success | Did the agent reach the right end state? | Check the final state of the systems it acted on |
| Action safety | Did it take any action it should not have? | Review tool calls against the allowed list and permissions |
| Cost and latency | Is it affordable and fast enough at real volume? | Measure per task across the evaluation set |
How do you write a human grading rubric?
Write a rubric that turns the domain expert's judgement into a few explicit, separately scored questions, with an example of each grade. Graders who share a rubric agree with each other far more often than graders asked whether an answer is good.
- Score dimensions separately. Correct, complete, supported by the cited source, appropriate in tone, correctly escalated.
- Keep scales short. Pass, partial and fail, or a three-point scale, with a written description of each.
- Give anchor examples. One real answer at each grade for each dimension.
- Mark critical failures. Some errors, such as a wrong amount or a breach of permissions, should fail the case whatever else is right.
- Double-grade a sample. Have two graders score the same cases and resolve disagreements; that is how the rubric improves.
Choose graders who know the subject. A policy answer should be graded by someone in HR, a contract extraction by someone in legal or procurement. Generalist reviewers tend to reward answers that sound right, which is the failure the evaluation exists to catch. Keep grading sessions short and regular, and record each grader's scores, so drift in one person's judgement shows up before it skews the results.
Can you use an LLM as a judge?
Yes, for scale, but only after checking it against human grades on your own cases. Using a model to grade another model's answers, known as LLM-as-a-judge, makes it practical to score thousands of cases on every change.
The research that popularised the approach also named its weaknesses. Zheng and colleagues found that strong models can agree well with human preferences, and identified position bias, verbosity bias, self-enhancement bias and limited reasoning ability as limitations.
Practical safeguards:
- Give the judge the same rubric and anchor examples as human graders.
- Ask for a short reason with each grade, so disagreements can be reviewed.
- Swap the order when comparing two answers, and use a different model from the one being judged where you can.
- Measure agreement with human grades on a sample, and recheck it when the judge model changes.
- Keep deterministic checks deterministic: exact values, formats and tool calls are better tested with code.
How do you run regression tests and monitor in production?
Rerun the evaluation set on every change and block the release if agreed scores fall, then sample live traffic continuously, because real use drifts away from any fixed set.
Before release:
- Run the full set on any change to prompts, models, retrieval, tools or source documents.
- Compare each metric with the last release, not only the total.
- Set minimum scores for critical metrics such as groundedness and refusal accuracy.
After release:
- Review a weekly sample of live answers with the rubric.
- Track refusal and escalation rates by reason; a sudden change usually means a document or upstream system changed.
- Collect user feedback and read it against the transcript.
- Rerun the set before any model provider change takes effect.
Close the loop between the two. When live review finds a failure, add the case to the evaluation set with its correct outcome, fix the cause, and confirm the fix with a full rerun. Over time the set becomes a record of every way the system has gone wrong, which is exactly what a regression test should hold.
For how evaluation gates a project from pilot to production, see AI proof of concept to production, and for retrieval-specific failures, RAG vs fine-tuning.
How AKINO Labs approaches evaluation
The AI research and prototyping practice at AKINO Labs builds evaluation harnesses alongside each prototype, compares commercial and open-weight models on the client's own data, and reports results plainly, including what did not work.
In production, the AI agents and automation practice uses evaluation harnesses for coverage, groundedness and escalation, and tests workflows on when they should refuse, not only on what they answer. The RAG in production field guide covers retrieval evaluation and monitoring in more depth.
Where AKINO Labs applies this
- Engineering practiceAI Research and PrototypingApplied research, prototypes and technical due diligence on the capabilities that are not settled yet.
- Engineering practiceAI Agents and AutomationAgentic workflows, document intelligence and process automation, grounded in your own systems and governed end to end.
Questions people ask
What is groundedness in LLM evaluation?
Groundedness is whether every claim in an answer is supported by the source passage it cites. It is checked claim by claim, and it catches fluent answers that are relevant but not actually backed by the documents.
How many test cases does an LLM evaluation set need?
Enough to cover the main question types, the hard cases and the refusal cases, with a held-out portion. Reflecting real traffic matters more than sheer size.
Is LLM-as-a-judge reliable?
It can agree well with human graders but has known biases, including favouring longer answers and the first answer shown. Calibrate it against human grades on your own cases before relying on it.
How do you evaluate an AI agent rather than a chatbot?
Check the end state of the systems it acted on and every tool call it made, not only its final message. An agent can give a correct reply after taking an action it should not have.
How often should you run LLM evaluations?
On every change to prompts, models, retrieval, tools or source documents, and before any model provider change. Live answers should also be sampled and graded on a regular schedule.
Sources
- Ragas: Automated Evaluation of Retrieval Augmented Generation. Shahul Es et al., arXiv. Proposes metrics for RAG pipelines covering whether retrieval finds relevant, focused context, whether the model uses those passages faithfully, and the quality of the generation, without relying on ground-truth human annotations.
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. Lianmin Zheng et al., arXiv. Examines using strong LLMs as judges, names position, verbosity and self-enhancement biases and limited reasoning ability as limitations, and reports that GPT-4 judgements agree well with human preferences.
Want this worked through on your own operation?
Send one sentence on what you are trying to fix. A practitioner replies with a straight view of what to build, what to buy and what to leave alone.
- A reply from a practitioner, not a sales script.
- A prioritised view of what to build, what to buy, and what to leave alone.
- No obligation. If we are not the right fit, we will say so.