Evaluating LLM Coding Agents: Success Rate, Efficiency, Cost, and Robustness

    A practical framework for assessing coding agents beyond benchmark scores. It covers five dimensions—task success and quality, execution efficiency, per-task cost, requirement-following stability, and edge knowledge—and separates reasoning ability from long-context recall. It also provides a reproducible evaluation pipeline and selection guidance for balancing capability, cost, and risk.

    I. Why a High Benchmark Score Does Not Mean the Agent Can Do the Job

    In coding-agent scenarios, the model no longer produces a one-shot answer. Instead, it enters a multi-turn loop of understanding requirements, planning, calling tools, reading and writing files, self-testing, and correcting mistakes. This shift in execution paradigm creates a clear gap between traditional single-turn benchmark scores and real delivery outcomes. A model may perform well on static problems but keep going in circles in a real repository. Another model may have mediocre scores but reliably complete tasks in very few steps.

    Therefore, evaluating a coding model should answer at least three questions: can it get the job done (success rate), how fast does it do it (execution efficiency), and how expensive is it (per-task cost). Two additional stability issues are often overlooked: whether requirement following is reliable, and whether edge knowledge is covered.

    II. Five Core Dimensions and Metric Definitions

    1. Task success rate and quality score

    Use a three-level judgment: runnable, tests pass, and human review pass. This avoids hiding quality differences behind a binary result. The quality score should include functional completeness, code aesthetics and maintainability, and interaction details. Aesthetics and details are often the real dividing line between models.

    2. Execution efficiency: average steps and tool-call patterns

    Average step count is the most intuitive efficiency metric, but tool-call strategy should be observed at the same time. In practice, there are two common styles: one prefers serial execution with frequent self-testing; the other prefers concurrent tool calls with fewer self-tests. The latter often uses only half as many steps on average without degrading results. This suggests that extra steps are often consumed by redundant self-testing rather than real progress.

    3. Per-task cost

    Cost should not be based only on unit price. It should be defined as:

    1. def task_cost(steps, avg_tokens_per_step, price_in, price_out, tool_fee=0.0):
    2. # Per-task cost = steps × average tokens per step × unit price + tool-call fees
    3. token_cost = steps * avg_tokens_per_step * (price_in + price_out) / 2
    4. return token_cost + steps * tool_fee
    5. # When selecting a model, compare the median task_cost on the same task set, not the unit price alone

    On the same task set, an efficient model may cost only one-third to one-half as much per task as a comparison model. With inference service prices trending upward and some vendors already raising prices, this metric is more valuable for decision-making than the unit price per million tokens.

    4. Requirement-following stability

    This is one of the most dangerous defect types: the model does not do the task wrong, but randomly ignores one of the original requirements, causing functionality to be silently missing. This is different from imperfect interaction details. The latter affects experience; the former directly creates delivery defects. Evaluation should specifically measure requirement-item coverage rate and omission rate, and sample the same task multiple times to observe variance.

    5. Edge knowledge and cross-form transfer

    A typical failure mode is a sharp drop in capability when the target form changes. The same function may actively use type checking, static checking, build validation, and other supporting measures in a mainstream frontend form. Once the target changes to a niche operating system or an uncommon runtime, the model may not even use the most basic static checks. For scenarios that depend on world knowledge, the model needs more retrieval or more reading of third-party library source code before it can start, and uncertainty rises significantly.

    III. Assess Reasoning Ability and Context Recall Separately

    Improvements from reasoning enhancement (slow thinking) are often not radical. A considerable portion comes from longer, deeper chains of thought rather than a qualitative change in capability. More importantly, long-context recall matters: in tasks that require recalling large amounts of context across files and turns, long-chain-of-thought models are not necessarily better than comparison models and are often generally weaker.

    A practical recommendation is to split the evaluation set into two categories: short-context, high-difficulty reasoning tasks and long-context repository-level tasks. Report them separately to avoid letting a single total score hide structural weaknesses.

    IV. An Implementable Evaluation Pipeline

    1. pipeline:
    2. - Build a private task set: 20–50 real requirements covering CRUD, refactoring, bug fixing, and cross-form migration
    3. - Pin environment and dependencies: unified container images to eliminate network and version differences
    4. - Sample multiple times: repeat each task 3–5 times and record success-rate variance
    5. - Collect process metrics: steps, tool-call sequences, token consumption, self-test count
    6. - Automate judgments: unit tests + static checks + requirement checklist verification
    7. - Manual spot checks: score aesthetics, interaction details, and maintainability
    8. - Archive: retain full-chain logs and monitoring alerts for regression comparison

    On platforms such as Baidu AI Cloud, this pipeline can use container services as the execution environment, object storage to archive artifacts and corpora, and logging and monitoring services to collect process data, forming a sustainable regression baseline.

    V. Selection Conclusions and Risk Mitigation

    Overall, the ideal conclusion is not “who is the strongest,” but layered selection:

    • For maximum knowledge and aesthetic ceiling with a sufficient budget: choose a very-large-parameter model, accept imperfect interaction details, and use extensive self-testing as a fallback.
    • For cost-effectiveness and development efficiency: choose a small, efficient model. Per-task cost can drop to one-third to one-half, but edge-knowledge shortcomings must be accepted.
    • Regardless of the choice, outside knowledge must be supplemented: explicitly inject static checks, build validation, target-form constraints, and a requirement checklist into the prompt, turning “random omissions” into verifiable items.
    1. [Hard constraints] Target form = niche runtime; static checks and build must be executed
    2. [Requirement checklist] 1... 2... 3... (check each item, do not omit)
    3. [Definition of done] All checklist items pass + zero static-check warnings

    In one sentence: to evaluate coding agents, look at the product of success rate × efficiency × cost, then stress-test requirement-following stability and edge knowledge; making evaluation a reproducible engineering pipeline is more reliable than chasing any single leaderboard.