A model is only as good as the test you gave it.
LLM evaluation is measuring how well a model does your task: a labelled set of real inputs, a scoring rule that matches the task, and a comparison against alternatives. Public benchmarks rank models on general tests and are a shortlist tool, not a verdict. Every page on this site that says measure means this: a held-out set and a number that moves when quality moves.
- Your evaluation
- Labelled set, task score, comparison
- Benchmarks
- Public tests; good for shortlists
- Judges
- An LLM grader, validated against humans
- Also measure
- Latency, cost, refusals, robustness
- 5production AI apps
- 14engineers led
- 200+students mentored
Questions students ask
The evaluation questions searched most, answered from shipping systems with tests.
What is LLM evaluation?
LLM evaluation is the practice of measuring a language model, or a system built on one, against what you need it to do, with numbers that can be compared across models, prompts and versions. It covers capability (does it get the task right), behaviour (does it follow the format, refuse what it should, avoid harmful output), and operations (latency, cost, failure rate). The core artefact is an evaluation set: inputs with expected outputs or grading criteria, kept separate from anything used for training or prompt design, and run the same way every time so the results are comparable.
How to do LLM evaluation
- Define the task as an input-output contract and the failure modes you care about.
- Build an evaluation set from real inputs: a hundred or more, covering normal cases, edge cases and inputs the system should refuse.
- Choose a scoring rule per task: exact match or schema validity for structured outputs, a rubric for free text, recall at k for retrieval, agreement with a reference for summaries.
- Run every candidate (models, prompts, pipeline versions) on the same set with the same settings; record per-item results, not only averages.
- Where grading needs judgement, use an LLM judge with a written rubric, and validate it against human grades on a sample before trusting it.
- Report the numbers with latency and cost, keep the set under version control, and add every production failure to it.
What are LLM benchmarks?
Benchmarks are public evaluation sets with fixed scoring used to compare models: knowledge and reasoning tests (MMLU and its successors), maths (GSM8K, MATH), code (HumanEval, SWE-bench), instruction following (IFEval), long context, multilingual and safety suites, and human-preference arenas where people compare two models' answers blind. Leaderboards aggregate them. They are useful for a first shortlist and for tracking the field, and they have known problems: contamination (test data leaking into training), narrow formats, and weak correlation with any particular real task. Treat a benchmark score as a rumour about your use case, to be checked.
How to benchmark LLM
For public benchmarks, use a standard harness (the EleutherAI evaluation harness, or the provider's own) so your numbers match published ones; run with the same prompts, few-shot settings and scoring. For your own benchmark, which is the one that matters, take your evaluation set, run each model under identical conditions (temperature zero or fixed sampling, same prompt, same maximum tokens), score with the same rule, and compute confidence intervals or at least note that a one-point difference on a hundred items is noise. Blind the grading where humans are involved. Record tokens per second and cost per item alongside accuracy.
What is model evaluation in machine learning?
In machine learning generally, model evaluation is estimating how a trained model will perform on data it has not seen, using a held-out test set and metrics suited to the task: accuracy, precision, recall and F1 for classification; mean squared error for regression; ranking metrics for retrieval. The principles carry straight into language models: never evaluate on training data, pick metrics that reflect the real cost of errors, look at confusion patterns and failure examples rather than only the headline number, and compare against a baseline. What changes with LLMs is that outputs are free text, so scoring often needs rubrics or judges.
What are various model evaluation techniques?
- Held-out test sets with task metrics; cross-validation when data is small.
- Reference-based scoring: exact match, F1 over tokens, BLEU and ROUGE for generation (crude for LLMs), embedding similarity.
- Rubric grading by humans, blind and with agreement checks.
- LLM-as-judge: a model applies a rubric or compares two outputs; calibrated against human grades.
- Pairwise preference and arena-style comparisons for open-ended quality.
- Behavioural tests: format validity, refusal correctness, consistency under paraphrase, robustness to adversarial inputs.
- Online evaluation: A/B tests and user feedback on real traffic, feeding new cases back into the offline set.
What does model evaluation measure in AI?
It measures the gap between what the system does and what it should do, along the dimensions that matter for the use. For an extraction system: field-level accuracy and schema validity. For a RAG assistant: retrieval recall, answer faithfulness, relevance and refusal correctness. For a classifier: precision and recall per class, because the cost of a false positive and a false negative differ. For any product: latency, cost per request and failure rate under load. A good evaluation reports several of these, because a change that improves one often degrades another, and the trade-off should be visible rather than discovered by users.
How to evaluate a model
Start from the decision you need to make: ship or not, model A or B, prompt version one or two. Build the smallest evaluation set that can inform that decision honestly, from real inputs, with grading you can defend. Run the candidates identically. Look at the aggregate numbers, then read the individual failures; the categories of failure tell you what to fix and whether the metric captured what you care about. Check for leakage between the evaluation set and anything used to build the system. Decide, record the result with the exact versions, and keep the set so the next decision starts from the same baseline.
How to evaluate synthetic data
Evaluate it by what it is for. Fidelity: does it resemble real data in length, vocabulary, structure and difficulty; compare distributions and have a person read a random sample. Diversity: measure near-duplicate rates with embeddings; generated data collapses into repeated patterns easily. Correctness: validate labels against a schema or a rule, and spot-check by hand. Utility, the one that matters: train with and without the synthetic slice and compare on a held-out set of real data; if the real-data score does not improve, the synthetic data is not helping, however good it looks. Never let synthetic examples into the held-out set.
How to benchmark vLLM
Benchmarking a serving engine means measuring throughput and latency under load, not accuracy. vLLM ships a benchmark script that sends a stream of requests at a chosen rate with realistic prompt and output lengths and reports requests per second, output tokens per second, time to first token and time per output token, with percentiles. Run it against your own deployment with prompt lengths that match your traffic, sweep the request rate until latency degrades, and record the point where it does; that is your capacity. Compare configurations (quantization, tensor parallelism, maximum sequence length) on the same script. Then confirm with a real client load test through your gateway.
An evaluation set in a day
The smallest thing that supports a real decision.
- 01
A hundred real inputs
From logs or users; include edge cases and ten that should be refused.
- 02
A scoring rule per task
Exact match, schema validity, a rubric, or recall at k. Written down.
- 03
Blind grading sample
Grade fifty by hand; calibrate an LLM judge on them; report agreement.
- 04
One script, one table
Every candidate, same settings; accuracy, latency and cost side by side; in CI.
In the room
Where these systems get explained to students.


Read next
Evaluation in specific settings.
Shipping on vibes instead of numbers?
I build evaluation sets and harnesses that tell you the truth before users do.

