Evaluating Large Language Models: Complex Reasoning and Code Generation
This article examines how to evaluate large language models on complex reasoning and code generation without external tool calls. It proposes a three-part benchmark covering constraint-based logic puzzles, single-file interactive applications, and complex 3D scene generation, then explains why reasoning depth is improving while global constraint retention remains weak. It also outlines an iterative repair workflow, layered acceptance checks, and four reproducible metrics for engineering deployment.
1. Background and Key Findings
Recent discussion around new-generation general-purpose large language models has focused on a seemingly contradictory pattern: models excel at problems that require multi-step deduction, yet frequently suffer from “attention drift” in long-context, multi-constraint code generation tasks. A widely observed rule is that an increment in the integer part of a version number often signals a capability leap, accompanied by less stable behavior. This article does not target any specific product. Instead, it abstracts these phenomena into measurable engineering questions: how to assess a model’s deductive reasoning strength without tool calls, and how to assess its code organization and timing control under a single-file delivery constraint.
The core finding can be summarized in one sentence: the depth of the reasoning chain is increasing, but the ability to preserve global constraints remains a weakness. This directly shapes the deployment strategy: use strong reasoning for planning and decomposition, and let workflow and validation absorb the stability problems.
2. Evaluation Design: A Three-Task Capability Framework
A single-dimension benchmark score cannot reflect real-world usability. Three complementary task types are recommended.
The first type is constraint-satisfaction logic puzzles. A typical form is a river-crossing problem: family members and pets cross a river in a boat with limited capacity, subject to multiple mutually exclusive incompatibility rules (for example, one member harms a specific target when another member is absent, or animals attack people when the caretaker is missing). The key challenge is state-space search with constraint backtracking, and external tools must be disabled to reflect the model’s intrinsic reasoning ability. Evaluations should record success rate and latency across multiple runs rather than a single result.
The second type is single-file interactive application generation. The requirement is to deliver a runnable fighting game within one HTML file, including blocking, normal attacks, double jumps, dodges, five categories of elemental skills, an enemy behavior tree, and scene and camera following. Suggested scoring dimensions are: mechanic completeness, game feel (input responsiveness and frame synchronization), AI rationality, visual quality, and most importantly the initial runnability rate.
The third type is complex 3D scene generation. The requirement is to implement a voxel-style sandbox world in a single file, covering terrain and vegetation generation, chunk loading, creature entities, day-night cycles and weather, infinite maps, and performance trade-offs. This task places combined demands on the rendering pipeline, resource lifecycle, and state management, making it a litmus test for long-constraint retention.
3. Observations and Root Causes: Why Capability Rises While Attention Drops
A consistent pattern emerged across these tests: models produce structurally ambitious plans but make mistakes in direction mapping, jumping and flight, and texture and lighting timing. Errors tend to cluster where multiple constraints must be maintained simultaneously. There are three root causes.
The first is context competition. When the system prompt, user requirements, the code itself, and iterative patches all coexist, the weight of early constraints is diluted, showing up as “fix one place, break three others.”
The second is weak state and timing modeling. The game loop, input buffering, collision handling, and camera interpolation are cross-frame state. Models tend to generate static structures that look correct while lacking explicit modeling of temporal evolution.
The third is the absence of an external validation loop. Without compile, run, and assertion feedback, models can only rely on internal consistency checks and struggle to catch silent errors such as reversed directions or unbound events.
4. Iterative Repair: Turning One-Shot Generation into Controlled Convergence
Faced with first-round defects, the right approach is not a rewrite but structured constraint additions. A reusable prompt template is shown below:
Fix the following issues while preserving the existing implementation. Do not remove existing features:1) Correct the movement direction mapping so forward/backward matches the camera view;2) Complete the state machine and ground detection for jumping and flight;3) Increase texture resolution and add basic lighting and shadows;4) Introduce time progression, day-night cycles, and weather;5) Generate infinite terrain in chunks with object pool reuse.Output: only the modified key functions and a change summary.
Pair this with a layered acceptance process: first verify runnability and input mapping, then verify gameplay mechanics, and finally verify visuals and performance. Each layer should have clear pass criteria to avoid dispersing attention by setting too many goals at once.
5. Engineering Deployment Recommendations
In real projects, a combination of “strong reasoning for planning, workflow for constraints, and validation as a safety net” is recommended. During planning, use the model to decompose requirements and draft interfaces. During implementation, limit delivery to a single file or module to compress context. During validation, introduce automated tests and assertions to surface silent errors. If cloud capabilities are used, model services, object storage, logging services, and monitoring alerts can be combined into a closed loop: archiving requests and artifacts, feeding failed samples back, and tracking success rate and latency on a metrics dashboard.
Four metrics are recommended as fixed evaluation criteria: initial runnability rate, constraint satisfaction rate, number of iterations to convergence, and time per task. These four are more reproducible than subjective judgments of whether something is fun, and are better suited to comparing different technical approaches.
6. Conclusion
The value of new-generation models lies in their higher ceiling for deduction and generation, but engineering usability depends on how we design constraints and feedback. Splitting evaluation into logic, interaction, and 3D layers, splitting repair into verifiable small steps, and splitting the runtime environment into an observable closed loop can turn a model that is “excellent in capability but unstable in attention” into dependable, deliverable productivity.
