Evaluating Coding LLMs: Capability, Constraint Adherence, and Reliability
A convincing code demo does not establish that a model can reliably deliver working software. This article presents three practical tests—an interactive fighting game, a constrained river-crossing puzzle, and a single-file 3D block world—to evaluate instruction coverage, reasoning, and engineering trade-offs. It also outlines a repeatable evaluation workflow using independent samples, automated checks, one targeted repair round, and evidence-based acceptance criteria.
Coding large language models are easy to overestimate after a single demonstration. A model may quickly produce a well-structured page with a polished interface, animations, and basic interactions. That does not mean it has consistently understood the requirements, preserved every constraint, or maintained system-wide consistency through subsequent changes.
For engineering teams, the important question is not simply whether a model can write code. It is whether its success rate, rework cost, and failure modes are acceptable when external tools are unavailable, all requirements are supplied upfront, and the result must run as delivered.
This article organizes common frontend and reasoning tasks into three stress tests: an interactive program built around a state machine, a planning puzzle with exclusion constraints, and single-file 3D scene generation. These test instruction coverage, symbolic reasoning, and engineering trade-offs, respectively. They are better suited to pre-deployment acceptance checks than subjective ratings based on impressive demos.
Define What Counts as Deliverable
A satisfactory output should meet at least four conditions:
- Every explicit feature has a corresponding implementation, rather than only the requirements near the beginning of the prompt.
- Critical interactions work with default inputs, without requiring the evaluator to modify the code.
- Local rules remain consistent with one another. Movement direction, collision handling, and skill cooldowns must all work together.
- Basic performance is considered even under output-length or single-file constraints, rather than relying on unbounded memory allocation or repeated computation.
Use fixed prompts, a fixed runtime environment, and fixed success criteria. Generate several independent outputs for each task. Reports should include success rates, common failure categories, and defects remaining after one repair round—not just a screenshot.
Task 1: An Interactive Fighting Game
A single-page fighting game is a useful instruction-following test because it combines many mechanics in one state machine: blocking, basic attacks, double jumping, dodging, multiple elemental skills, enemy behavior, and a traversable environment.
Characters can use simple shapes to keep visual preferences from distracting from the mechanics.
Do not judge the output only by whether it looks like a game. Check each requirement:
- Consistent input mapping. A key should have predictable behavior on the ground, in the air, during hit stun, and while a skill is being executed.
- Mutually exclusive states. Blocking should not simultaneously allow a full basic attack to resolve. Dodging should provide invulnerability frames or displacement, not merely switch to an animation with a different name.
- Distinct skills. Elemental skills that differ only in color should count as missing mechanics. They should differ in at least damage, range, crowd control, or cooldown.
- State-based enemy decisions. Enemies should respond to observable conditions such as distance, player hit stun, and their own health, rather than attack randomly on a timer.
- Gameplay-relevant environments and camera behavior. A camera that follows the player, platforms at different heights, and boundary constraints reveal more than decorative scenery alone.
A common failure is checklist-style implementation: all the expected function names exist, but the jump counter never resets, collision boxes drift away from rendered positions, or skill bindings override movement keys.
This suggests strong local code generation without a consistent global gameplay specification. In a follow-up test, ask the model to make incremental changes based on the defect list. Then check for regressions—for example, whether fixing double jumping breaks blocking.
Task 2: A River-Crossing Puzzle Without Tools
The second task tests planning rather than coding style.
A typical puzzle involves several family members and an animal crossing a river. The boat has a capacity limit, only certain people can row, and some combinations are unsafe when a particular person is absent. The number of participants and the restrictions can vary, but the puzzle must have a legal solution and explicitly prohibit external solvers.
Score the following separately:
- Whether the model correctly identifies all participants, boat capacity, and restrictions, including who can row.
- Whether every step specifies the occupants of both banks, the boat passengers, and the rower.
- Whether intermediate states obey the restrictions, rather than merely ending in the correct configuration.
- Whether anyone is duplicated, disappears, or appears on both banks at once.
- The success rate across independent samples, and whether errors repeatedly involve the same restriction.
Fluent prose should not earn a high score. If an explanation sounds plausible but sends someone who cannot row back alone, the solution has failed.
A more verifiable format is a state table with columns for the left bank, boat occupants, right bank, and validation result for each step. A human reviewer or script can then check the restrictions directly, without being distracted by a lengthy explanation.
These puzzles often reveal a contrast: a model may look capable in open-ended code generation but overlook a condition introduced late in the prompt or forget that someone must row the boat back.
This is less a knowledge problem than a failure to retain constraints and validate each step. Teams working with scheduling, permission matrices, or mutually exclusive resources should not make adoption decisions based solely on coding demos.
Task 3: A Single-File 3D Block World
The third task evaluates engineering completeness.
Require an interactive block world within one page, including procedural terrain and trees, block placement and destruction, simple creatures or moving objects, and basic lighting. Rendering can use a general-purpose browser 3D API without tying the task to a particular framework.
The first round should prioritize controls and physics over texture quality:
- Forward, backward, left, and right movement must match the camera orientation. Forward and backward inputs must not be reversed.
- Jumping must obey gravity and reliably return the player to the ground, rather than accumulate velocity until the player leaves the scene.
- Placement and destruction must affect the block under the crosshair, not a fixed coordinate.
- Collision handling must prevent movement through solid geometry. Flight or spectator behavior should not appear unless requested.
In the second round, add requirements for clearer surface textures, simple lighting and shadows, time progression, sun and moon direction, weather, and expandable terrain.
Specify performance boundaries, including view distance, chunk size, per-frame generation budget, and unloading regions the player has left. An infinite world that rebuilds all geometry whenever the player moves will quickly become unresponsive.
An acceptable implementation should generate terrain in chunks, reuse geometry data, limit how many chunks update at once, and use a fixed random seed so that revisiting the same coordinates produces consistent terrain.
This task is particularly good at revealing uneven requirement coverage. Block placement and destruction may work while movement and jumping remain broken. A revision may improve lighting without correcting input mapping.
Group defects into four categories—input, physics, world consistency, and performance—so that overall visual quality does not conceal failures on critical paths.
Understanding Strong Capability but Weak Constraint Retention
Three patterns help explain these results:
- Strong local generation. Models can often produce individual functions, styles, and algorithms, making demos appear complete.
- Loss of late-stage requirements. Constraints near the end of a long prompt may be overlooked or replaced by implementation defaults.
- Weak regression awareness. A model may patch a newly reported issue while breaking behavior that previously worked.
Evaluation conclusions should therefore describe a capability profile rather than assign a single ranking.
For example, a report might find that open-ended interface generation is fast but control mapping is unreliable; constraint puzzles have a relatively high sampled success rate but still require state-table verification; or a 3D scene runs on the first attempt but needs a second round before terrain expansion and movement direction become usable.
Such findings directly inform deployment decisions. High-risk paths need automated validation and human approval gates, while low-risk drafting can allow more flexibility.
A Practical Evaluation Workflow
Teams can implement the following loop within their own environment:
- Freeze the test suite. Each task should include its prompt, restrictions, success criteria, and permitted execution methods. Version the suite so that changes made during evaluation do not undermine comparability.
- Generate independent samples. Run each task at least three times. Record latency, whether the result runs without modification, and the defect list. Do not count evaluator-assisted fixes as first-attempt success.
- Automate verifiable checks. Validate state legality for river-crossing puzzles. For pages, perform at least static structure checks and scripted smoke tests of key interactions—for example, whether a keypress changes the character’s coordinates in the expected direction.
- Allow one targeted repair round. The repair prompt must cite observed failures. Check for newly introduced defects. If a repair requires the evaluator to dictate code changes line by line, treat the task as a failure.
- Archive evidence. Store source files, execution instructions, failure recordings, and logs in object storage. Track evaluation status through a message queue or ticket workflow. Connect runtime metrics to monitoring and alerts, focusing on timeouts, unresponsive pages, and abnormal exits rather than retaining only the final verdict.
- Set acceptance thresholds. Examples include no blocking defects on critical interaction paths, a sampled correctness rate that meets the team’s threshold for constraint puzzles, and interactive frame times within the specified view distance for 3D tasks. Restrict outputs that fail these thresholds to draft generation.
For teams already using Baidu AI Cloud in their development toolchain, evidence storage, workflow coordination, and runtime observability can use the object storage, message queue, container platform, and monitoring capabilities available in their environment.
The evaluation itself should remain neutral in its task design, scoring criteria, and sampling process. A single model demonstration should not be treated as proof of platform capability.
Writing Prompts That Can Be Evaluated
Prompts should define observable outcomes.
Instead of asking for “a fun game,” specify inputs, states, restrictions, win and loss conditions, and performance limits. Instead of requesting “beautiful graphics,” define texture scale, lighting direction, day–night cycle, and view distance.
Asking the model to provide a state table or module boundaries before implementation often makes the result easier to review. However, if the test measures end-to-end, one-shot delivery, do not add hints midway through the task. That would measure multi-turn collaboration rather than single-prompt instruction following.
Subjective terms should not be the only criteria. “Responsive controls” or “most enjoyable” can remain experience notes, but they cannot replace checks that jumping works, restrictions are respected, and terrain regenerates consistently.
Subjective feedback can reveal weaknesses in the test design. It is not a sufficient basis for procurement or deployment approval.
Conclusion
The usefulness of a coding model depends on separating generation capability, constraint retention, and revision stability through a consistent set of verifiable tasks.
Interactive state machines reveal whether instructions become working behavior. River-crossing puzzles show whether restrictions hold throughout a plan. Single-file 3D scenes test whether controls, world consistency, and performance can work together.
Combining these tasks with a versioned test suite, independent samples, and one regression-checked repair round reduces reliance on demo quality. It helps teams use models where they are genuinely reliable, rather than where they merely look convincing.
