SysArt
Book a briefing
SysArt

Guide

What is LLM evaluation?

LLM evaluation measures whether a language model application gives correct, grounded, safe and affordable results on the tasks you actually run. This guide explains the metrics for chat, retrieval and agents, how to score outputs, which open-source frameworks to use and how to build a test set you can defend.

Last reviewed by SysArt AI Architecture Team11 min readHow we review

In short

LLM evaluation is the systematic testing of a language model, or an application built on one, against tasks, metrics and pass thresholds agreed in advance. It combines programmatic checks, reference answers, LLM-as-a-judge scoring and human review on a versioned test set drawn from real use cases, and runs again before every release and after every change.

DefinitionLLM evaluation is the measurement of a large language model's or an LLM application's outputs against defined criteria, such as correctness, groundedness, relevance, safety, latency and cost, using test cases, metrics and thresholds set before the results are known.

Key takeaways

  • Evaluate the system you will ship, with its prompts, retrieval, tools and guardrails, on tasks from your own use cases: public benchmark scores describe a model, not your application.
  • Choose metrics per task: exact checks for extraction and classification, faithfulness and context metrics for RAG, task success and tool-call correctness for agents, plus safety, latency and cost for all of them.
  • LLM-as-a-judge makes open-ended quality measurable at scale, but judges show position and verbosity biases and vary between runs, so calibrate every judge against human labels.
  • Open-source frameworks such as Inspect, DeepEval, promptfoo and MLflow run on your own infrastructure with a self-hosted judge model, so test data stays under your control.
  • For high-risk AI systems, the EU AI Act requires testing against prior defined metrics and probabilistic thresholds before the system is placed on the market or put into service.

What is LLM evaluation?

LLM evaluation is the systematic measurement of how well a large language model (LLM), or an application built on one, performs the tasks you need, against metrics and pass thresholds you agree before you look at the results. It turns “the answers look good” into evidence you can compare across models, prompts and releases.

It works at two levels:

  • Model evaluation compares models on general capabilities, usually with public benchmarks. It helps you shortlist a model.
  • System evaluation tests your application as users meet it: the model plus your prompts, retrieval, tools, guardrails and data. It tells you whether the application is fit to release.

It also happens at two moments. Offline evaluation runs a fixed test set before a release or a change; online evaluation scores samples of real traffic and user feedback in production. The US National Institute of Standards and Technology (NIST) puts both into its AI Risk Management Framework, which calls this work test, evaluation, verification and validation (TEVV) and states that AI systems should be tested before deployment and regularly while in operation.

Why do LLM applications need systematic evaluation?

Because an LLM application can be fluent and wrong at the same time, and its behaviour changes whenever any part of it changes. Spot-checking a few answers cannot show how often it fails, on which questions, or whether last week’s change made it better or worse.

Four properties make testing harder than for conventional software:

  • Outputs vary. The same question can produce different wording, so exact string comparison rarely works.
  • Errors look plausible. A confident answer with an invented figure or a misread policy passes a casual review.
  • Everything is a dependency. A new model version, a reworded prompt, a re-indexed document store or a changed guardrail can each shift quality.
  • Failures are uneven. An assistant can be excellent on common questions and poor on the rare ones that carry the most risk.

A versioned test set with agreed metrics answers the questions that matter before release: is it accurate enough, safe enough, fast and cheap enough, and better than what we have now?

Which LLM evaluation metrics should you use?

Choose metrics by task, then add the safety and operational measures that apply to every task. A single overall quality score hides exactly the failures you need to see.

TaskWhat to measureExample metrics and checks
Classification, routing, extractionIs the label or field correct?Accuracy, precision and recall per class, exact match, JSON schema validity
Answers with a known referenceIs the answer correct and complete?Match with a gold answer, required facts present, rubric score by an expert or a judge
Retrieval-augmented generation (RAG)Did retrieval find the right passages, and does the answer stick to them?Context precision, context recall, faithfulness, answer relevancy, citation accuracy
AgentsDid the agent reach the goal safely and efficiently?Task success against the end state, tool-call correctness, steps and cost per task, policy violations, consistency across repeated runs
Safety and securityDoes it refuse what it should, and only that?Refusal rate on harmful requests, over-refusal of benign requests, prompt-injection success rate, personal-data leakage
OperationsIs it fast and affordable enough?Time to first token, end-to-end latency, tokens and cost per task, error and timeout rates

Set a threshold for each metric with the business owner before testing, and record why it is appropriate for the use case.

How do you score LLM outputs?

Use the cheapest method that measures a criterion reliably: programmatic checks first, reference comparisons next, an LLM judge for open-ended qualities, and human review to calibrate the judge and to settle the cases that matter most.

  • Programmatic checks. Exact match, regular expressions, JSON schema validation, citation lookups and, for generated code, unit tests. They are fast, cheap and repeatable.
  • Reference-based scoring. Compare the output with a gold answer written by a domain expert, by exact match, by required facts or by meaning. Word-overlap metrics such as BLEU and ROUGE reward shared words rather than correct meaning, so use them with care for open-ended answers.
  • LLM-as-a-judge. A second model scores outputs against a rubric or picks the better of two answers. It scales well and needs careful calibration, as the next section explains.
  • Human review. Domain experts label samples, write reference answers and resolve disagreements. Check how often your reviewers agree with each other before you use their labels to calibrate anything else.

What is LLM-as-a-judge?

LLM-as-a-judge means using a language model to score another model’s output against a rubric, a reference answer or a competing answer. It makes qualities such as helpfulness, tone and completeness measurable at scale, but the judge is itself a model whose errors you have to measure.

The method was popularised by Zheng and colleagues at NeurIPS 2023. Their strongest judge, GPT-4, agreed with human experts’ preferences more than 80% of the time, about as often as the experts agreed with each other. The same study documented biases: judges tended to favour the answer shown first, and GPT-4 gave the same verdict in only 65% of cases when the order of two similar answers was swapped; weaker judges also preferred answers padded with repetition. Later research points the same way. A 2025 study of 11 models across 20 human-annotated datasets concluded that judges must be validated against human judgements before use, and the JudgeBench benchmark found strong judges only slightly better than chance on hard pairs with objectively correct answers.

To use judges responsibly:

  • Write a specific rubric with an example of each score, and ask for the reasoning before the score.
  • Compare pairs in both orders and count a win only if it holds both ways.
  • Give the judge a reference answer where one exists; in the original study, reference-guided judging cut GPT-4’s grading failures on maths questions from 14 of 20 to 3 of 20.
  • Calibrate each judge against a human-labelled sample, repeat runs to measure variance, and recalibrate whenever the judge model changes.
  • Host the judge yourself when test data is confidential. Frameworks such as Inspect, DeepEval, MLflow and promptfoo accept a self-hosted judge model.

Are public LLM benchmarks enough?

No. Benchmarks help you shortlist models, but they measure general skills on fixed public questions, not your application on your questions. NIST’s Generative AI Profile warns that gaps between benchmarks and real-world use are made worse by prompt sensitivity and the variety of contexts in which systems are used, and that good scores on tests designed for humans do not establish validity in that domain.

Three problems recur:

  • Contamination. Benchmark questions and solutions leak into training data. In February 2026 OpenAI stopped reporting SWE-bench Verified, a coding benchmark, after finding that every frontier model it tested could reproduce solutions or task details for some items and that many hard tasks had flawed tests. It now recommends SWE-bench Pro.
  • Saturation. When top models score near the ceiling, differences stop meaning much. Harder sets such as MMLU-Pro, GPQA Diamond and Humanity’s Last Exam were created for this reason, and they will saturate in turn.
  • Errors. Benchmarks contain mistakes: one study estimated that 6.49% of the questions in MMLU, a widely used knowledge benchmark, contain errors.

Use benchmarks, and quick runs with a tool such as EleutherAI’s lm-evaluation-harness, to narrow the field and to check that a quantised model still performs; then decide on your own test set. Our comparison of the best open-weight LLMs in 2026 follows that approach.

How do you evaluate RAG systems and AI agents?

Evaluate the parts and the whole: for retrieval-augmented generation, retrieval and generation separately; for agents, the final outcome and the path taken to reach it.

RAG. The documentation of Ragas, the library that popularised these metrics, defines four of them:

  • Context precision: whether the retriever ranks relevant passages above irrelevant ones.
  • Context recall: how much of the information needed was retrieved; it needs a reference answer to compare against.
  • Faithfulness: whether every claim in the answer is supported by the retrieved context.
  • Answer relevancy: whether the answer addresses the question, without judging whether it is correct.

Add correctness against expert reference answers and a check that citations point to passages that really support the claim, because a faithful answer built on the wrong passage is still wrong. Our article on on-premises RAG evaluation covers ground-truth sets and regression tests in depth.

Agents. Score the outcome first. τ-bench, a benchmark for customer-service agents, compares the state of a database at the end of a conversation with the expected goal state, so no judge has to interpret the dialogue. Then score the trajectory: whether the agent chose the right tools with the right arguments, how many steps and how much cost it took, and whether it broke a policy on the way. Measure consistency too: τ-bench’s pass^k metric counts a task as solved only if all k attempts succeed, and its authors reported in 2024 that a leading agent solved fewer than half the tasks, with far lower consistency across repeated attempts.

Review transcripts as well as scores. NIST researchers found models cheating on agent evaluations, for example by looking up published solutions or commenting out the test assertions that should have failed. Run agent evaluations in a sandbox with the same tools and permissions as production; our guide to AI agent security covers that isolation.

Which LLM evaluation frameworks can you use?

Most widely used frameworks are open source and run on your own infrastructure. We checked each project’s repository and documentation on 4 November 2026.

  • Inspect (UK AI Security Institute, MIT licence): evaluations for dialogue, tool use and agents, a catalogue of more than 200 ready-made evaluations, sandboxed tool execution and support for local model providers such as vLLM, Ollama and SGLang.
  • DeepEval (Confident AI, Apache 2.0): pytest-style unit tests for LLM applications with RAG, conversation and agent metrics; any model served by Ollama can act as the judge.
  • promptfoo (MIT, now part of OpenAI): a command-line tool for comparing prompts and models and for red-teaming. By default it chooses a judge from the cloud credentials it finds, so point it at your self-hosted judge explicitly.
  • MLflow (Apache 2.0): GenAI evaluation with built-in and custom LLM judges on a self-hosted server. Outside Databricks its default judge is an OpenAI model unless you configure a local one.
  • Langfuse (MIT core, part of ClickHouse since January 2026) and Arize Phoenix (Elastic License 2.0): self-hostable tracing platforms that score production traces with judges, code checks and human labels.
  • EleutherAI lm-evaluation-harness (MIT): runs public benchmarks against local models.
  • Ragas (Apache 2.0): the reference implementation of the RAG metrics above. It has had no release since January 2026, and an April 2026 security advisory lists no patched version, so check its status before you depend on it.

OpenAI’s open-source Evals framework needs an OpenAI API key, so it does not suit a fully self-hosted set-up.

How do you build an LLM evaluation set?

Start from the questions and tasks your users actually bring, write down what a correct result looks like, and keep the set under version control like code.

  1. Collect real cases. Take questions and tasks from pilots, support tickets and process documents, with personal data removed or protected.
  2. Cover the distribution. Include common cases, rare but important ones, ambiguous and out-of-scope requests, and adversarial inputs such as prompt injection attempts.
  3. Write acceptance criteria. For each case, record a reference answer, the facts it must contain or the action an agent must take, written or approved by a domain expert.
  4. Keep a held-out part. Tune prompts and retrieval on one part of the set and report results on another, so that you do not overfit to the test.
  5. Version and grow it. Record which version of the set produced each result, add every production failure as a new case and retire cases that no longer reflect the process.

When should you run LLM evaluations?

Before every release, after every change to the model, prompts, retrieval or guardrails, and continuously on a sample of production traffic.

  • Release gates. Block a release when a metric falls below its threshold or regresses against the current version.
  • Change control. Treat a model upgrade, a new quantisation, a prompt edit or a re-indexed document store as a change that reruns the suite.
  • Production monitoring. Score sampled conversations, track user feedback and escalations, and alert on drift in quality, refusals, latency or cost. OpenTelemetry’s conventions for generative AI define an evaluation result event, still in development status, so that scores can be attached to the traces they belong to.

Our article on automated model evaluation pipelines shows how to stage these runs and wire them into deployment, and our guide to AI guardrails explains how to test the controls that sit around the model.

What does the EU AI Act require from evaluation?

For high-risk AI systems, documented testing against metrics set in advance. Article 9 requires providers to test high-risk systems to find the most appropriate risk-management measures and to ensure that they perform consistently for their intended purpose. Testing may take place throughout development and must in any event happen before the system is placed on the market or put into service, “against prior defined metrics and probabilistic thresholds” appropriate to that purpose.

Article 15 requires an appropriate level of accuracy, robustness and cybersecurity throughout the lifecycle, and the accuracy levels and metrics must be declared in the instructions for use. Under the dates set by Regulation (EU) 2026/1744, these obligations apply from 2 December 2027 for Annex III systems and from 2 August 2028 for Annex I systems. Providers of general-purpose AI models with systemic risk must already evaluate their models with state-of-the-art protocols, including documented adversarial testing (Article 55), and the General-Purpose AI Code of Practice describes how.

Outside the AI Act, the NIST framework asks for documented TEVV processes, and ISO/IEC 42001 includes a performance evaluation clause in its management-system structure. Whether a given application is high-risk depends on its use case and your role; see our guide to high-risk AI systems. This guide is not legal advice.

How SysArt evaluates LLM applications

We agree metrics, thresholds and acceptance criteria with the people who own each use case, build the first test set with their domain experts, and set up the evaluation framework and a self-hosted judge model on your infrastructure. We then wire the suite into release and change control, add production monitoring, and keep the results as evidence for your risk, compliance and audit teams. Read more about how we take use cases to production in our AI implementation work and how we build enterprise RAG.

Frequently asked questions

What is LLM evaluation?

LLM evaluation is the systematic testing of a large language model, or an application built on one, against tasks, metrics and pass thresholds agreed in advance. It uses programmatic checks, reference answers, LLM judges and human review on a versioned test set drawn from real use cases, and it runs before every release, after every change and on samples of production traffic.

What are the most important LLM evaluation metrics?

It depends on the task. Use accuracy, exact match and schema validity for classification and extraction; correctness against reference answers for open questions; context precision, context recall, faithfulness and answer relevancy for retrieval-augmented generation; and task success and tool-call correctness for agents. Add safety metrics, such as refusal and prompt-injection success rates, and operational ones: latency, tokens and cost per task.

What is LLM-as-a-judge?

It is the use of a language model to score another model's output against a rubric, a reference answer or a competing answer. In the 2023 study that popularised the method, strong judges agreed with human experts more than 80% of the time but favoured the answer shown first. Calibrate each judge against human labels, compare answers in both orders and host the judge yourself when data is confidential.

Are LLM benchmarks enough to choose a model?

No. Public benchmarks such as MMLU-Pro, GPQA Diamond and Humanity's Last Exam help you shortlist models, but they test general skills on public questions and can leak into training data: in February 2026 OpenAI stopped reporting SWE-bench Verified partly for that reason. NIST also warns that benchmark results may not carry over to real use. Decide with a test set built from your own tasks.

Which open-source LLM evaluation frameworks are there?

Widely used options include Inspect from the UK AI Security Institute, DeepEval, promptfoo, MLflow's GenAI evaluation, Langfuse, Arize Phoenix, Ragas for RAG metrics and EleutherAI's lm-evaluation-harness for benchmarks. Most can run on your own infrastructure with a self-hosted judge model. Check licences and maintenance before you commit: Phoenix uses the Elastic License 2.0, and Ragas has had no release since January 2026.

How do you evaluate a RAG system?

Evaluate retrieval and generation separately, then together. For retrieval, measure context precision, whether relevant passages rank first, and context recall, whether everything needed was found. For generation, measure faithfulness, whether every claim is supported by the retrieved passages, and answer relevancy. Add correctness against expert reference answers and citation checks, using questions drawn from your own documents and users.

How do you evaluate an AI agent?

Score the outcome first, for example whether the end state of a system matches the goal, then the path: the right tools with the right arguments, the number of steps, the cost and any policy violations. Repeat each task several times, because agents are inconsistent, and treat a task as reliable only if every attempt succeeds. Run evaluations in a sandbox and review transcripts, since models can game automated graders.

Does the EU AI Act require LLM evaluation?

For high-risk AI systems, yes. Article 9 requires testing against prior defined metrics and probabilistic thresholds before the system is placed on the market or put into service, and Article 15 requires accuracy levels and metrics to be declared in the instructions for use. These duties apply from 2 December 2027 for Annex III systems and 2 August 2028 for Annex I systems. This is not legal advice.

Sources

  1. NIST AI 100-1: Artificial Intelligence Risk Management Framework (AI RMF 1.0), section 5.3 Measure (January 2023) · checked 4 November 2026
  2. NIST AI 600-1: Artificial Intelligence Risk Management Framework, Generative AI Profile (July 2024) · checked 4 November 2026
  3. Zheng et al.: Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, NeurIPS 2023 Datasets and Benchmarks (arXiv:2306.05685) · checked 4 November 2026
  4. Bavaresco et al.: LLMs instead of Human Judges? A Large Scale Empirical Study across 20 NLP Evaluation Tasks, ACL 2025 (arXiv:2406.18403) · checked 4 November 2026
  5. Tan et al.: JudgeBench, a benchmark for evaluating LLM-based judges, ICLR 2025 (arXiv:2410.12784) · checked 4 November 2026
  6. Es et al.: Ragas, Automated Evaluation of Retrieval Augmented Generation, EACL 2024 System Demonstrations (arXiv:2309.15217) · checked 4 November 2026
  7. Ragas documentation: faithfulness, response relevancy, context precision and context recall metrics · checked 4 November 2026
  8. GitHub security advisory GHSA-95ww-475f-pr4f: Ragas SSRF in versions 0.2.3 to 0.4.3 (April 2026) · checked 4 November 2026
  9. UK AI Security Institute: Inspect, framework for large language model evaluations (repository and documentation, release 0.3.287, 31 October 2026) · checked 4 November 2026
  10. Confident AI: DeepEval, open-source LLM evaluation framework (repository, Apache 2.0) · checked 4 November 2026
  11. promptfoo: CLI and library for evaluating and red-teaming LLM apps (repository, MIT) · checked 4 November 2026
  12. MLflow documentation: evaluating and monitoring GenAI applications · checked 4 November 2026
  13. Langfuse handbook: open source, licensing of self-hosted features · checked 4 November 2026
  14. Arize Phoenix: repository and Elastic License 2.0 · checked 4 November 2026
  15. EleutherAI: lm-evaluation-harness (repository, MIT, release v0.4.13, August 2026) · checked 4 November 2026
  16. OpenAI: Why we no longer evaluate SWE-bench Verified (23 February 2026) · checked 4 November 2026
  17. Gema et al.: Are We Done with MMLU? (arXiv:2406.04127) · checked 4 November 2026
  18. Yao et al.: τ-bench, a benchmark for tool-agent-user interaction in real-world domains (arXiv:2406.12045) · checked 4 November 2026
  19. NIST research blog: Cheating on AI agent evaluations (2 December 2025) · checked 4 November 2026
  20. OpenTelemetry semantic conventions for generative AI: events, including gen_ai.evaluation.result (status: development) · checked 4 November 2026
  21. AI Act Service Desk: Article 9, risk management system (consolidated text as at 27 July 2026) · checked 4 November 2026
  22. AI Act Service Desk: Article 15, accuracy, robustness and cybersecurity · checked 4 November 2026
  23. AI Act Service Desk: Article 55, obligations for providers of general-purpose AI models with systemic risk · checked 4 November 2026
  24. AI Act Service Desk: Article 113, entry into force and application, as amended by Regulation (EU) 2026/1744 · checked 4 November 2026
  25. European Commission: The General-Purpose AI Code of Practice (published 10 July 2025) · checked 4 November 2026

Set up evaluation for one LLM application

Bring one assistant, RAG system or agent and the decisions it supports. We agree metrics and thresholds with its owners, build the first test set and run a baseline on your infrastructure.