LLM Agent Evaluation and Cost-Performance Analysis in the Post-Training Era
This article explains why public benchmark rankings often diverge from real-world performance when selecting large language models for long-horizon agent tasks. It covers the advantages of long-horizon agent benchmarks over static benchmarks, the limited marginal impact of parameter scale, the decisive role of post-training and environment generalization, and the hidden variable of architectural efficiency. It also introduces a cost-per-success framework for evaluating cost-performance, a practical selection and evaluation workflow, and common pitfalls to avoid. Readers will learn how to measure model value using their own task data rather than list price alone.
1. The Problem: Why Benchmark Scores and Real-World Experience Often Diverge
Over the past year, the focus of LLM competition has clearly shifted from “whether single-turn answers are fluent” to “whether models can deliver reliably in long-horizon tasks.” Many teams face a common frustration during model selection: a model ranked near the top of public leaderboards shows a noticeable drop in success rate once integrated into their engineering pipeline, while another model with a slightly lower score performs more consistently on real tasks such as repository refactoring, defect localization, and script migration.
This divergence is not benchmark fraud. It happens because evaluation goals and business goals do not fully overlap. Understanding this is the prerequisite for sound model selection and cost-performance judgment.
2. Why Long-Horizon Agent Benchmarks Are More Trustworthy Than Traditional Static Benchmarks
Traditional code benchmarks usually focus on whether function-level completion is correct. Their tasks have clear boundaries, short contexts, and can be judged in a single pass. Real engineering tasks, however, typically have three characteristics:
- Long chains: They require multiple rounds of reading code, retrieval, modification, execution, and rollback. Correctness at a single step does not guarantee overall success.
- Strong environment dependency: They require understanding repository structure, dependency versions, build scripts, and test constraints.
- Sparse feedback: Intermediate steps provide no immediate right-or-wrong signal, so the model must plan and self-correct.
For these reasons, the community tends to trust agent benchmarks with contamination control, high task realism, and long evaluation cycles. Their rankings usually align more closely with what engineering teams experience. It is worth emphasizing that any single leaderboard is only one reference dimension and should not be the sole decision criterion.
3. Parameter Scale and Capability: Positive Correlation With Limited Slope
A common intuition is that “bigger models are stronger.” Based on public information, leading closed-source models generally have parameter counts in the trillion range, while open-source designs range from hundreds of billions to trillions. Yet within the same generation, the actual capability gap between models of different sizes is often smaller than their parameter ratio suggests.
A more accurate statement is:
- Parameter scale determines the “potential space” of the capability ceiling.
- Data quality, training mixtures, and post-training methods determine how much of that space is realized.
- Task fit determines whether the realized capability can be invoked in your scenario.
A schematic relationship:
Actual task performance ≈ f(architecture efficiency, pre-training data quality, post-training methods, training environment generality, inference configuration)Parameter scale is only one positive variable with diminishing marginal returns
This also explains a phenomenon: models of different generations and sizes may cluster within a narrow score range on the same long-horizon benchmark, with generational gaps significantly compressed.
4. Post-Training as the Dividing Line: The Key to Capability Realization
The prevailing view is that a model’s foundational intelligence is largely formed during pre-training, while “whether it can get work done” is mainly determined by post-training. Post-training involves at least three goals:
- Instruction and format following: Producing structured output reliably and reducing parsing failures.
- Tool calling and planning: Selecting tools correctly, decomposing steps, and handling retries after failures.
- Domain and scenario alignment: Reinforcing correct behavior on real task distributions and suppressing hallucinated operations.
If post-training is conducted only in a single proprietary environment and on a single task distribution, the model is prone to “environment overfitting”: it looks impressive in its native environment, but its success rate drops markedly when transferred to general repositories, heterogeneous toolchains, or different language ecosystems. This is the root cause of many cases where “the base model is smart but deployment results are disappointing.”
A practice worth borrowing from engineering is to build a diversified post-training task pool:
# Schematic: generalization dimensions of a post-training task settask_pool = {"repo_scale": ["small repo", "medium repo", "very large repo"],"language": ["general backend language", "scripting language", "systems language"],"task_type": ["bug fix", "dependency upgrade", "test completion", "script migration"],"feedback": ["unit tests pass", "static checks pass", "human review passes"],"env": ["containerized environment A", "containerized environment B", "mixed toolchain"],}
The broader the dimensional coverage, the better the model’s robustness in unfamiliar environments, generally speaking.
5. Architectural Efficiency: The Hidden Variable at Equal Scale
At the same parameter scale, architectural choices such as attention mechanism design, sparsification strategies, and memory efficiency in training and inference significantly affect usable capability per unit cost. A more efficient architecture can support longer contexts, higher concurrency, and more complete tool-chain invocation under the same hardware budget. In long-horizon agent tasks, this is often more cost-effective than “piling on more parameters.”
When evaluating architectural efficiency, three observable metrics are worth attention: performance degradation under long contexts, throughput stability under concurrency, and the extra overhead caused by failure retries.
6. Cost-Performance Framework: From Unit Price to Cost per Success
Looking only at price per million tokens is easy to misjudge. The real cost structure of long-horizon agents should be calculated as follows:
Cost per task = (input tokens + output tokens + retry tokens + tool-call overhead) × unit price / task success rateTotal cost = cost per task × task volume + integration and operations cost
Retry tokens are often underestimated. If a model has a low unit price but an insufficient success rate, repeated retries and manual fallback will push costs up. Teams are advised to run a small-scale benchmark on their own task set, recording success rate, average number of rounds, average latency, and human intervention rate, then plug these into the formula.
A simplified comparison:
Model A: low unit price, success rate 0.55, average 6 rounds → higher cost per successModel B: high unit price, success rate 0.78, average 4 rounds → possibly lower cost per success
The conclusion is often counterintuitive, which is exactly why decisions must be based on “cost per success” rather than “unit price.”
7. A Practical Selection and Evaluation Workflow
- Build a private evaluation set: Extract real tasks from historical tickets, covering multiple languages and repository scales.
- Standardize the execution environment: Use a container platform and standardized build scripts to ensure reproducibility.
- Score across multiple dimensions: Success rate, average rounds, token consumption, human intervention rate, and rollback rate.
- Integrate observability: Collect the distribution of failure causes through logging services and monitoring alerts.
- Roll out with small traffic: Launch on low-risk tasks first, then gradually expand the scope.
- Regression on cost: Review cost per success monthly and adjust routing strategies dynamically.
Architecturally, a “multi-model routing + unified tool layer” approach can treat models as replaceable components and avoid strong coupling to a single vendor:
Request -> task classification -> routing policy -> Model A/Model B -> unified tool layer -> result validation -> write-back
8. Common Pitfalls and How to Avoid Them
- Pitfall 1: Leaderboard ranking equals business results. Avoidance: rely on your private task set; use leaderboards only for initial screening.
- Pitfall 2: Bigger parameters are always better. Avoidance: focus on cost per success and architectural efficiency.
- Pitfall 3: One evaluation lasts forever. Avoidance: models keep iterating, so establish periodic regression.
- Pitfall 4: Ignoring environment generality. Avoidance: prioritize models and post-training approaches validated in heterogeneous environments.
9. Conclusion
As long-horizon agents become the mainstream form, model competition has shifted from a “scale race” to a “post-training and environment generality race.” For developers and enterprises, the rational approach is to return evaluation authority to their own business data, measure cost-performance by cost per success, and reduce switching costs with a unified tool layer and observability system. If elastic compute and supporting capabilities are needed, general product categories from Baidu AI Cloud, such as container platforms, object storage, logging services, and monitoring alerts, can be used to build a reproducible evaluation and deployment pipeline, moving model selection from subjective experience to quantifiable engineering decisions.
