How to Scientifically Evaluate the Programming and Engineering Capabilities of Next-Generation Large Language Models

    This article explains how to evaluate the coding and engineering abilities of new large language models. It recommends defining the task and its constraints before comparing models, breaking programming ability into verifiable tasks, and judging how models plan, use tools, and report failures. It also covers fair, repeatable comparison methods, metrics beyond accuracy such as cost per successful task, security requirements, and a staged path to production use.

    1. Ask the Right Questions When Evaluating a New Model

    Whenever a new generation of large language models appears, technical discussion quickly focuses on one question: is it stronger than other models?

    This question sounds direct, but it lacks the necessary constraints. For developers, “stronger” may mean locating defects more accurately, changing less unrelated code, or completing cross-file refactoring. For enterprises, “stronger” also includes predictable response times, controllable call costs, compliance in handling sensitive data, and the ability to stop and recover in time after a failure.

    Therefore, a reasonable evaluation should not focus only on a single answer generated by a model. It should examine the model’s overall performance under a clear task, fixed resources, and real constraints.

    When several models take part in the same round of testing, rankings should not rest only on the final demonstration results. Different models may use different reasoning budgets, context inputs, tool permissions, and retry counts. If these conditions are inconsistent, the results only reflect performance under each test setup. They cannot be attributed directly to the models themselves.

    Professional evaluation should move from “who won” to three more specific questions:

    1. On which tasks does the model show stable advantages?
    2. How much time, cost, and human supervision do these advantages require?
    3. Are its failure modes identifiable, controllable, and recoverable?

    2. Break Programming Ability into Verifiable Tasks

    1. Code Generation: From “Runs” to “Meets Constraints”

    Generating a simple function only shows that a model has mastered part of the syntax and common patterns. Real development tasks also require input validation, exception handling, coverage of boundary conditions, and compatibility with existing interfaces.

    For example, suppose the requirement is to implement paginated queries. A basic test can check whether the number of returned records is correct. An engineering test should also cover empty data, invalid page numbers, maximum query ranges, sorting stability, and permission filtering. For datasets that change continuously, the paging semantics must be defined clearly, so that results with inherent uncertainty are not mistakenly judged as model errors.

    During evaluation, write the acceptance criteria first, then let the model implement the solution. Do not adjust the scoring standard after seeing the answer. Otherwise, subjective preferences can easily creep into technical conclusions.

    2. Bug Fixing: Focus on the Root Cause, Not Just Passing Tests

    A good fix does more than make the error disappear. It also preserves the original behavior and avoids introducing new regressions.

    One typical task is as follows: a statistics interface returns an exception when given an empty collection. The model needs to locate the problem, fix the implementation, and add corresponding tests. The evaluation should check at least the following:

    • whether the existing tests still pass;
    • whether the new tests actually cover the defect;
    • whether the fix affects other call paths;
    • whether the model deleted assertions, skipped tests, or used other ways to avoid the check;
    • whether the scope of the change matches the size of the problem.

    Be especially wary of “changing tests to make them pass.” Tests can be adjusted when requirements change, but lowering acceptance standards cannot count as fixing a defect.

    3. Cross-File Changes: Testing System Understanding

    Changes in real projects often span several layers. For example, adding a new status to orders may affect the data structure, validation of state transitions, business logic, external interfaces, and test cases at the same time.

    This type of task tests whether a model can build dependency relationships rather than only completing code within a single file. Evaluation should focus on whether the change is complete, whether naming is consistent, whether the call chain is connected end to end, and whether existing compatibility requirements are preserved.

    When persistent data is involved, also check the upgrade and rollback paths. Code that runs in a new environment does not mean existing data can be migrated safely.

    3. Judge Complex Task Execution by More Than the Final Answer

    When a model completes a task with tools, the process usually includes understanding requirements, retrieving information, making a plan, executing actions, checking results, and correcting errors. The final answer is only the last step of this process.

    1. Planning Should Serve Execution

    A good plan breaks a large task into small steps that can be verified, with clear inputs, outputs, and dependencies. A plan does not need to be long. What matters more is whether it reduces unnecessary operations.

    For example, before modifying a project, the model should read the relevant documentation and key implementations, and then run the necessary baseline checks. If a model rewrites large parts of the code without understanding the current state, even an eventual success shows that its execution strategy carries high risk.

    2. Tool Use Needs Boundaries

    Tool use ability should not be measured by the number of calls. Meaningless repeated searches, repeated reading of the same content, or modifying many files without evidence all increase cost and the probability of failure.

    Record whether the model chose the necessary tools, whether it understood the tool outputs, and whether it took reasonable alternatives when it encountered insufficient permissions, execution failures, or missing information.

    For high-risk operations such as deleting data, changing permissions, or publishing changes, the evaluation environment should include approval or blocking mechanisms. A model’s proposed operation should not be allowed by default.

    3. Identifying and Reporting Failures

    A reliable model should distinguish between “verified,” “inferred,” and “not yet confirmed.” If the test environment is unavailable, it must not claim that all tests passed. If only part of the changes were completed, it must not describe the task as fully finished.

    Therefore, the accuracy of failure reports is itself an important metric. Honestly stating limitations usually has more engineering value than producing a delivery note that looks complete but has not been verified.

    4. Build a Fair and Reproducible Comparison Process

    1. Fix Tasks and Input Materials

    All models in the evaluation should receive the same requirements, project snapshot, and necessary background. If one model receives extra design documents or hints about the error location, the results are no longer directly comparable.

    The task set should also cover different difficulty levels and types, so that it does not only include problems that one model handles well. Tasks can be organized into categories such as small implementations, defect localization, cross-file changes, test supplementation, and security review.

    Task sources should be close to real work, but sensitive information must be removed. For problems that may already be widely public, consider how model memorization may affect results, and add independently constructed variants and hidden tests.

    2. Distinguish Two Comparison Standards

    The first is standardized comparison. Keep context materials, tool permissions, execution budgets, and retry rules as consistent as possible, so that differences between models under similar conditions can be observed.

    The second is deployment comparison. Allow each model to use its own reasonable runtime configuration, but fully record resource consumption to judge actual usefulness.

    Both standards are valid, but they should not be mixed. If a setup achieves a higher success rate by taking longer, that does not mean it still leads under the same latency requirement.

    3. Keep Process Records and Repeat Tests

    Generation has randomness, so a single success or failure is not enough to show overall performance. Important tasks should be run repeatedly, with records of success rate, variation range, and typical failure causes.

    The evaluation should also keep inputs, outputs, execution steps, code diffs, and test results for review. During human review, the model source can be hidden to reduce preconceptions.

    For small-sample results, do not exaggerate small gaps. If the difference between two approaches cannot rule out sampling variation, the safer conclusion is that the current tests did not confirm a clear advantage.

    5. Metrics: Beyond Accuracy, Look at Engineering Cost

    1. Task Completion Rate

    Task completion should be based on independent acceptance, not on the model’s own claim of completion. For complex tasks, partial completion scores can be used, but the rules must be defined in advance.

    Test pass rate and task completion rate also need to be distinguished. Tests only cover requirements that have been coded. Performance, security, or compatibility issues that are not covered may still exist.

    2. Regression Risk and Change Quality

    Check whether a change introduces new failures, modifies unrelated files, or uses implementations that are hard to maintain. The number of changed lines can be a supporting signal, but fewer is not always better. Some correct fixes do require structural adjustments.

    A more reasonable principle is that the scope of change should match the task requirements, and each key modification should be explainable in terms of why it is needed.

    3. Latency and