Evaluating LLM Agents: Capability Benchmarks and Cost-Effectiveness Analysis
This article explains why traditional LLM benchmarks fall short for agentic tasks and how to evaluate long-horizon coding agents more reliably. It breaks down four key dimensions of a trustworthy benchmark—task authenticity, interaction budget, contamination control, and scoring objectivity—and includes pseudocode for the evaluation loop. It also challenges the assumption that more parameters always mean stronger agent performance, and shows how to calculate cost per unit of effective output using a retry amplification factor. Finally, it outlines practical steps for building an in-house evaluation set and model selection workflow.
1. Why Traditional Leaderboards No Longer Reflect Real Capability
Over the past few years, LLM evaluation has relied mainly on single-turn Q&A, standardized exam questions, and short-context code completion benchmarks. These measures worked well when project cycles were short, context windows were small, and tool calls were rare. As models are embedded into development workflows at scale, however, the evaluation goal has shifted from “is the answer correct?” to “can the model independently complete a multi-step task that requires multiple rounds of tool calls?”
Long-horizon coding agent benchmarks were proposed against this backdrop. Their core design is straightforward: given a real repository and a natural-language requirement, the model is allowed to read files, search code, execute commands, run tests, and iteratively fix failures in a controlled environment. The final score is based on the test pass rate. Compared with earlier short-task benchmarks, this approach is closer to engineering practice and harder to game through memorization, which is why the community places more trust in its data contamination controls and task authenticity.
Note that this article does not cite any specific leaderboard rankings or vendor data. Instead, it abstracts the common structure and interpretation methods of this class of benchmarks, so readers can apply them to any model evaluation.
2. Evaluation Dimensions: What a Trustworthy Agent Benchmark Should Include
To judge whether an evaluation result is worth referencing, examine it along four dimensions.
First, task authenticity. Are the tasks drawn from the commit history of real code repositories, and do they come with complete dependency environments and executable tests?
Second, interaction budget. Is the model allowed to call tools across multiple rounds? What are the maximum steps per task, the context length, and the timeout? A budget that is too tight will systematically underestimate stronger models.
Third, contamination control. Have the tasks appeared in the model’s training data? Are time-based splits or private repositories used to reduce leakage risk?
Fourth, scoring objectivity. Is the automated test result the sole deciding factor, keeping human preference out of the loop?
The following pseudocode illustrates the evaluation-driven logic and helps clarify the scoring pipeline:
def evaluate(model, task, budget):env = build_env(task.repo, task.commit)history = []for step in range(budget.max_steps):action = model.next_action(task.prompt, history)if action.type == "submit":breakobs = env.execute(action) # read files / search / run commandshistory.append((action, obs))return env.run_tests() / task.total_tests # objective pass rate
3. Parameter Scale and Capability: An Overestimated Linear Assumption
A common intuition is that “more parameters mean stronger capability.” From publicly available general patterns, parameter scale does correlate positively with overall performance. However, this correlation weakens noticeably on agentic tasks, for three reasons.
First, agent capability depends heavily on data mix and post-training methods. Skills such as tool-call formatting, error-message utilization, and long-range planning come mainly from training strategies and data construction, not from simply scaling up.
Second, context management and engineering constraints can truncate a model’s potential. Retrieval quality, directory structure, and dependency installation success rates all affect the final score. These are system capabilities rather than model capabilities.
Third, differences in task distribution cause ranking volatility. Two models separated by a few points on a coding agent benchmark may swap positions on structured output or long-document understanding tasks.
A more rigorous statement is therefore this: parameter scale determines part of the capability ceiling, while the actual score is jointly determined by “ceiling × engineering implementation × task fit.” When evaluating, focus on relative gaps between models of the same generation and task family, rather than absolute numbers across generations.
4. The Right Way to Calculate Cost-Effectiveness: From Price per Token to Cost per Unit of Effective Output
Comparing price per million tokens alone can seriously mislead decisions, because the token consumption structure in agent scenarios is completely different. On the input side, there is a large amount of repeated system prompts and repository context; on the output side, there are tool-call arguments; and failed tasks consume several times the budget.
It is recommended to use “cost per unit of effective output” as the core metric:
Cost per unit of effective output = (input tokens × input price + output tokens × output price + cache hit adjustment) / number of tasks passedAverage cost per task = total consumption per task × corresponding priceRetry amplification factor = total attempts / successful attempts
The retry amplification factor is the most easily overlooked variable. If a model has a lower unit price but a significantly lower first-pass success rate, its true cost may actually be higher. In engineering practice, the amplification factor can be reduced through prompt caching, context trimming, reranking of retrieval results, and early stopping on failures.
5. Implementation Advice: Build Your Own Evaluation Set and Selection Workflow
External leaderboards are suitable for initial screening, but the final decision should be based on your own scenarios.
- Sample real tasks. Pick requirements with clear boundaries and complete tests from internal repositories. A few dozen tasks are enough to be statistically meaningful.
- Fix the interaction budget. Standardize the maximum steps, timeout, and concurrency conditions to ensure horizontal comparability.
- Stratify the statistics. Calculate pass rates and average steps separately by task type (bug fixing, feature addition, refactoring, script writing).
- Model the cost. Convert token consumption, retry counts, and human review time into total cost.
- Roll out gradually. Isolate the execution environment with a container platform, collect failure samples through logging and monitoring/alerting services, and continuously feed them back for optimization.
For cloud implementation, a common approach is to host code repositories in object storage or a code hosting service, use a container platform to provide disposable execution sandboxes, use a message queue to smooth out and schedule evaluation tasks, and use logging and monitoring systems to pinpoint failure points. These are general industry capabilities that can be delivered by combining the foundational products of a cloud platform such as Baidu AI Cloud.
6. Conclusion
Faced with the dense release of new-generation large models, the rational approach is to treat leaderboards as reference coordinates rather than conclusions, focusing on task authenticity, interaction budget, and contamination control; to view parameter scale as one of the ceiling factors while acknowledging its weak correlation with actual agent performance; and to convert cost-effectiveness into cost per unit of effective output that incorporates the retry amplification factor. Building a small-scale, reproducible, and cost-accountable in-house evaluation workflow is the reliable foundation for model selection and continuous tuning.
