Define “Good” First, Then Choose Models: Eval-Driven Development Cheat Sheet
Stop choosing agents based on demos and who shouts the loudest. Write evals first, define what “good” means, then turn every design decision into a test. This article summarizes the core method, plus practitioner feedback from the comments.
In eval-driven development, the core move is: before writing an agent, define what “good” means. The eval here is not an abstract concept; it is simply a test with a score: give the agent an input, see what it does, then score it according to rules.
Sergii Makarevych posted a cheat sheet and a long-form article on how to use evals—rather than guesswork—to choose models, retrieval, and agent design. Below is a summary of the core content, plus a few practitioner comments from the comments section worth reading.
Why one test isn't enough
Agents are not deterministic. For the same input, they may phrase things differently each time, or call different tools. Manual testing once may feel good, but it falls apart in production. The right question is not “Did it pass this time?” but “How often does it pass?”
Run it 5 times, and 3 times it follows the rules: a 60% pass rate. That number tells you how stable the system is. A single success proves nothing.
Test sets grow out of real failures
Don't use imagined, clean prompts. Real users make typos, ask two things in one sentence, and express emotion. Take samples from past tickets, chat logs, and production failure inputs.
Each task should cover three categories: what it must do, what it must not do, and what it must not regress on. Every time a bug escapes to users, add it to the test set. Then keep a hidden set to prevent overfitting while you tweak prompts.
Prefer code checks; use a judge only when reading is needed
Anything that can be expressed as a rule should be checked by code. Whether tool calls are correct, whether parameters are passed incorrectly, whether it actually created a ticket when it says it did, whether the answer cites sources. Use code for these: cheap, stable, and repeatable.
Model judges should be used only for things that require reading to evaluate: tone, policy boundaries, clarity. Humans define “good” and periodically audit the judge; don't let the judge have the final say on its own.
Look at outcomes or at steps
If any path is acceptable, look only at the outcome. For example, for a research task, it is enough that the summary is correct and the sources are reliable.
If order is a requirement—for example, verify eligibility before acting, and require confirmation before irreversible operations—then check the steps. Always save traces: they are both a basis for debugging and the next batch of regression cases.
A score is a range, not a verdict
Run the same test twice and the score will drift. 82 and 79 both mean “around 80.” When comparing versions, you must run on the same set of cases and look at each flip: 5 fixed, 2 broken; the average score rose, but one critical case broke—that is a regression.
Use a fixed baseline and block only when two consecutive runs are clearly worse. Don't make a decision based on two isolated numbers.
Use evals to choose systems
Compare models, retrieval, and architectures on the same set of cases. If a small model is only 2–3 points behind but ten times cheaper, usually choose the small model. A reranker must earn its latency with a clear faithfulness improvement. Don't add multi-agent setups yet unless evals prove they solve a certain pattern.
Record cost and latency in the scorecard. A solution that is correct but ten times more expensive and three times slower is not a good solution.
CI routing
Run code checks on every commit; run judges on PRs and nightly; run simulations offline.
One team optimized a 20-ticket eval from 162 seconds to 18 seconds, and only then were developers willing to run it every time. If evals are slow enough to take minutes, nobody will run them; only second-scale speed keeps them in use.
Worth reading in the comments
This article attracted many practitioners. Someone pointed out that eval-driven development is only useful when you can reproduce the failure state, so you need to persist the original input and full trace for deterministic replay.
Someone shared their own experience: a 100-sample eval said it won, while the full 1,000-sample set said it was a tie. If the sample size is too small, you will misjudge.
Someone also shared an OCR case: an average CER of 0.15% looked beautiful, but GLM-OCR silently missed a line of 16 words on a skewed page; only a separate hard-page set could expose it.
Someone else said to be careful with simulated users too. Model-played users usually write very neatly; real users don't. Build personas from real chats, and test the simulator the way you test a judge. Otherwise, the guesswork just moves upstream.
Some developers worry that eval-driven development will be slower than not doing it, and that the eval set needs frequent optimization or it will bloat. That is indeed a cost, but compared with silent failures after launch, these costs are more controllable.
Tool: Future AGI
Someone in the comments linked an open-source project, Future AGI, whose tagline is “AI agents hallucinate. Fix it faster.” It puts eval, tracing, simulation, guardrails, gateway, and optimization on one platform: Apache 2.0, self-hostable, and any layer can be replaced with your own stack.
It looks like a one-stop closed loop. Those interested can start from GitHub.
Finally, remember one line: don't let the last demo cast your vote for you. Define “good,” and leave the rest to tests.
发布时间: 2026-11-24 03:10
