LLM evaluation

Introduction to LLM Evaluation

LLM evaluation is crucial for understanding the performance and effectiveness of large language models in various applications. The primary purpose of evaluation is to assess how well these models generate human-like text, comprehend context, and perform specific tasks.

Evaluating LLMs presents several challenges, including the complexity of language, the subjectivity of human judgment, and the need for diverse benchmarks that reflect real-world scenarios. Additionally, the rapid evolution of LLM architectures necessitates continuous updates to evaluation methods.

Despite these challenges, effective evaluation offers significant benefits. It helps researchers and developers identify strengths and weaknesses in models, guides improvements, and ensures that LLMs are reliable and safe for deployment in applications ranging from chatbots to content generation.

Taxonomy of LLM Evaluation

LLM evaluations can be categorised by purpose (what they measure), structure (how tests are administered), and scoring methods.

I. High-Level Benchmark Categories

LLM benchmarks are systematically organised into three primary categories:

General Capabilities Benchmarks

Designed to measure foundational skills inherent to LLMs:

Domain-Specific Benchmarks

Focused on performance within specialised fields:

Target-Specific Benchmarks

Concentrated on risks, reliability, and complex agentic behaviours:

II. Evaluation Paradigms

Evaluation paradigms define how and when assessment data is presented to the model:

III. Core Evaluation Methods and Metrics

These methods determine how model outputs are measured against ground truth.

Evaluation Dimensions

Code generation evaluation typically involves three complementary dimensions:

Outcome Evaluation Techniques

Different evaluation methods apply to various outcome types:

Outcome TypeEvaluation Methods
Information AcquisitionWhole String Matching: Direct comparison with ground truth
(Textual responses)Substring Matching: Checks if response contains ground truth
LLM-as-a-Judge: Uses an LLM (e.g., GPT-4o) to score outputs based on standardised criteria
Code GenerationUnit Testing: Designing test cases for individual functions or classes
Fuzz Testing: Running code against generated inputs to cover data types and edge cases
End-to-end (E2E) Testing: Simulates complete user workflows with repeatability
State ModificationState Matching: Compares final environment state (e.g., database changes) with ground truth
(Environment states)
Multistep ReasoningAnswer Matching: Parses agent output and compares with ground truth
Quality Measure: Customised metrics against baseline when ground truth is difficult to achieve
Ranking/ComparisonRelative Ranking: Compares models relative to each other within an evaluation session

IV. Specialised and Risk-Focused Evaluations

Methods often used in governance or high-stakes scenarios:

Specialised Evaluation Frameworks

Different LLM applications may require specific evaluation approaches:

RAG Evaluation

For Retrieval-Augmented Generation (RAG) systems, the RAGAS framework provides specialised metrics that assess both the quality of retrieved information and the generated responses.

Coding Agent Benchmarks

Evaluating coding agents requires benchmarks that go beyond single-function code generation: the model must navigate a real repository, identify the relevant files, make a sequence of edits, and pass an existing test suite. Two benchmarks have emerged as the standard for this setting.

SWE-bench Verified presents models with real GitHub issues drawn from popular Python repositories. The Verified split (500 problems, typically evaluated on a 200-problem held-out subset) was hand-curated to remove ambiguous or underspecified issues, making pass rate a more reliable signal than earlier versions of the benchmark.

Multi-SWE-bench Flash extends the same format to seven programming languages (Python, Java, TypeScript, JavaScript, Rust, Go, C, C++) with 300 issues, enabling cross-language comparisons that SWE-bench’s Python-only scope cannot provide.

Both benchmarks score agents on pass rate — the fraction of issues for which the agent’s patch causes all existing tests to pass — and treat the full multi-step trajectory (file reads, edits, test runs) as the unit of evaluation rather than a single generation. This makes them sensitive not just to code correctness but to the efficiency and coherence of the agent’s search process (Xiao et al. 2026).

Xiao, Yuan-An, Pengfei Gao, Chao Peng, and Yingfei Xiong. 2026. “Reducing Cost of LLM Agents with Trajectory Reduction.” Proceedings of the ACM on Software Engineering 3 (FSE). https://doi.org/10.1145/3729355.