{
  "source_file": "0930",
  "source_platform": "Substack",
  "author": "Andrew Ng / The Batch / DeepLearning.AI",
  "title_listed": "We Need Better Evals for LLM Applications",
  "keywords": "LLM评估,评测基准,应用评测,自由文本",
  "domain": "机器学习",
  "content_type": "技术评论",
  "is_paid_flag": "否",
  "url": "https://www.deeplearning.ai/the-batch/we-need-better-evals-for-llm-applications/",
  "publish_date": "2024-06",
  "corpus_stage": "RLHF",
  "notes": "LLM应用评估现状与改进方向",
  "id": "dce0b6cffe85",
  "collected_at": "2026-10-01T19:55:33",
  "title": "We Need Better Evals for LLM Applications",
  "body_markdown": "We Need Better Evals for LLM Applications\nIt’s hard to evaluate AI applications built on large language models. Better evals would accelerate progress.\nLetters\nTechnical Insights\nPublished\nMay 29, 2024\nReading time\n3\nmin read\nShare\nDear friends,\nA barrier to faster progress in generative AI is evaluations (evals), particularly of custom AI applications that generate free-form text. Let’s say you have a multi-agent research system that includes a researcher agent and a writer agent. Would adding a fact-checking agent improve the results? If we can’t efficiently evaluate the impact of such changes, it’s hard to know which changes to keep.\nFor evaluating general-purpose foundation models such as large language models (LLMs) — which are trained to respond to a large variety of prompts — we have standardized tests like MMLU (multiple-choice questions that cover 57 disciplines like math, philosophy, and medicine) and HumanEval (testing code generation). We also have the\nLMSYS Chatbot Arena\n, which pits two LLMs’ responses against each other and asks humans to judge which response is superior, and large-scale benchmarking like\nHELM\n. These evaluation tools took considerable effort to build, and they are invaluable for giving LLM users a sense of different models’ relative performance. Nonetheless, they have limitations. For example, leakage of benchmarks datasets’ questions and answers into training data is a constant worry, and human preferences for certain answers does not mean those answers are more accurate.\nIn contrast, our current options for evaluating applications built using LLMs are far more limited. Here, I see two major types of applications.\nFor applications designed to deliver unambiguous, right-or-wrong responses, we have reasonable options. Let’s say we want an LLM to read a resume and extract the candidate’s most recent job title, or read a customer email and route it to the right department. We can create a test set that comprises ground-truth labeled examples with the right responses and measure the percentage of times the LLM generates the right output. The main bottleneck is creating the labeled test set, which is expensive but surmountable.\nBut many LLM-based applications generate free-text output with no single right response. For example, if we ask an LLM to summarize customer emails, there’s a multitude of possible good (and bad) responses. The same holds for an agentic system to do web research and write an article about a topic, or a RAG system for answering questions. It’s impractical to hire an army of human experts to read the LLM’s outputs every time we tweak the algorithm and evaluate if the answers have improved; we need an automated way to test the outputs. Thus, many teams use an advanced language model to evaluate outputs. In the customer email summarization example, we might design an evaluation rubric (scoring criteria) for what makes a good summary. Given an email summary generated by our system, we might prompt an advanced LLM to read it and score it according to our rubric. I’ve found that the results of such a procedure, while better than nothing, can also be noisy — sometimes too noisy to reliably tell me if the way I’ve tweaked an algorithm is good or bad.\nThe cost of running evals poses an additional challenge. Let’s say you’re using an LLM that costs $10 per million input tokens, and a typical query has 1000 tokens. Each user query therefore costs only $0.01. However, if you iteratively work to improve your algorithm based on 1000 test examples, and if in a single day you evaluate 20 ideas, then your cost will be 20*1000*0.01 = $200. For many projects I’ve worked on, the development costs were fairly negligible until we started doing evals, whereupon the costs suddenly increased. (If the product turned out to be successful, then costs increased even more at deployment, but that was something we were happy to see!)\nBeyond the dollar cost, evals have a significant time cost. Running evals on 1000 examples might take tens of minutes or even hours. Time spent waiting for eval jobs to finish also slows down the speed with which we can experiment and iterate over new ideas. In an earlier letter, I\nwrote\nthat fast, inexpensive token generation is critical for agentic workflows. It will also be useful for evals, which involve nested for-loops that iterate over a test set and different model/hyperparameter/prompt choices and therefore consume large numbers of tokens.\nDespite the limitations of today’s eval methodologies, I’m optimistic that our community will invent better techniques (maybe involving agentic workflows like\nreflection\nfor getting LLMs to evaluate such output.\nIf you’re a developer or researcher and have ideas along these lines, I hope you’ll keep working on them and consider open sourcing or publishing your findings.\nKeep learning!\nAndrew",
  "metadata": {
    "title": "We Need Better Evals for LLM Applications",
    "description": "A barrier to faster progress in generative AI is evaluations (evals), particularly of custom AI applications that generate free-form text...",
    "keywords": null,
    "author": "Analytics DeepLearning.AI",
    "og:title": "We Need Better Evals for LLM Applications",
    "og:description": "A barrier to faster progress in generative AI is evaluations (evals), particularly of custom AI applications that generate free-form text...",
    "og:url": "https://www.deeplearning.ai/the-batch/we-need-better-evals-for-llm-applications",
    "og:site_name": "DeepLearning.AI",
    "og:image": "https://charonhub.deeplearning.ai/content/images/2024/05/unnamed--61--2.jpg",
    "og:type": "article",
    "twitter:card": "summary_large_image",
    "twitter:site": "@deeplearningai_",
    "twitter:creator": "@deeplearningai_",
    "twitter:title": "We Need Better Evals for LLM Applications",
    "twitter:description": "A barrier to faster progress in generative AI is evaluations (evals), particularly of custom AI applications that generate free-form text...",
    "twitter:image": "https://charonhub.deeplearning.ai/content/images/2024/05/unnamed--61--2.jpg",
    "article:published_time": "2024-05-29T13:40:51.000-07:00",
    "article:modified_time": "2024-05-29T13:40:51.000-07:00",
    "article:author": "Analytics DeepLearning.AI",
    "article:tag": "Technical Insights"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://www.deeplearning.ai/_next/image?url=https%3A%2F%2Fcharonhub.deeplearning.ai%2Fcontent%2Fimages%2F2024%2F05%2Funnamed--61--2.jpg&w=3840&q=75",
      "bytes": 67074,
      "reused": false,
      "local_path": "attachments/dce0b6cffe85/images/body-3fc59a2cc700e0bd30eb.img",
      "src": "https://www.deeplearning.ai/_next/image?url=https%3A%2F%2Fcharonhub.deeplearning.ai%2Fcontent%2Fimages%2F2024%2F05%2Funnamed--61--2.jpg&w=3840&q=75",
      "alt": "We Need Better Evals for LLM Applications: It’s hard to evaluate AI applications built on large language models. Better evals would accelerate progress.",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://www.deeplearning.ai/_next/image?url=%2Fdlai%2Fassets%2Fthe-batch%2Fbanners%2Fai-new-electricity.png&w=640&q=75&dpl=dpl_Cucb5Eo6yga7pa59a5vqbcGBzdkW",
      "bytes": 59211,
      "reused": false,
      "local_path": "attachments/dce0b6cffe85/images/body-f7f198a9a568b6bdb0e7.img",
      "src": "https://www.deeplearning.ai/_next/image?url=%2Fdlai%2Fassets%2Fthe-batch%2Fbanners%2Fai-new-electricity.png&w=640&q=75&dpl=dpl_Cucb5Eo6yga7pa59a5vqbcGBzdkW",
      "alt": "AI is the new electricity. Are you ready to flip the switch? Download your free copy of the ebook.",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://www.deeplearning.ai/the-batch/tag/letters",
      "label": "Letters",
      "type": "a"
    },
    {
      "href": "https://www.deeplearning.ai/the-batch/tag/technical-insights",
      "label": "Technical Insights",
      "type": "a"
    },
    {
      "href": "https://www.deeplearning.ai/the-batch/tag/may-29-2024",
      "label": "May 29, 2024",
      "type": "a"
    },
    {
      "href": "https://x.com/intent/post?url=https%3A%2F%2Fwww.deeplearning.ai%2Fthe-batch%2Fwe-need-better-evals-for-llm-applications",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.deeplearning.ai%2Fthe-batch%2Fwe-need-better-evals-for-llm-applications",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.deeplearning.ai%2Fthe-batch%2Fwe-need-better-evals-for-llm-applications",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://chat.lmsys.org/?utm_campaign=The%20Batch&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz--7E9rghpH8hgDEBV2C5pyiXXeAIJY6LnrVppijwY-3E1T3PURd5sLMLgkuo5131igbto6Y",
      "label": "LMSYS Chatbot Arena",
      "type": "a"
    },
    {
      "href": "https://crfm.stanford.edu/helm/?utm_campaign=The%20Batch&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz--7E9rghpH8hgDEBV2C5pyiXXeAIJY6LnrVppijwY-3E1T3PURd5sLMLgkuo5131igbto6Y",
      "label": "HELM",
      "type": "a"
    },
    {
      "href": "https://www.deeplearning.ai/the-batch/why-we-need-more-compute-for-inference/?utm_campaign=The%20Batch&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz--7E9rghpH8hgDEBV2C5pyiXXeAIJY6LnrVppijwY-3E1T3PURd5sLMLgkuo5131igbto6Y",
      "label": "wrote",
      "type": "a"
    },
    {
      "href": "https://www.deeplearning.ai/the-batch/agentic-design-patterns-part-2-reflection/?utm_campaign=The%20Batch&utm_source=hs_email&utm_medium=email&_hsenc=p2ANqtz--7E9rghpH8hgDEBV2C5pyiXXeAIJY6LnrVppijwY-3E1T3PURd5sLMLgkuo5131igbto6Y",
      "label": "reflection",
      "type": "a"
    },
    {
      "href": "https://www.deeplearning.ai/resources/",
      "label": "",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:47:10Z",
  "source_url": "https://www.deeplearning.ai/the-batch/we-need-better-evals-for-llm-applications/",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 4874,
  "expected_body_images": 2,
  "discovery_status": "ok",
  "delivery_status": "ok",
  "missing_reason": "",
  "raw_html": "attachments/dce0b6cffe85/pages/source.html",
  "local_html": "attachments/dce0b6cffe85/pages/article.html",
  "body_base_path": "attachments/dce0b6cffe85/pages/",
  "body_markdown_path": "attachments/dce0b6cffe85/pages/article.md"
}