Evaluating the Coding Ability of Large Language Models: Evolution and Practice

    Public leaderboards are losing their value for choosing a coding model because of score saturation, data contamination, and flawed evaluation harnesses. This article maps the three generations of code benchmarks, explains how to read a comparison table, and outlines how to build a private, reproducible evaluation set from your own repositories, with layered quality and cost metrics integrated into CI.

    1. The Evaluation Dilemma: Why a High Score No Longer Means High Capability

    When a team introduces large language models into the development workflow, the first question is usually whether the model can actually code. Most people check public leaderboards, but those leaderboards are becoming unreliable for three reasons.

    The first is score saturation. Mainstream code evaluations generally cover three task types: fixing defects in real repositories, long-chain multi-file refactoring, and command execution in a terminal environment. After several rounds of iteration, most general-purpose models now score above 80 on classic defect-fixing benchmarks. The spread has narrowed, so the leaderboard can no longer support model selection decisions.

    The second is data contamination. Evaluation samples come from historical commits in public repositories, and that content has most likely already entered the model’s training corpus. The model may “remember the answer” rather than “understand the problem,” which inflates scores.

    The third is evaluation harness defects. When test pass rate is the only criterion, some test cases misjudge correct solutions, and some results are unstable or not reproducible. Vaguely described samples amplify the noise further. For these reasons, the industry has started to retire early classic benchmarks as core standards and shift to newer, harder alternatives.

    2. The Capability Coordinates of Three Benchmark Generations

    Existing evaluations can be understood as three generations of evolution:

    • First generation: defect fixing in a single repository for a single issue, with a small sample size (on the order of a few hundred entries). After manual cleaning, it became a long-standing general standard. It tests whether the model can “read the problem and make the tests pass.”
    • Second generation: high-difficulty engineering refactoring. Public subsets and isolated subsets with strong copyright licensing reduce contamination risk. The task threshold is significantly higher—for example, a single change must touch at least ten lines of code, and a substantial portion of tasks require changes of over a hundred lines, making cross-file and cross-module reasoning mandatory. Most models currently score below 60, and leading models are only slightly above that line.
    • Third generation: agentic tasks in a terminal and command-line environment. These assess the full loop of locating, executing, verifying, and self-correcting in a real shell, emphasizing process capability rather than a single patch.

    The relationship among the three is not replacement but layering: the first generation shows whether the baseline is acceptable, the second shows the ceiling for complex engineering, and the third shows whether the model can truly take over an end-to-end workflow.

    3. How to Read a Comparison Table

    For a side-by-side comparison from a third party, break it down in four steps:

    1. Check the benchmark version and sample size. Confirm whether manual cleaning was done and whether an isolated subset exists.
    2. Check the scoring criteria: “all tests pass” or “partial pass,” and whether multiple attempts are allowed.
    3. Check the task size distribution. A ten-line change and a hundred-line change carry completely different weight.
    4. Check the inference budget. The same model can differ significantly under different thinking lengths and different tool permissions.

    The conclusion: on second-generation high-difficulty benchmarks, the gap between models from different vendors is often only single digits, with an individual leading solution possibly ahead by 5–10 points. In terminal tasks, the difference shows up more in execution strategy and correction efficiency than in raw code generation quality. Treating a single-digit gap as the sole basis for selection is a common misjudgment.

    4. A Practical Path to Building an In-House Evaluation

    Public leaderboards are only good for initial screening. What is truly reliable is a private evaluation set that is isomorphic with your own codebase.

    Step 1: Sample real tasks. Extract triples of “issue description + pre-fix version + test cases” from historical commits in internal repositories, covering defect fixing, dependency upgrades, API migration, script automation, and other types.

    Step 2: Apply quality governance. Remove samples with unclear descriptions, unstable test cases, or dependencies on the external environment. Pin the runtime environment for each sample to guarantee reproducibility.

    Step 3: Design layered metrics. In addition to pass rate, add change size, number of files touched, regression introduction rate, average elapsed time, and token cost, forming a two-dimensional quality–cost view.

    A schematic evaluation main loop looks like this:

    1. def evaluate(model, task, max_turns=12):
    2. workspace = prepare(task.repo_snapshot) # Pin the environment to guarantee reproducibility
    3. for _ in range(max_turns):
    4. action = model.plan(task.issue, workspace.diff())
    5. result = workspace.apply(action) # Apply the patch or run the command
    6. if result.tests_passed():
    7. return score(task, workspace, passed=True)
    8. return score(task, workspace, passed=False)

    Step 4: Incorporate engineering constraints. Real development also requires minimal patches, no violation of existing conventions, and passing static checks and security scans. These should be admission gates rather than bonus points.

    5. Recommendations for Adoption

    • Use first-generation benchmarks to check the “pass line,” second-generation benchmarks to judge the ceiling for complex refactoring, and terminal benchmarks to verify the automation loop.
    • Put the evaluation set into continuous integration so that any model or prompt change triggers a regression run, instead of a one-time acceptance check.
    • Watch cost and latency. At the same pass rate, prefer the solution with smaller changes and fewer turns.
    • Keep humans in the loop: let the model handle localization and the first draft, and let people handle review and merge.

    Overall, the value of evaluation is not to produce a ranking but to turn “can we use it” into measurable, reproducible, and continuously trackable engineering metrics. Once a team has a private benchmark close to its own codebase, the subtle differences between models stop mattering. What matters is which solution has the lowest total cost and the most stable delivery under your constraints.