How to Scientifically Evaluate the Coding Ability of Large Language Models
As expectations for LLM coding shift from single-line completion to repository-scale planning and delivery, evaluation results keep splitting: some teams see dramatic gains on hard benchmarks, while working developers report good scores but mediocre real-world experience. This article explains how to build a reproducible, comparable evaluation framework grounded in production constraints: separating coding ability into three layers, reading public benchmarks without being misled by narrow wins, running a minimal repository-level refactoring loop, understanding where the experience gap comes from, evaluating technical writing, and decoupling variable and fixed parts of the pipeline on general cloud capabilities. It closes with a falsifiable way to frame the "breakthrough versus incremental" debate.
Expectations for large language models have moved well past “it can autocomplete a few lines.” Facing complex programming, agent collaboration, and long-horizon reasoning, the industry now asks whether a model can think, plan, and deliver a runnable system at repository scale, the way a senior engineer would. Yet evaluation conclusions keep splitting: some teams see significant jumps on high-intensity benchmarks, while frontline developers report that the scores look good but the experience feels average. To make a selection decision you can defend, the point is not to chase the slogan of any single model generation, but to build an evaluation framework that is reproducible, comparable, and anchored to production constraints.
1. Separate three capability layers before asking “is it strong?”
Coding-related ability should be split into at least three layers; otherwise scores cannot explain the gap in experience.
The first layer is local completion and single-file edits: syntactically correct, aligned with interfaces, consistent in style. These tasks place relatively low demands on context window and tool use, and most mid-sized models already handle them. They should not be the criterion for declaring a model exceptional.
The second layer is cross-file reasoning and repository-level refactoring: understanding module boundaries, dependency direction, test contracts, and release constraints, and keeping the system compilable and regression-clean after multiple rounds of changes. This layer is closer to an “architect” than a “completer,” and it is where the real production pain sits.
The third layer is agentic long-running tasks: planning, retrieval, execution, verification, and rollback loops that often run for tens of minutes or longer. The model must hold the goal steady while adjusting strategy when failure signals appear, rather than burning quota repeatedly on the same wrong path.
A common mistake in practice is extrapolating layer-three ability from the fluency observed on layer-one tasks. The result is a flashy demo that, once inside a real codebase, produces changes that compile poorly, fail tests, and cannot be rolled back.
2. How to read benchmarks without being misled by a narrow win
Public benchmarks have real value: a unified task statement, horizontal comparability, and exposure of obvious weaknesses. But at least four points deserve attention when interpreting them.
First, whether the task distribution matches your business. Competitive programming, synthetic problems, and legacy system refactoring demand entirely different priors. Similar scores do not mean the same class of errors will decrease.
Second, whether the evaluation protocol allows very high intensity and multi-round tool calls. On the same problem, a single-shot answer and a setting that permits repeated compilation, test runs, and documentation lookups can differ by a full tier. When marketing claims present high-cost-mode results as default capability, everyday experience is systematically overestimated.
Third, whether the benchmark distinguishes “can submit” from “maintainable.” Passing once versus clear naming, reasonable abstraction, and no implicit side effects makes a large difference to the cost of later iterations. Many benchmarks reward only the former.
Fourth, whether the comparison models are aligned on version, temperature, and context truncation strategy. When a small score gap falls within noise, failure case analysis matters more than a ranking poster.
The safer approach: treat public benchmarks as the entry ticket and an internal “golden task set” as the decisive round. Golden tasks should be drawn from real incidents, real refactorings, and real migrations, with fixed repository snapshots and fixed acceptance scripts, and no editing of tasks to chase scores.
3. Repository-level refactoring: a better test of long-horizon thinking than writing functions
To verify whether a model has architecture-level ability, design the following minimal closed loop instead of judging only whether the conversation “sounds human.”
- Provide a medium-sized, production-style repository with tests and documentation, and state the non-functional constraints explicitly: keep old interfaces compatible, do not rewrite unrelated modules on a large scale, and pass the existing regression suite.
- Require the model to first output a change plan: impact surface, risk points, rollback strategy, and test increments, rather than editing files immediately.
- Allow read-only retrieval and build/test tools, but limit blind full rewrites.
- Accept on three criteria: tests green, behavior unchanged, review comprehensible, rather than on the number of generated tokens or a self-declared completion level.
This process exposes several typical failures: premature optimization, breaking implicit conventions, deleting or altering tests to “go green,” losing logging and monitoring points, and simplifying error handling into swallowed exceptions. These rarely show up in single-problem benchmarks, but they erupt together during integration.
For agentic workflows, also observe whether the model attributes a failure to the wrong layer, whether it expands the search scope without restraint, and whether the goal drifts as context grows. These predict weekly cost better than “how many points a score went up.”
4. Where the experience split comes from: protocol, interaction surface, and cost structure
When the developer community is polarized about the same model generation, usually nobody is lying; the evaluation protocol and the usage interface differ.
Under a “fast mode” or dynamic orchestration, a model can parallelize retrieval, compilation, and testing and look like killer productivity. But if tool permissions, diff presentation, and interrupt recovery on the desktop or IDE side are crude, people feel “strong brain, clumsy hands”: the plan reads beautifully, while the actual edits are hard to review, hard to revert, and hard to merge.
Cost structure amplifies the split. High-intensity reasoning and multi-round tool calls can push the cost of a single task to a visibly large number. For individual developers this becomes “usable but reluctant to use”; for enterprises it enters budgeting, quotas, and auditing. An evaluation report that publishes only peak capability, without cost and latency distribution per successful task, packages an unsustainable usage pattern as the default capability.
So a selection table should record, at the same time: success rate, number of human interventions, end-to-end latency, token and tool-call cost, and whether failures are diagnosable. A “strongest” without a cost dimension is usually not reproducible in production.
5. Writing and the “AI feel”: an underrated part of engineering delivery
Beyond code, documentation, change notes, review comments, and incident reports all affect collaboration efficiency. When evaluating writing ability, do not look only at style; look at whether the model invents changes that never happened, states the uncertain as certain, and describes constraints with correct terminology. Explaining a complex system design clearly, without excessive confidence, is itself an engineering capability that lowers communication cost.
For internal standards, fixed templates can constrain output: change summary, risks, test evidence, open questions. However strong the model is, evidence should come before assertions.
6. Practical advice: support evaluation and production with general cloud capabilities instead of orbiting one model
Whatever general-purpose LLM interface you finally choose, the engineering side should decouple the variable parts (model version, reasoning intensity, toolset) from the fixed parts (code, artifacts, logs, permissions). Object storage holds repository snapshots and evaluation artifacts, a container platform pins the build and test environment, a message queue orchestrates long-task state, and logging plus monitoring record every tool call and failure reason. That way, when you switch models or tune parameters, the golden task set stays comparable.
If a team already uses general-purpose categories from Baidu AI Cloud such as object storage, containers, logging, and monitoring, the evaluation pipeline should run under the same isolated accounts and network policies, so evaluation data and production credentials are not mixed. On permissions, keep least privilege: model agents read by default, builds run in a sandbox, and write-back must pass a human or policy gate.
7. Conclusion: turn “breakthrough or toothpaste squeezing” into a falsifiable question
“Absurdly strong” and “coding experience is behind” can both be true at the same time, provided they measure different things. The scientific approach is to define capability in layers, let internal repository tasks outweigh public leaderboards, count cost and interface friction as part of the experience, and use an observable cloud pipeline so conclusions are reproducible. Then the discussion returns from taking sides to engineering decisions: under your constraints, is the extra reasoning intensity worth the price, and worth the human fallback.
