{
  "id": "llm-evaluation",
  "module": "evaluation",
  "level": 2,
  "minutes": 20,
  "audiences": [
    "beginner",
    "developer",
    "researcher"
  ],
  "software": [],
  "text": {
    "en": {
      "title": "How to Evaluate LLMs: Benchmarks, Arenas, Agent Tests and Data Contamination",
      "description": "What popular AI benchmarks such as MMLU, GPQA, HumanEval, SWE-bench and OSWorld actually measure, how Chatbot Arena rankings work, why scores mislead (contamination, saturation, Goodhart's law), and how to evaluate models for your own use.",
      "updated": "2026-10-10",
      "takeaways": [
        "A benchmark is a fixed set of tasks plus a scoring rule; it measures only what its tasks cover, under its own conditions.",
        "Knowledge/reasoning tests (MMLU, GPQA), coding tests (HumanEval, SWE-bench), agent tests (OSWorld) and human-preference arenas answer different questions.",
        "Scores can mislead through data contamination, benchmark saturation, different prompting/scaffolding and optimising for the leaderboard itself.",
        "For real decisions, build a small evaluation set from your own tasks and check it with clear criteria — automated where possible, human where it matters."
      ],
      "faq": [
        {
          "q": "What is the best LLM benchmark?",
          "a": "There is none for all purposes. Use benchmarks that resemble your task: SWE-bench Verified for coding agents, OSWorld for computer use, GPQA or Humanity's Last Exam for expert knowledge, and arena-style preference rankings for general chat quality — then test on your own data."
        },
        {
          "q": "What is benchmark contamination?",
          "a": "When test questions (or their answers) appear in a model's training data, so a high score may reflect memorisation rather than ability. Because web-scale training data is hard to audit, newer benchmarks use fresh, private or regularly refreshed questions."
        },
        {
          "q": "How does Chatbot Arena rank models?",
          "a": "Users chat with two anonymous models side by side and vote for the better answer; a statistical model (Bradley–Terry, similar to chess Elo) turns millions of pairwise votes into a ranking with confidence intervals."
        },
        {
          "q": "Can an LLM judge another LLM's answers?",
          "a": "Yes, “LLM-as-a-judge” is widely used and agrees with humans reasonably often, but judges have biases (answer position, length, their own style). Validate a judge against human labels before trusting it."
        }
      ],
      "sources": [
        {
          "title": "Hendrycks et al. (2020), Measuring Massive Multitask Language Understanding (MMLU)",
          "url": "https://arxiv.org/abs/2009.03300"
        },
        {
          "title": "Rein et al. (2023), GPQA: A Graduate-Level Google-Proof Q&A Benchmark",
          "url": "https://arxiv.org/abs/2311.12022"
        },
        {
          "title": "Chen et al. (2021), Evaluating Large Language Models Trained on Code (HumanEval)",
          "url": "https://arxiv.org/abs/2107.03374"
        },
        {
          "title": "Jimenez et al. (2023), SWE-bench",
          "url": "https://arxiv.org/abs/2310.06770"
        },
        {
          "title": "OpenAI (2024), Introducing SWE-bench Verified",
          "url": "https://openai.com/index/introducing-swe-bench-verified/"
        },
        {
          "title": "Xie et al. (2024), OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments",
          "url": "https://arxiv.org/abs/2404.07972"
        },
        {
          "title": "Chiang et al. (2024), Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference",
          "url": "https://arxiv.org/abs/2403.04132"
        },
        {
          "title": "Zheng et al. (2023), Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena",
          "url": "https://arxiv.org/abs/2306.05685"
        },
        {
          "title": "Liang et al. (2022), Holistic Evaluation of Language Models (HELM)",
          "url": "https://arxiv.org/abs/2211.09110"
        },
        {
          "title": "Phan et al. (2025), Humanity's Last Exam",
          "url": "https://arxiv.org/abs/2501.14249"
        },
        {
          "title": "Singh et al. (2025), The Leaderboard Illusion",
          "url": "https://arxiv.org/abs/2504.20879"
        }
      ],
      "url": "https://aimap.page/en/learn/evaluation/llm-evaluation/",
      "markdown": "## What a benchmark is — and isn't\n\nA **benchmark** is a fixed set of tasks with a scoring rule: multiple-choice accuracy, unit tests passed, tasks completed. It tells you how a model (or a model plus its scaffolding) performs **on those tasks under those conditions** — nothing more. Reading leaderboards well means knowing what each benchmark contains.\n\n## The main families\n\n| Family | Examples | What it measures | Watch out for |\n|---|---|---|---|\n| Knowledge & reasoning | **MMLU** (57 subjects, multiple choice), **GPQA** (graduate-level \"Google-proof\" science), **Humanity's Last Exam** | Breadth and depth of knowledge, exam-style reasoning | Saturation (top models near ceiling on MMLU), contamination |\n| Maths | GSM8K, MATH, competition sets (AIME) | Multi-step quantitative reasoning | Leaked problems; answer-only scoring |\n| Coding | **HumanEval** (164 Python functions), **SWE-bench** (real GitHub issues, judged by the repo's tests) | Writing correct code; fixing real repositories | Different agent scaffolds give very different scores |\n| Agents & computer use | **OSWorld** (369 real desktop tasks), τ-bench, WebArena | Completing multi-step tasks in real software environments | Environment setup, time limits, flaky tasks |\n| Human preference | **Chatbot Arena / LMArena** | Which answer people prefer in open chat | Style and length bias; selective testing |\n| Holistic suites | **HELM** | Many scenarios and metrics (accuracy, calibration, robustness, bias) | Breadth over depth |\n\nSome useful anchors from the original papers: SWE-bench contains 2,294 issue–fix pairs from 12 popular Python repositories ([Jimenez et al., 2023](https://arxiv.org/abs/2310.06770)); because some tasks were ambiguous or untestable, OpenAI and the authors released **SWE-bench Verified**, 500 tasks checked by human developers ([OpenAI, 2024](https://openai.com/index/introducing-swe-bench-verified/)). When OSWorld was published, humans completed 72.36% of its tasks while the best model completed 12.24% ([Xie et al., 2024](https://arxiv.org/abs/2404.07972)) — agent benchmarks expose how far models are from reliable computer use.\n\n## How arenas work\n\nIn **Chatbot Arena** ([Chiang et al., 2024](https://arxiv.org/abs/2403.04132)) a user sends a prompt to two anonymous models and votes for the better answer. A Bradley–Terry model (the statistics behind Elo ratings) converts many pairwise votes into scores with confidence intervals. Arenas capture real user preferences on open-ended prompts, but preferences reward style, formatting and length, and analyses such as *The Leaderboard Illusion* ([Singh et al., 2025](https://arxiv.org/abs/2504.20879)) argue that private pre-release testing and unequal sampling can distort rankings.\n\n## Why scores mislead\n\n- **Contamination** – test items leak into web-scale training data, inflating scores through memorisation.\n- **Saturation** – once top models score near 90%+, a benchmark stops separating them; new, harder sets appear (GPQA, [Humanity's Last Exam](https://arxiv.org/abs/2501.14249)).\n- **Setup differences** – prompting, number of attempts (pass@1 vs pass@k), tool access and agent scaffolding can change results by many points. Compare like with like.\n- **Goodhart's law** – \"when a measure becomes a target, it ceases to be a good measure.\" Optimising for a leaderboard can produce models that are better at the benchmark than at the job.\n- **Model vs system** – agent benchmarks score the whole system: model, tools, prompts, retries and environment ([How AI Agents Work](/learn/how-agents-work)).\n\n```mermaid\nflowchart LR\n  Q[\"Your question: which model/system for my task?\"] --> P[\"Public benchmarks: shortlist candidates\"]\n  P --> O[\"Own eval set: 30–200 real tasks with clear pass criteria\"]\n  O --> A[\"Automatic checks (tests, exact match, schema)\"]\n  O --> J[\"LLM-as-judge, validated on human labels\"]\n  O --> H[\"Human review for high-stakes cases\"]\n  A & J & H --> D[\"Decision + regression suite for future updates\"]\n```\n\n## Evaluating for your own use\n\n1. **Shortlist** with public benchmarks that resemble your task.\n2. **Collect real examples** of the task (30–200 is a good start) and write down what a correct result is.\n3. **Score automatically** wherever possible: unit tests, exact match, JSON-schema validation, retrieval recall ([RAG](/learn/what-is-rag)).\n4. **Use LLM-as-a-judge** for open-ended outputs, but measure its agreement with human labels first; judges show position and verbosity biases ([Zheng et al., 2023](https://arxiv.org/abs/2306.05685)).\n5. **Keep it as a regression suite**: re-run whenever you change the model, prompt or tools.\n\nMore hands-on detail is planned in [Building Evals for Your Own AI App](/learn/build-evals) and [Evaluating Agents](/learn/agent-evaluation) (in progress)."
    },
    "zh-hans": {
      "title": "怎样评测大模型：基准测试、竞技场、Agent 测试与数据污染",
      "description": "MMLU、GPQA、HumanEval、SWE-bench、OSWorld 等常见 AI 基准到底在测什么，Chatbot Arena 排名怎么来的，分数为什么会误导（数据污染、饱和、古德哈特定律），以及怎样为自己的场景评测模型。",
      "updated": "2026-10-10",
      "takeaways": [
        "基准就是一组固定任务加一条打分规则；它只能衡量自己覆盖的任务，而且是在它自己的条件下。",
        "知识推理测试（MMLU、GPQA）、编程测试（HumanEval、SWE-bench）、Agent 测试（OSWorld）和人类偏好竞技场，回答的是不同的问题。",
        "数据污染、基准饱和、提示与 Agent 框架的差异，以及为排行榜而优化，都会让分数失真。",
        "真正做决策时，要用自己的任务建一个小评测集，定好明确标准：能自动判的自动判，关键的地方交给人。"
      ],
      "faq": [
        {
          "q": "哪个大模型基准最好？",
          "a": "没有适用于所有场景的基准。选和你的任务相近的：编程 Agent 看 SWE-bench Verified，电脑操作看 OSWorld，专业知识看 GPQA 或 Humanity's Last Exam，通用聊天质量看竞技场式的偏好排名，然后用你自己的数据再测一遍。"
        },
        {
          "q": "什么是基准数据污染？",
          "a": "测试题（或答案）出现在了模型的训练数据里，高分可能来自背题而不是能力。由于网络规模的训练数据很难审计，新的基准会使用新出的、私有的或定期更换的题目。"
        },
        {
          "q": "Chatbot Arena 是怎么给模型排名的？",
          "a": "用户同时和两个匿名模型对话，投票选出更好的回答；再用统计模型（Bradley–Terry，类似国际象棋的 Elo 等级分）把海量两两对比的投票换算成带置信区间的排名。"
        },
        {
          "q": "能让一个大模型给另一个大模型打分吗？",
          "a": "可以，“大模型当裁判”用得很广，和人的判断也有相当高的一致性，但裁判有偏差（答案位置、长度、偏爱自己的风格）。正式使用前，先用人工标注校验裁判。"
        }
      ],
      "sources": [
        {
          "title": "Hendrycks 等（2020），Measuring Massive Multitask Language Understanding（MMLU）",
          "url": "https://arxiv.org/abs/2009.03300"
        },
        {
          "title": "Rein 等（2023），GPQA: A Graduate-Level Google-Proof Q&A Benchmark",
          "url": "https://arxiv.org/abs/2311.12022"
        },
        {
          "title": "Chen 等（2021），Evaluating Large Language Models Trained on Code（HumanEval）",
          "url": "https://arxiv.org/abs/2107.03374"
        },
        {
          "title": "Jimenez 等（2023），SWE-bench",
          "url": "https://arxiv.org/abs/2310.06770"
        },
        {
          "title": "OpenAI（2024），Introducing SWE-bench Verified",
          "url": "https://openai.com/index/introducing-swe-bench-verified/"
        },
        {
          "title": "Xie 等（2024），OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments",
          "url": "https://arxiv.org/abs/2404.07972"
        },
        {
          "title": "Chiang 等（2024），Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference",
          "url": "https://arxiv.org/abs/2403.04132"
        },
        {
          "title": "Zheng 等（2023），Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena",
          "url": "https://arxiv.org/abs/2306.05685"
        },
        {
          "title": "Liang 等（2022），Holistic Evaluation of Language Models（HELM）",
          "url": "https://arxiv.org/abs/2211.09110"
        },
        {
          "title": "Phan 等（2025），Humanity's Last Exam",
          "url": "https://arxiv.org/abs/2501.14249"
        },
        {
          "title": "Singh 等（2025），The Leaderboard Illusion",
          "url": "https://arxiv.org/abs/2504.20879"
        }
      ],
      "url": "https://aimap.page/zh-hans/learn/evaluation/llm-evaluation/",
      "markdown": "## 基准是什么，不是什么\n\n**基准（benchmark）**就是一组固定任务加一条打分规则：选择题正确率、通过的单元测试数、完成的任务数。它告诉你一个模型（或者模型加上它的外围框架）**在这些任务、这些条件下**表现如何，仅此而已。要读懂排行榜，先得知道每个基准里装的是什么。\n\n## 主要类别\n\n| 类别 | 例子 | 测什么 | 要注意 |\n|---|---|---|---|\n| 知识与推理 | **MMLU**（57 个学科的选择题）、**GPQA**（研究生水平、“谷歌搜不到答案”的科学题）、**Humanity's Last Exam** | 知识广度和深度、考试式推理 | 饱和（顶级模型在 MMLU 上接近满分）、数据污染 |\n| 数学 | GSM8K、MATH、竞赛题（AIME） | 多步定量推理 | 题目泄露；只看最终答案 |\n| 编程 | **HumanEval**（164 道 Python 函数题）、**SWE-bench**（真实 GitHub issue，用仓库自带测试判定） | 写出正确代码；修复真实仓库 | 不同 Agent 框架得分差异很大 |\n| Agent 与电脑操作 | **OSWorld**（369 个真实桌面任务）、τ-bench、WebArena | 在真实软件环境里完成多步任务 | 环境搭建、时间限制、不稳定的任务 |\n| 人类偏好 | **Chatbot Arena / LMArena** | 开放式对话中人们更喜欢哪个回答 | 风格和长度偏好；选择性测试 |\n| 综合评测 | **HELM** | 多场景、多指标（准确率、校准、鲁棒性、偏见） | 重广度轻深度 |\n\n几个来自原始论文的参照点：SWE-bench 包含来自 12 个热门 Python 仓库的 2,294 个“issue—修复”任务（[Jimenez 等，2023](https://arxiv.org/abs/2310.06770)）；由于部分任务描述含糊或无法测试，OpenAI 与作者团队发布了由人类开发者逐一核验的 500 题 **SWE-bench Verified**（[OpenAI，2024](https://openai.com/index/introducing-swe-bench-verified/)）。OSWorld 发表时，人类能完成 72.36% 的任务，最好的模型只完成了 12.24%（[Xie 等，2024](https://arxiv.org/abs/2404.07972)）。Agent 基准清楚地显示出，模型离可靠地操作电脑还有多远。\n\n## 竞技场怎么排名\n\n在 **Chatbot Arena**（[Chiang 等，2024](https://arxiv.org/abs/2403.04132)）里，用户把一个提示同时发给两个匿名模型，再投票选出更好的回答。Bradley–Terry 模型（Elo 等级分背后的统计方法）把大量两两对比的投票换算成带置信区间的分数。竞技场能反映真实用户在开放问题上的偏好，但偏好也会奖励风格、排版和长度；*The Leaderboard Illusion*（[Singh 等，2025](https://arxiv.org/abs/2504.20879)）等分析认为，发布前的私下测试和不均衡的抽样会扭曲排名。\n\n## 分数为什么会误导\n\n- **数据污染**：测试题混进了网络规模的训练数据，背题让分数虚高。\n- **饱和**：顶级模型都考到 90% 以上之后，基准就分不出高下了，于是出现了更难的新题集（GPQA、[Humanity's Last Exam](https://arxiv.org/abs/2501.14249)）。\n- **设置差异**：提示方式、尝试次数（pass@1 还是 pass@k）、能否用工具、Agent 框架不同，结果可能相差很多分。要同条件比较。\n- **古德哈特定律**：“一个指标一旦成为目标，就不再是好指标。”为排行榜优化，可能得到更会考试、却不更会干活的模型。\n- **模型还是系统**：Agent 基准评的是整个系统：模型、工具、提示、重试和环境（见 [AI Agent 工作原理](/learn/how-agents-work)）。\n\n```mermaid\nflowchart LR\n  Q[\"你的问题：我的任务该用哪个模型 / 系统？\"] --> P[\"公开基准：初步筛选\"]\n  P --> O[\"自建评测集：30–200 个真实任务，标准明确\"]\n  O --> A[\"自动检查（测试、精确匹配、Schema 校验）\"]\n  O --> J[\"大模型当裁判（先用人工标注校验）\"]\n  O --> H[\"高风险场景人工复核\"]\n  A & J & H --> D[\"做出决策，并保留为回归测试集\"]\n```\n\n## 为自己的场景做评测\n\n1. 用和任务相近的公开基准**初步筛选**。\n2. **收集真实示例**（30 到 200 个是不错的起点），写下什么样的结果算正确。\n3. 能**自动打分**的尽量自动：单元测试、精确匹配、JSON Schema 校验、检索召回率（见 [RAG](/learn/what-is-rag)）。\n4. 开放式输出可以用**大模型当裁判**，但要先测它和人工标注的一致性；裁判存在位置偏差和偏爱长回答的偏差（[Zheng 等，2023](https://arxiv.org/abs/2306.05685)）。\n5. **保留为回归测试集**：每次更换模型、提示或工具，都重新跑一遍。\n\n更多实操内容见 [为自己的 AI 应用搭建评测](/learn/build-evals) 和 [Agent 评估](/learn/agent-evaluation)（编写中）。"
    }
  }
}