In LLM 104, we looked at agents, tools, memory, and guardrails. That raises the question every serious LLM system eventually faces: how do we know if it is actually good?
Evaluation is harder than it looks. A model can sound fluent while being wrong. A RAG system can cite sources while missing the best evidence. An agent can complete a task but take too many steps, use the wrong tools, or create avoidable risk. Good evaluation is not just a leaderboard score. It is a measurement plan tied to the task you care about.
1. Evaluation Starts with the Use Case
The first mistake is asking, “Which model is best?” before asking, “Best for what?”
For a research assistant, quality might mean faithful summaries with citations. For a coding assistant, it might mean passing tests. For a customer support bot, it might mean resolving issues without escalation. For an evacuation planning assistant, it might mean correctly extracting assumptions, constraints, data sources, and uncertainty from planning documents.
Can the system do the task?
Does it work repeatedly across realistic inputs?
Does it improve the user's workflow?
An evaluation should be built around representative tasks, not just abstract prompts. If the actual workflow involves messy PDFs, incomplete tables, acronyms, and domain-specific definitions, the evaluation should include those.
Practical rule: evaluate the system in the shape it will be used. A clean benchmark can be useful, but it is not a substitute for task-specific testing.
- Liang et al. (2022), "Holistic Evaluation of Language Models": introduces HELM, emphasizing broad, transparent evaluation across scenarios and metrics.
- Zhao et al. (2023), "A Survey of Large Language Models": useful background for the many dimensions of LLM capability, training, adaptation, and evaluation.
2. Benchmarks Are Useful but Incomplete
Benchmarks give us shared measurement. They make it possible to compare models on common tasks. But benchmarks can also be overfit, contaminated, narrow, or disconnected from your actual use case.
Fast comparison across models.
Broad signals about capability.
Regression testing over time.
Your documents, users, and constraints.
Long workflows and tool use.
Local definitions of success and risk.
This is why benchmark results should be treated as a starting point. They tell you which models may be worth testing, not which system will work in your domain.
- Hendrycks et al. (2020), "Measuring Massive Multitask Language Understanding": introduced MMLU, a widely used benchmark across many subjects.
- Srivastava et al. (2022), "Beyond the Imitation Game Benchmark": BIG-bench, a large collaborative benchmark for probing language model capabilities.
- Lin, Hilton, and Evans (2021), "TruthfulQA": evaluates whether models imitate common human falsehoods.
3. Build a Local Evaluation Set
For a real LLM application, a small local evaluation set is gold. It should contain examples that look like the work users actually do.
For a research or planning assistant, examples might include:
- summarizing one paper with citations;
- comparing two methods sections;
- extracting variables from a survey instrument;
- answering a question from a long report;
- identifying missing evidence;
- refusing to invent numbers;
- using a tool to compute a simple result;
- catching a contradiction between two sources.
Input: Summarize the key behavioral factors in this evacuation paper.
Expected traits:
- Mentions risk perception, warning source, household constraints, and prior experience if supported.
- Cites page or section references.
- Does not invent sample size or coefficient values.
- Flags missing or unclear evidence.
You do not need hundreds of examples to start. A carefully designed set of 30-50 examples can reveal much more than a pile of generic prompts.
Good evaluation data feels slightly annoying. It includes edge cases, ambiguous wording, missing information, and examples where the correct behavior is to say "not enough evidence."
4. Human Evaluation Still Matters
Humans are expensive, inconsistent, and slow. They are also still essential. Some qualities cannot be fully reduced to automatic metrics: usefulness, clarity, nuance, trust, appropriateness, and whether the answer helped the user think.
A simple human rubric can be more useful than a complicated score:
The bars are illustrative. The important part is that reviewers use the same definitions.
Human evaluation becomes stronger when reviewers see clear criteria, examples of each score level, and instructions for resolving uncertainty.
5. LLM-as-a-Judge
One popular approach is using a stronger LLM to evaluate model outputs. This can scale evaluation quickly, especially for drafts, summaries, and conversation quality. But an LLM judge is still a model. It can be biased toward longer answers, familiar phrasing, confident style, or outputs from models it recognizes.
Use LLM judges as part of the evaluation stack, not as the entire stack.
Define the task and rubric.
Compare candidate answers.
Score with explanation.
Sample human review.
Adjust rubric and prompts.
Good practice includes blind comparisons, short rubrics, checking judge agreement with humans, and periodically reviewing judge failures.
- Zheng et al. (2023), "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena": a key paper on using LLM judges and pairwise preference evaluation.
- Liu et al. (2023), "G-Eval": studies GPT-4-based evaluation for natural language generation with better alignment to human judgments.
6. Evaluating RAG Systems
We introduced RAG evaluation concepts in LLM 103 (sections 8 and 9). Here we connect those ideas to a broader measurement framework.
RAG evaluation needs two separate questions:
- Did retrieval find the right evidence?
- Did generation use that evidence faithfully?
If the answer is wrong, you need to know where the failure happened. Did the retriever miss the source? Did the reranker bury it? Did the model ignore it? Did the prompt ask for more certainty than the evidence supports?
Was the needed evidence retrieved?
Is the answer supported by the retrieved context?
Do citations point to the right source?
For a RAG assistant, I would test questions where the answer is present, absent, ambiguous, contradicted across sources, or spread across multiple documents. The “absent” cases are especially important because they test whether the system can avoid bluffing.
- Es et al. (2023), "RAGAS": proposes automated reference-free evaluation metrics for RAG systems.
- Gao et al. (2023), "Retrieval-Augmented Generation for Large Language Models: A Survey": covers RAG system variants and evaluation challenges.
7. Evaluating Agents
Agents require process evaluation. The final answer may look fine while the agent took unnecessary actions, ignored tool output, or got lucky after a bad plan.
Track:
- task success;
- tool-call correctness;
- number of steps;
- cost and latency;
- recovery from errors;
- permission boundary violations;
- human interventions;
- auditability of the trace.
Goal: Create a literature summary. Step 1: Search papers. Good. Step 2: Select sources. Missed two relevant papers. Step 3: Draft summary. Mostly grounded. Step 4: Add citations. One citation unsupported. Outcome: Useful draft, but retrieval and citation checks need improvement.
The baseline matters. If a deterministic script plus one LLM call solves the task more reliably than an agent loop, the simpler system wins.
- Yao et al. (2022), "ReAct": useful for understanding action-observation traces in agent workflows.
- Wang et al. (2023), "A Survey on Large Language Model based Autonomous Agents": surveys agent components and evaluation considerations.
8. Regression Testing
LLM systems change. Models update, prompts change, retrieval indexes refresh, documents move, tools break, and user expectations evolve. Regression testing helps catch behavior that quietly got worse.
Useful regression tests include:
- fixed prompts with expected traits;
- RAG questions with known supporting chunks;
- tool-use tasks with expected calls;
- refusal or uncertainty cases;
- citation checks;
- cost and latency thresholds;
- adversarial or malformed inputs.
Evaluation is not a one-time report. It is a monitoring habit. Every important model, prompt, retrieval, or tool change should be tested against examples you care about.
9. A Practical Evaluation Plan
For a serious but manageable LLM evaluation, I would start here:
- Define the task. Write down what the system is supposed to do.
- List failure modes. Hallucination, bad citations, missed retrieval, wrong tool calls, unsafe actions.
- Create 30-50 local examples. Include normal cases and edge cases.
- Write a rubric. Keep it short enough that reviewers actually use it.
- Separate components. Evaluate retrieval, generation, and tool use independently.
- Run human review. Sample outputs and calibrate the rubric.
- Add automated checks. Use exact tests where possible and LLM judges where helpful.
- Track cost and latency. A better answer that is too slow or expensive may not be useful.
- Repeat after changes. Treat evaluation as part of development.
The best evaluation is not the fanciest one. It is the one that catches the failures your users would actually care about before those failures reach them.
- You are evaluating an LLM-based research assistant. Write three evaluation examples: one where the correct behavior is to answer, one where it should say "insufficient evidence," and one where it should use a tool instead of generating text.
- A model scores 92% on MMLU but performs poorly on your domain-specific evaluation set. What does this tell you about the relationship between benchmarks and real-world usefulness?
- You use an LLM judge to evaluate summaries. The judge consistently prefers longer, more confident answers. How would you detect this bias, and what would you change?
In the next post, we can look at fine-tuning and adaptation: when prompting is enough, when RAG is enough, and when it makes sense to update model behavior with training data.