Evaluating Large Language Model Coding Ability: From Demos to Engineering Validation

    A reliable evaluation of AI coding systems must go beyond code generation speed and visual demonstrations. This article presents a practical framework for assessing requirement understanding, local implementation, debugging, change control, build and test verification, algorithmic correctness, reproducibility, and the accuracy of completion reports. The central principle is simple: engineering trust must be built on observable evidence rather than claims of completion.

    1. Distinguish “Can Generate” from “Can Deliver”

    Large language models can quickly generate interfaces, interaction components, and business logic. However, these capabilities do not automatically translate into engineering delivery.

    Code that looks complete may not compile. A page that opens may still contain broken interactions. A training curve that gradually stabilizes does not necessarily mean that the algorithm has learned an effective policy.

    Coding ability should therefore be evaluated at three levels:

    1. Expression ability: Can the model understand the requirements, propose an implementation approach, and generate well-structured code?
    2. Local implementation ability: Can a function, page, or independent module satisfy its stated requirements?
    3. Engineering closure: Can the model modify an existing codebase, diagnose real errors, validate the result, and control the risk of its changes?

    Routine demonstrations usually highlight the first two levels. In real projects, developers need the third. In codebases with existing dependencies, complex type constraints, and historical code, productivity is determined less by the speed of the first generation than by the ability to locate and recover from failures.

    A single failed task does not prove that a type of model is unusable in every scenario. Likewise, several visually impressive examples do not prove that a model has stable engineering capabilities. Conclusions should always be limited to the specific task, runtime environment, and acceptance criteria.

    2. Turn Requirements into Acceptance Criteria Before Measuring Speed

    “Implement the feature according to the plan” sounds clear, but a plan that only describes development actions does not define how completion will be verified. A model may interpret “the files have been modified” as “the task is finished.”

    For example, “add maze training” may include all of the following requirements:

    • The map can be generated and displayed correctly.
    • The agent can perform only legal actions.
    • Environment state updates are consistent with the rendered output.
    • Training can be started, paused, and reset.
    • The trained policy can reach the target during evaluation.
    • Invalid input does not make the page unresponsive.

    A single screenshot cannot prove all of these requirements.

    A more reliable approach is to create an acceptance matrix before coding:

    Validation level Key question Typical evidence
    Build validation Can the modified code be built successfully? Build result and error logs
    Unit validation Does local logic satisfy its constraints? Assertions and boundary cases
    Integration validation Do modules work together correctly? State transitions and interface tests
    Interaction validation Can users complete critical operations? Reproducible interaction paths
    Outcome validation Does the feature achieve its business goal? Metrics, outputs, and acceptance records

    For multi-step tasks, each step should define its prerequisites, permitted modification scope, and pass criteria. Progress should then be confirmed by observable results rather than announced by the model.

    3. Do Not Treat “Environment Issue” as the Default Explanation for Build Failures

    A common failure mode in AI-assisted programming is attributing a build failure to caches, dependencies, or the environment without sufficient evidence.

    Build failures may result from syntax errors, type mismatches, interface changes, incorrect module references, missing dependencies, stale generated files, or inconsistent toolchain configuration. Each cause requires a different response. Clearing build artifacts is not a universal solution.

    3.1 Inspect the Error Before Forming a Hypothesis

    A reasonable troubleshooting sequence is:

    1. Read the complete diagnostic output and locate the earliest error with the greatest explanatory value.
    2. Check whether the reported location is related to recent changes.
    3. Compare function signatures, type definitions, and call relationships.
    4. Create a minimal reproduction when necessary.
    5. Investigate cache or environment consistency only when there is evidence to support that hypothesis.

    The focus should be on the most explanatory error, not merely the first line in the log. Some errors are cascading effects caused by an upstream problem. Fixing the root cause may eliminate several downstream errors at once.

    3.2 Revalidate Immediately After Cleaning

    Cleaning build artifacts is a diagnostic action, not proof that the problem has been fixed. After cleaning, rerun the same build that originally failed and compare the results.

    If development continues without rebuilding, new changes are added on top of an unknown state. When another problem appears, it becomes difficult to distinguish the original error from a side effect of the attempted fix or a defect in the new feature.

    3.3 Allow the Model to Report Uncertainty

    A high-quality diagnosis might say:

    The current logs show that a type constraint is not satisfied. There is not yet evidence of a cache problem, so the related definitions should be checked first.

    This is more useful than an unsupported explanation. A reliable assistant should distinguish observed facts, hypotheses that still need verification, and conclusions that have already been confirmed.

    4. Avoid Aimless Changes: Give Every Fix a Causal Basis

    When a model cannot identify the root cause, it may modify several files repeatedly until it finds a combination that happens to run. This is inefficient, expands the review scope, and can damage logic that was previously correct.

    An effective repair process should form a short loop:

    Form a hypothesis → make the smallest change → run validation → compare the result → keep or revert the change.

    For example, if a coordinate conversion error is suspected of causing a character and map to become misaligned, inspect the conversion function first. Do not simultaneously change the character size, map layout, camera position, and collision rules. When multiple variables change at once, even a temporary improvement does not reveal the true cause.

    For complex tasks, consider applying these constraints:

    • Each modification cycle should focus on one clearly defined problem.
    • Do not refactor unrelated modules as a side effect.
    • Do not delete tests or weaken assertions merely to obtain a passing result.
    • After repeated failures, reassess the diagnosis instead of endlessly expanding the change set.
    • Preserve stable intermediate versions so that changes can be rolled back.

    The number of modified lines can indicate risk, but it cannot independently measure quality. Necessary structural changes may involve a large diff. The important questions are whether the scope matches the task and whether every change has a clear reason.

    5. Visual Polish Is Only the Entry Point; Functional Correctness Comes First

    Lighting, particles, gradients, and three-dimensional effects create an immediate impression, but they have no necessary relationship to program correctness. Visual applications especially need to avoid a situation in which the presentation layer is complete while the underlying rules are missing.

    5.1 Interactive Puzzles: A Clean Layout Does Not Prove Correct Rules

    A sliding puzzle may look polished while still allowing illegal moves, using an incorrect win condition, or starting from an unsolvable state.

    Evaluation should check whether legal actions are strictly constrained, state changes can be traced, reset restores the complete state, and the initial layout is solvable under the rules being used.

    If the requirements include a particular visual style, that style should be decomposed into observable features such as color, texture, edge treatment, and spatial whitespace. Mentioning a style name in a plan does not mean that the final interface implements it.

    5.2 Physics-Based Interaction: Having the Objects Does Not Prove Realistic Motion

    In a scene where balls collide with targets, generating the balls, targets, and play area is only the first step. Object spacing, collider dimensions, initial velocity, friction, and restitution all affect the result.

    Key checks include:

    • Whether visible models match their colliders.
    • Whether the initial arrangement follows the scene rules.
    • Whether normal operations produce reasonable outcomes.
    • Whether tunneling, abnormal bouncing, or endless motion occurs.
    • Whether brightness and contrast are sufficient for interaction.

    A single unsuccessful operation should not automatically be classified as a physics defect. The initial conditions and task rules must also be considered.

    6. Validate Algorithm, State, and Rendering Separately in Maze Learning Tasks

    A maze reinforcement learning demo may appear small, but it combines environment modeling, policy updates, animation scheduling, and coordinate mapping. It is therefore useful for exposing consistency problems across modules.

    6.1 State Transitions Should Run Independently of Rendering

    The environment should explicitly define state, actions, rewards, and termination conditions. Training and evaluation should still work with rendering disabled.

    A possible logical structure is:

    1. step(current_position, action):
    2. calculate candidate_position
    3. if candidate_position is out of bounds or is an obstacle:
    4. keep the original position
    5. return the corresponding reward and a non-terminal flag
    6. if candidate_position is the target:
    7. return the new position, target reward, and a terminal flag
    8. return the new position, ordinary movement reward, and a non-terminal flag

    The purpose of this structure is not to prescribe a specific implementation. It makes the rules independently testable and prevents an animated position from being mistaken for the actual environment state.

    6.2 Use a Unified Coordinate Transformation

    Maps commonly use row and column coordinates, while rendered scenes use pixel or spatial coordinates. Mixing the two can misalign the character and terrain.

    For a two-dimensional grid, one consistent transformation can be expressed as:

    1. horizontal_position = left_offset + (column_index + 0.5) × cell_width
    2. vertical_position = top_offset + (row_index + 0.5) × cell_height

    The character, target, path, and numeric labels should all use the same transformation logic. When the canvas is resized or scaled, all layers should be updated consistently rather than corrected separately.

    6.3 Numerical Stability Does Not Equal an Effective Policy

    Table-based action-value learning typically updates action values according to the current reward and the estimated value of the next state. Results depend on the learning rate, discount factor, exploration strategy, reward design, and training coverage.

    A gradual reduction in value changes only shows that a type of numerical change is stabilizing. It does not independently prove that the policy succeeds. Evaluation should also consider:

    • The success rate of reaching the target with exploration disabled.
    • The number of steps required to complete the task.
    • Whether the agent repeatedly visits the same position.
    • The proportion of runs that reach the step limit.
    • Whether results remain stable across different random seeds.

    For terminal states, the implementation should explicitly stop estimating future returns. Incorrect terminal-state handling can make the curve appear normal while causing the policy to move away from the target.

    7. Build a Reproducible Evaluation Process for AI-Assisted Programming

    7.1 Fix the Inputs and Environment

    Record the starting code version, requirement description, dependency state, accessible resources, and tool permissions. If human prompts or interventions are allowed, record their number and content as well. Human correction is part of the total completion cost.

    7.2 Record Quality, Cost, and Risk Together

    Generation speed alone is not sufficient. Also record:

    • Whether the first build passes.
    • Whether the final acceptance criteria pass.
    • The number of manual corrections.
    • Total time from task start to acceptance.
    • The number of unrelated changes.
    • Regressions introduced during repair.
    • Whether the completion report matches the actual validation results.

    “Claimed completion without verification” should be tracked separately. It affects not only code quality but also trust in collaboration.

    7.3 Use Multiple Task Categories

    A task set should cover local function implementation, modification of existing modules, cross-module integration, fault diagnosis, interface interaction, and algorithm validation. When tasks are repeated, retain failed samples instead of showing only the best results.

    7.4 Require Evidence in Completion Reports

    A valid delivery report should state what was completed, which modules were changed, which validations were run, which checks failed, and what limitations remain.

    The following are four different states and should not be conflated:

    • The code has been modified.
    • The build has passed.
    • The tests have passed.
    • Business acceptance has been completed.

    8. The Core of Engineering Practice: Build Trust on Verification

    The most important capability of an AI coding system is not simply generation speed or visual polish. It is whether the system can form a complete loop involving requirement understanding, error attribution, disciplined changes, validation, and accurate reporting.

    For developers, a practical division of responsibility is to let the model propose implementations and repairs while the build system, tests, and acceptance criteria determine whether the result is correct. For teams, permission controls, change reviews, log retention, and rollback mechanisms should be part of the workflow.

    Reliable AI-assisted programming is not about generating a large amount of code in one attempt. It is about continuing to work from evidence after a failure: locating the problem, narrowing the scope, completing the repair, and proving through reproducible results that the task is actually complete.