From Generation to Verification: A Practical Guide to Evaluating LLM Coding and Reasoning Skills

    This guide explains how to evaluate large language models on coding and reasoning tasks in a rigorous, reproducible way. It covers designing evaluation protocols, decomposing requirements into acceptance criteria, and testing three representative tasks: a 2D fighting game prototype, river-crossing constraint puzzles, and 3D voxel world generation. It also outlines a layered approach to verifying fixes and turning generation capability into deliverable engineering results.

    1. Don’t Judge a Model Only by Its First Impressive Output

    When evaluating an LLM’s coding and reasoning abilities, two biases commonly appear: being impressed by polished visuals and complex code while overlooking incorrect fundamental interactions, or seizing on a single mistake and dismissing the model’s value across all tasks.

    A better approach is to break capability into several interrelated but distinct dimensions:

    • Requirement understanding: whether the model identifies explicit requirements and hidden conditions that need clarification.
    • Logical planning: whether it establishes correct rules, states, and execution order.
    • Code implementation: whether it produces runnable, well-structured programs.
    • Constraint maintenance: whether it omits, confuses, or breaks existing functionality when there are many requirements.
    • Issue fixing: whether it can locate the cause and make effective changes after receiving feedback.
    • Engineering delivery: whether the result is easy to maintain, test, and extend.

    A 2D fighting game, a river-crossing puzzle, and a 3D voxel scene each emphasize different abilities. The game focuses on implementing interactive systems, the puzzle on state-based reasoning, and the voxel scene on spatial computation and resource management. Analyzing these tasks together is more valuable than simply comparing response length or visual polish.

    Note that if the output omits requirements, the only honest conclusion is “constraint adherence was insufficient.” Without further experiments and internal evidence, it should not be attributed to the model’s attention mechanism.

    2. Establish an Evaluation Protocol Before Running Tasks

    Without uniform test conditions, even multiple results are hard to compare meaningfully.

    1. Define input boundaries

    Coding tasks should specify the deliverable form, runtime environment, allowed dependencies, and resource limits. For example:

    Implement a single-file 2D fighting game prototype that runs in a browser. Draw characters and scenes programmatically without external images. Support movement, normal attacks, blocking, double jump, dodging, and five elemental skill types, plus observable enemy behavior and a restart function.

    This is still a complex request, but it at least clarifies the scope of a “prototype” and prevents a full commercial game from being the implicit acceptance bar.

    For reasoning tasks, specify whether executing code, performing searches, or calling external tools is allowed. Tool-free reasoning and solving with a program are different test conditions and must not be mixed.

    2. Convert requirements into acceptance criteria

    “Complete mechanics,” “beautiful graphics,” and “rich features” are too subjective and must be decomposed further.

    Test direction Checkable acceptance criteria
    Input control Directional keys are correct; combined inputs don’t cause abnormal states
    Combat logic Hits, blocks, invincibility frames, and resource consumption are consistent
    Constraint reasoning Every move is legal; both riverbanks always satisfy safety conditions
    3D interaction Orientation, jumping, block selection, and placement results are correct
    Performance stability Long runs don’t accumulate unused resources
    Fix quality Original problem solved; existing features show no regressions

    Acceptance criteria should be defined before generation. Otherwise, it’s tempting to lower or change standards after seeing the output.

    3. Use repeated testing rather than a single verdict

    Generation output varies. One success only proves the task was completed under one particular condition, and one failure doesn’t characterize all cases.

    In practice, record the task version, runtime conditions, number of attempts, number of successes, number of fix rounds, and failure types. For pass rates derived from a small number of trials, call it “the pass rate within this sample” rather than a stable overall accuracy.

    3. 2D Fighting Game: Focus on a Closed-Loop Combat System

    A fighting game tests whether a model can organize multiple features into a coherent system. Characters moving and skill effects appearing on screen do not mean the combat mechanics actually work.

    1. Use a state machine to unify character behavior

    Characters typically have states such as idle, moving, jumping, falling, attacking, blocking, dodging, taking damage, and dying. The key is not the number of states but whether transition rules are well defined.

    For example:

    • The dead state must not trigger attacks.
    • Whether dodging can interrupt a normal attack must be defined in advance.
    • Whether blocking depletes stamina or causes brief stun after being hit must be specified.
    • Whether airborne characters can block or cast skills should follow consistent rules.
    • Whether a character can be hit again immediately after taking damage needs explicit handling.

    If these behaviors are written as unrelated key-press handlers, conflicts such as “attacking while dead” or “still taking damage while dodging” easily appear. A safer approach is to determine state transitions first, then implement animations and effects.

    2. Double jump requires complete reset conditions

    A double jump is not simply adding another upward velocity while airborne. At minimum, the implementation must handle:

    1. Whether the character is currently grounded.
    2. How many jumps have been used.
    3. Whether the key press is a new trigger rather than being held down.
    4. Whether the count resets correctly on landing.
    5. How vertical velocity is handled when hitting an overhead obstacle.

    Especially test holding the jump key. If the program treats every frame of a held key as a new jump request, the character may jump repeatedly or instantly consume both jump opportunities.

    3. Elemental skills should reflect rule differences

    Five elemental skills should not just be the same attack in different colors. Differences can come from shared mechanics:

    • Wind skills emphasize knockback and repositioning.
    • Earth skills emphasize barriers or brief defense.
    • Water skills emphasize slowing and recovery.
    • Fire skills emphasize damage over time or area denial.
    • Lightning skills emphasize fast hits or brief control.

    These are design examples; the actual rules should be specified in the requirements. Each skill must also define range, cooldown, resource cost, duration, and stacking rules, otherwise correct implementation cannot be verified.

    4. Enemy behavior must be explainable

    An enemy chasing the player is only basic movement logic. A testable enemy AI should decide to approach, attack, defend, or retreat based on distance, attack cooldown, its own state, and the player’s actions.

    During development, display the enemy’s current state on screen. This lets testers verify that the enemy follows rules rather than mistaking coincidental behavior for complex strategy.

    The value of a river-crossing puzzle lies in testing whether a model can maintain multiple constraints simultaneously. A lengthy explanation doesn’t guarantee correctness; what matters is whether every step produces a valid state.

    1. First eliminate ambiguity in the problem statement

    Common ambiguities include:

    • Whether animals count toward the boat’s capacity.
    • Whether capacity is measured in people or all passengers.
    • Whether danger rules apply on the boat.
    • Whether dangerous pairs trigger immediately or only when unsupervised.
    • Who is qualified to row.

    These conditions affect whether a solution exists and how long it is. If the model doesn’t state its assumptions and jumps straight to steps, the sequence may look plausible but solve a different problem.

    2. Represent each riverbank as a set

    Let all participants form a set, with each participant located on the left or right bank, and the boat also on one bank. A move must satisfy:

    • All passengers are on the same bank as the boat.
    • The number of passengers doesn’t exceed capacity.
    • At least one passenger is qualified to row.
    • Neither bank contains a forbidden combination after the move.
    • If the problem states that safety constraints also apply on the boat, the passenger combination must be checked there too.

    When the puzzle involves a father, mother, sons, daughters, elders, and animals, encapsulate safety checks in a function rather than scattering them through explanatory text.

    Illustrative logic:

    1. safety_check(bank_members):
    2. if mother absent and father present with any daughter:
    3. return unsafe
    4. if father absent and mother present with any son:
    5. return unsafe
    6. if elder absent and animal present with any family member:
    7. return unsafe
    8. return safe

    These rules must be based on the clarified problem statement. Details such as “which family members the animal can harm” should be defined before coding.

    3. Separate solving from verification

    For a finite-state problem, breadth-first search can enumerate legal moves. When each crossing has equal cost, BFS finds the legal path with the fewest crossings.

    Even when evaluating the model’s tool-free reasoning, an independent verifier can be used at evaluation time to check its answer. There’s no contradiction: the model doesn’t use tools during generation, and the evaluator subsequently judges its output with a program.

    The verifier should execute the model’s step sequence and report the first violation’s specific cause. This distinguishes:

    • Boat capacity misjudged.
    • Rowing qualification ignored.
    • Only one bank checked while the other was neglected.
    • All intermediate steps legal, but not everyone reaches the target bank at the end.
    • The textual description doesn’t match the actual passengers.

    This kind of classification is more useful for understanding a model’s weaknesses than a simple “wrong answer.”

    5. 3D Voxel Scene: Verify Coordinates Before Adding Visual Complexity

    3D voxel scenes easily create a false sense of completion, but fundamental spatial logic errors directly break playability. Prioritize testing movement, collision, and block interaction before adding weather, lighting, and distant terrain.

    1. Forward/backward errors usually come from inconsistent coordinate conventions

    A 3D program simultaneously involves world coordinates, camera orientation, and character movement direction. If different modules define “forward” differently, pressing forward may move the character backward.

    A more reliable approach is to unify coordinate conventions: compute the horizontal forward vector from the camera orientation, then combine it with the right vector to produce the movement direction. Combined inputs should also be normalized so diagonal movement isn’t faster than straight movement.

    The point isn’t to flip a particular sign but to ensure rendering, camera, and controls all use the same spatial convention.

    2. Jumping and flying must not share vague logic

    Normal jumping requires gravity, vertical velocity, ground detection, and collision correction. If ground detection is too strict, the character may stand on the ground but be unable to jump; too loose, and it can jump repeatedly in mid-air.

    Flying mode needs explicit mode switching, ascend/descend inputs, and gravity handling. When exiting flight, normal movement state must be restored and the character checked to see whether it is inside a solid object. Simply adding up/down keys does not constitute a reliable flight system.

    3. Block operations depend on accurate hit information

    Breaking and placing typically require spatial raycasting along the view direction:

    • Breaking acts on the block that was hit.
    • Placing acts on the grid cell adjacent to the hit face’s outward normal.
    • Interaction range should be limited.
    • A new block must not overlap the player’s collision volume.
    • After placement, the affected chunk’s visible surfaces must be updated.

    Without distance and collision checks, players could manipulate distant blocks through obstacles or seal themselves inside solid geometry.

    4. “Infinite terrain” should be understood as on-demand generation

    A real program cannot simultaneously hold an unlimited amount of terrain. “Infinite” usually means continuously generating nearby regions as the player moves and unloading regions far away.

    Key mechanisms include:

    • Use a fixed seed so terrain is reproducibly generated.
    • Organize data and render objects by chunks.
    • Limit generation tasks per frame to avoid spikes of computation causing stutter.
    • Don’t render inner faces fully occluded by adjacent solids.
    • Release resources no longer needed when unloading regions.
    • If terrain editing is allowed, save modification records; otherwise changes will be lost on regeneration.

    Therefore, evaluation shouldn’t only look at the area around spawn. Continuously move around, return to previously visited regions, and repeat block edits to check whether resources and state remain stable.

    6. Fix Testing: Determining Whether the Model Truly Understands the Problem

    When feedback such as “wrong direction, can’t jump, add textures and weather” arrives, asking the model to fix everything at once tends to introduce new omissions. A layered approach is more effective.

    Layer 1: Fix blocking issues

    Prioritize failures to start, non-responsive input, broken collisions, and basic direction errors. Don’t add new features at this stage, so it’s clear whether the fix worked.

    Layer 2: Restore feature consistency

    Verify state transitions, resource consumption, chunk updates, and mode switching. When fixing one feature, run related regression tests at the same time.

    Layer 3: Add presentation and performance optimizations

    Only after the core mechanics are stable should lighting, weather, day/night cycles, and richer textures be added. Otherwise visual complexity masks problems and makes them harder to locate.

    Feedback should include reproduction steps, expected behavior, and actual behavior. For example:

    When the character stands on flat ground, pressing the jump key once does not trigger a jump; holding it also does nothing. Expected: one upward velocity impulse should trigger while grounded. Please check input triggering, ground detection, and vertical velocity update, while keeping the already-tested movement features intact.

    This is far more likely to produce a verifiable fix than a vague “please optimize this.”

    7. Produce Reproducible Evaluation Conclusions

    A final report shouldn’t be just a single score; it should present task-level evidence:

    • Which requirements were met on first generation.
    • Which errors were resolved through fixes.
    • Whether fixes broke existing functionality.
    • Which conclusions come from actual execution versus code review only.
    • How many samples were tested and which edge cases they covered.

    For enterprise use, also check the generated code’s input handling, resource boundaries, dependency management, and maintenance cost. A runnable demo prototype is not equivalent to production-ready code, and passing short-term tests doesn’t guarantee long-term reliability.

    The core of evaluating large models is not finding a label like “strongest at all tasks,” but clarifying under which constraints it can reliably accomplish which work. Connecting requirement decomposition, state validation, runtime testing, and regression checking is what turns generation capability into deliverable engineering results.