Evaluating the Coding Ability of LLMs: Key Dimensions and Limitations

    A practical look at why high coding benchmark scores often fail to predict real engineering performance. The article breaks coding ability into distinct sub-skills, examines the structural biases of classic repair benchmarks, explains how harder benchmarks restore discriminative power through licensing isolation and larger change sizes, and covers terminal and agentic benchmarks that score execution trajectories rather than final artifacts. It also outlines how to build an internal evaluation set, common interpretation mistakes, and a three-gate rollout process for model selection.

    1. The Starting Point: Why a High Score Doesn’t Mean the Model Can Do the Job

    A recurring pattern in engineering practice: a model scores very high on public coding benchmarks, yet once it is plugged into a real development workflow, the team finds it performs poorly on cross-file refactoring, inferring implicit dependencies, and long-chain debugging. This isn’t an isolated case. It reflects a structural mismatch between evaluation methodology and real engineering complexity.

    Understanding that mismatch starts with one fact: coding ability is not a scalar. It can be decomposed into several largely independent sub-abilities:

    • Local syntax and API correctness: given a function signature and documentation, produce an implementation that compiles and runs.
    • Defect localization: starting from a natural-language problem description, narrow the search space in an unfamiliar codebase.
    • Change scope control: fix the problem without breaking existing behavior or tests.
    • Environment interaction: close the loop under real constraints such as the shell, build systems, and dependency managers.
    • Long-context consistency: keep naming, style, and architectural conventions coherent across dozens of files and thousands of lines.

    Any single benchmark covers only one or two of these. Treating a total score as the full picture is the root cause of most misjudgments.

    2. Classic Repair Benchmarks: Design Intent and Inherent Flaws

    The earliest widely adopted approach builds tasks automatically from real issues and merged pull requests in open-source repositories: the model receives a repository snapshot, a problem description, and a test suite, and must produce a patch that passes the tests. The value of these benchmarks lies in their authenticity: tasks come from problems human developers actually solved, not hand-written toy problems.

    Later, human-curated versions filtered out samples with vague descriptions, flaky tests, or disputed pass criteria, shrinking the set to a few hundred items and markedly improving result stability. This step is engineering-necessary, because the noise ratio in automatically constructed samples is often underestimated.

    Even after curation, three biases remain hard to eliminate:

    1. The judging signal is too narrow. When “did the specified tests pass” is the only criterion, a semantically correct solution with a different implementation path may be marked as failing; conversely, an opportunistic patch that special-cases the test assertions may pass.
    2. Data contamination. Repository history, issues, and fix patches have mostly been public for years and easily enter training corpora, so scores reflect memorization rather than reasoning.
    3. Narrow task distribution. Samples that can be automated naturally skew toward projects with complete tests and simple builds, far from the reality of most enterprise internal repositories.

    Once mainstream models cluster in a high band and the gaps between them shrink to single digits, the benchmark has exhausted its discriminative power. Continuing to cite the total score as a selection criterion carries almost zero information.

    3. Harder Alternative Benchmarks: Two Orthogonal Ways to Raise the Bar

    To restore discriminative power, the industry moved toward harder construction strategies built on two orthogonal axes.

    The first axis raises the licensing and isolation bar to reduce contamination probability. The public subset uses a strong copyleft-style license, making fix patches hard to copy freely into training corpora; a private subset fully isolated from open source is kept for cross-validation. In essence, this treats availability as the anti-contamination variable.

    The second axis raises the change-size bar. For example, each task must modify at least ten lines of code, and a substantial share of tasks require changes of a hundred lines or more. Lines changed is a crude but effective proxy metric: small changes can often be completed by local pattern matching, while large changes force the model into cross-file reasoning, interface alignment, and regression risk assessment.

    The result is that all model scores drop noticeably, generally landing in a low band, with only a very few top models clearing a given threshold. The drop isn’t a regression in model capability; the evaluation has regained resolution.

    It’s worth stressing that lines changed is only a proxy variable, not the capability itself. It filters out shallow solutions but may also reward verbose implementations. So when interpreting these scores, look at the equivalence-class distribution of patches alongside the pass rate, not the pass rate alone.

    4. Terminal and Agentic Benchmarks: From “Writing Correct Code” to “Completing the Task”

    The third category shifts the perspective from code text to the execution environment: the model must explore directory structure in the shell, install dependencies, run builds, read errors, and iterate until the task is done. What’s being measured is closed-loop capability, including tool-call selection, failure recovery, state tracking, and cost control.

    The key difference from repair benchmarks is the object of scoring. Repair benchmarks score the final artifact; terminal benchmarks score the process trajectory. One model may write a beautiful patch yet stall because it can’t read build logs; another may produce mediocre code but converge reliably over multiple rounds of probing. For teams that want to ship coding assistants, the latter’s engineering value is often higher.

    Three easily overlooked details when designing such evaluations:

    • Environment reproducibility. Dependency version drift makes the same task yield different conclusions at different times, so images must be frozen and made offline-capable.
    • Timeout and budget accounting. Whether unlimited rounds are allowed, and whether execution time and call counts are counted, directly changes rankings.
    • Isolation of side effects. Tasks should run in a sandbox to avoid accidentally writing to external resources.

    The evaluation driver logic can be abstracted schematically as:

    1. def evaluate(task, agent, sandbox, budget):
    2. with sandbox.isolated(task.image) as env:
    3. result = agent.run(
    4. instruction=task.prompt,
    5. env=env,
    6. max_steps=budget.steps,
    7. timeout=budget.wall_clock,
    8. )
    9. # Record artifact verification and process verification separately
    10. return {
    11. "artifact_pass": task.verify(env),
    12. "steps": result.steps,
    13. "tokens": result.tokens,
    14. "recovered": result.recovered_from_error,
    15. }

    Only by outputting artifact pass rate alongside process metrics can you tell whether a high score came from efficiency or from brute force.

    5. Building Your Own Evaluation Set: A More Reliable Basis for Selection

    Public leaderboards are good for initial screening, not for decisions. Truly discriminative evaluation comes from a company’s own historical development data. The construction path has four steps:

    1. Sampling. Draw samples from historical issues in the internal code hosting platform, requiring clear change records and regression-capable tests.
    2. Sanitization and reconstruction. Remove internal identifiers and sensitive information, complete the build scripts, and ensure one-click reproduction in an isolated environment.
    3. Stratification. Group by change size, number of files touched, and whether build configuration is involved, forming a difficulty gradient so samples aren’t all concentrated in the easy tier.
    4. Dual-track judging. Record both test pass status and human review conclusions, used to estimate the misjudgment rate of automated judging.

    When sample size is limited, reporting a confidence interval is more honest than reporting a point estimate. A two-point gap over a few dozen samples usually has no statistical significance.

    6. Common Interpretation Mistakes

    • Ranking by total score instead of matching the scenario. Frontend component generation and backend concurrency fixes require different abilities, so rankings don’t transfer.
    • Ignoring the contribution of prompts and scaffolding. The same model’s performance under different context organization, retrieval strategies, and tool sets can vary more than the gap between models.
    • Treating pass rate as quality. Whether a patch introduces duplicated code or breaks abstraction boundaries is often not covered by tests.
    • Overlooking the cost dimension. Differences in rounds and context length needed to reach the same pass rate directly determine cost per task.

    7. Practical Recommendations

    To get stable gains on the engineering side, you can build an evaluation pipeline on general cloud capabilities: use a container platform to provide isolated execution environments, object storage to hold task snapshots and artifacts, a message queue to smooth out and schedule batch tasks, and logging and monitoring with alerting to track failure clusters. Baidu AI Cloud offers corresponding capabilities in these general categories, which can be combined as needed.

    For the process, keep three gates: public benchmarks for coarse screening, your own stratified set for fine ranking, and a small-traffic pilot on real development tasks for canary validation. Only when all three conclusions agree should a model be added to the default configuration; when they diverge, trust your own set and the canary results first.

    8. Conclusion

    The point of evaluation isn’t to produce a ranking but to reduce uncertainty. When a benchmark’s scores collectively saturate, its judging signal is singular, or contamination risk exists, it has done its historical job and should be replaced by evaluations with a higher bar that are closer to your own scenarios. For R&D teams, treating evaluation as sustainably operated infrastructure rather than a one-time procurement input is the fundamental way to avoid selection mistakes.