Vibeleaderboard
← All Intel
Intel / post

Why Evals Come Before Fixes in Agent Development

Source
x.com
Publisher
Andrew Ng
Date
Andrew Ng@AndrewYNg

Readers responded with both surprise and agreement last week when I wrote that the single biggest predictor of how rapidly a team makes progress building an AI agent lay in their ability to drive a disciplined process for evals (measuring the system’s performance) and error analysis (identifying the causes of errors). It’s tempting to shortcut these processes and to quickly attempt fixes to mistakes rather than slowing down to identify the root causes. But evals and error analysis can lead to much faster progress. In this first of a two-part letter, I’ll share some best practices for finding and addressing issues in agentic systems. Even though error analysis has long been an important part of building supervised learning systems, it is still underappreciated compared to, say, using the latest and buzziest tools. Identifying the root causes of particular kinds of errors might seem “boring,” but it pays off! If you are not yet persuaded that error analysis is important, permit me to point out: - To master a composition on a musical instrument, you don’t only play the same piece from start to end. Instead, you identify where you’re stumbling and practice those parts more. - To be…

Read the full post on X

Context

Andrew Ng argues that the fastest way to improve an AI agent is to measure its mistakes before trying to fix them. In this X post, the first of a two-part letter, he says the biggest predictor of how quickly a team makes progress is a disciplined for evals, which measure how well the system performs, and error analysis, which finds the causes of its errors. Teams are tempted to try quick fixes or the latest popular technique instead. This part covers evals and leaves error analysis for the following week.

He explains why evals for agents are harder than for older machine learning. A classifier that labels inputs 0 or 1 can only be wrong in two ways, and standard measures such as accuracy and precision apply. An agent's output can go wrong in far more ways. In his example, an agent that copies invoice details into a financial database might get the due date, the amount or the currency wrong, swap the payer's and biller's addresses, or make an call that fails verification. Rather than defining an error measure in advance, he recommends building a quick prototype, reading a handful of its outputs by hand to see where it stumbles, and then building test sets and scores for the problems that matter, some checked by code and others by an acting as a judge. He expects to adjust those evals often as new kinds of failure appear. Once they exist, a team can measure whether a change to the agent actually helps.

Terms in this piece · Glossary
  • Process — A running instance of a program, with its own working memory, open files and identity.
  • API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.
  • Large language model — A model trained on large amounts of data to process and generate language.
  • Model grader — A model used to judge whether another model's output meets a criterion, in place of or alongside a person.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

More from Andrew Ng
Recommended reads