Evaluating Lightweight Reasoning Models: True Capabilities in Complex Web Generation

    Lightweight AI models are increasingly deployed for complex tasks like code generation and frontend development due to their lower costs and faster response times. However, their ability to handle complex instructions, long-chain reasoning, and interactive frontend implementation is often underestimated. Using a complex geometric web generation task—constructing a regular heptagon with a marked ruler—as a test case, this article analyzes the actual performance of lightweight reasoning models. It explores why visual output alone is insufficient for evaluation, highlights the core strengths of these models in multi-step planning and instruction adherence, and proposes a four-tier evaluation framework for developers.

    In recent years, lightweight models have continuously evolved toward higher capabilities. They typically feature lower deployment costs, faster response times, and more flexible integration methods, making them widely used for code generation, web development, data processing, intelligent Q&A, and internal enterprise automation.

    However, being “lightweight” does not mean they are only suitable for simple queries. Some next-generation lightweight reasoning models have demonstrated capabilities approaching those of high-spec models in complex instruction understanding, long-chain reasoning, and frontend interaction implementation. Especially in tasks requiring simultaneous handling of mathematical rules, geometric construction, animation effects, and file export, whether the model truly understands the requirements is often more important than whether the final page “looks right.”

    This article uses a complex geometric web generation task as an example to analyze the actual performance of lightweight reasoning models and further discusses how to design more reliable model evaluation methodologies.

    1. Why Final Visual Output is Not Enough

    In web generation tasks, many models can quickly produce a visually complete page. For example, if a user requests the drawing of a regular heptagon, a model might directly calculate the seven vertices using coordinates and connect them via a drawing API. While this result may be visually correct, it may not follow the construction process specified by the user.

    This distinction is crucial.

    If the user only cares about the final shape, calculating vertices directly is a reasonable implementation. But if the user asks to simulate traditional compass-and-straightedge construction, show auxiliary lines for each step, retain necessary arc traces, and ultimately export an animation, the core of the task is no longer just “drawing a regular heptagon.” Instead, it involves:

    1. Correctly understanding the construction rules;
    2. Executing the construction in the specified order;
    3. Distinguishing between auxiliary lines, trace lines, and the final result;
    4. Handling state changes during dynamic presentations;
    5. Ensuring the final shape aligns with the reasoning process;
    6. Implementing an operable and reproducible export function.

    Therefore, evaluating a model cannot rely solely on page screenshots. It requires examining the generation logic, code structure, and interactive behavior. A page that “looks correct” does not prove the model truly completed the task.

    2. Complex Test Case: Constructing a Regular Heptagon with a Marked Ruler

    This test designed a web task based on geometric construction. The model was required to generate an interactive web page demonstrating how to construct a regular heptagon using a marked ruler, supplemented with a complete compass-and-straightedge construction process.

    The task roughly includes the following steps:

    • First, construct a square;
    • Draw the perpendicular bisector of the square’s base;
    • Draw a circle centered at a specified vertex with the diagonal as the radius;
    • Use the marked ruler, ensuring it always passes through the specified vertex;
    • Move the marked ruler so that the first mark falls on the circle while the second mark intersects the perpendicular bisector of the base;
    • Using the obtained key points, continue constructing subsequent perpendicular bisectors, centers, and vertices;
    • Display necessary auxiliary lines and arcs;
    • Use animation to show the sequential relationship of each step;
    • Add the ability to export the animation.

    Although this task appears to be frontend drawing, it actually contains multiple challenges.

    1. Geometric Rule Understanding

    The model must extract geometric constraints from natural language, determining which points are known, which lines are auxiliary, and which arcs only need partial traces preserved. If the model merely generates coordinates mechanically, it may produce correct point relationships but incorrect construction methods.

    2. Long-Process State Management

    A web page is not a static image but a continuous presentation process. The model must manage the relationships between the current step, historical traces, hidden elements, and the final shape. For instance, a specific arc may only appear during the movement of the marked ruler and should not remain as a full circle once positioning is complete.

    3. Geometric Precision and Visual Expression

    Even if the mathematical relationships are correct, the page may still be difficult to understand due to improper coordinate scaling, line widths, label placement, or animation pacing. An excellent implementation must not only “calculate correctly” but also help readers understand what happens at each step.

    4. Output Functionality Implementation

    Exporting an animation as a dynamic image involves frame capture, time control, encoding, and browser compatibility. If a model only generates an export button without actually implementing the frame capture or encoding process, it represents a functional deficit rather than a complete implementation.

    3. Typical Performance of Lightweight Models in Testing

    From the testing process, lightweight reasoning models did not simply bypass complex steps. Instead, they attempted to construct the page step-by-step according to the requirements. They typically analyzed geometric relationships first, then planned the page structure, and finally generated the drawing and animation code.

    This approach differs significantly from standard code completion. Standard code completion often aims to deliver a result quickly, whereas reasoning models spend more time handling the following issues:

    • How to translate geometric descriptions in natural language into coordinate relationships;
    • How to design data structures for the construction steps;
    • How to distinguish between static and dynamic elements;
    • How to make the animation execute frame-by-frame according to the steps;
    • How to retain necessary traces while avoiding drawing irrelevant content;
    • How to integrate export logic into the existing animation flow.

    A noteworthy phenomenon also emerged during testing: the model’s thinking process was not always continuous and smooth. Sometimes it repeatedly checked the implementation plan over an extended period, even resulting in long reasoning times with no immediate output. This indicates that processing speed for complex tasks remains an area where lightweight models need improvement.

    However, looking at the quality of the results, longer reasoning times do not necessarily indicate a lack of model capability. For tasks requiring simultaneous handling of geometry, animation, and frontend implementation, the model needs multiple rounds of self-checking. As long as the final output completely follows the requirements, this time cost is acceptable in certain development scenarios.

    4. Core Advantages Worth Noting

    1. Strong Instruction Adherence

    Complex tasks easily expose a model’s tendency to “act on its own.” Some models ignore the user-specified process and directly use familiar methods to achieve the goal. For example, if the user asks for a compass-and-straightedge construction, the model might calculate vertices directly using trigonometric functions; if the user asks for partial traces, the model might draw full circles.

    Capable lightweight reasoning models can distinguish between the “final result” and the “implementation path,” striving to preserve the user-requested process in the generated code. This capability is particularly important for enterprise automation, as actual business requirements often focus not only on the result but also on meeting audit, compliance, explainability, or process constraints.

    2. Overall Planning for Multi-Step Tasks

    A complex web page cannot be solved by a single function. The model must first plan the page structure, then break down drawing functions, animation functions, annotation functions, and export functions. Without overall planning, the code is prone to variable confusion, step jumping, or logic duplication.

    Mature models typically use data organization methods similar to the following:

    1. const steps = [
    2. {
    3. name: "Construct initial shape",
    4. draw: drawInitialShape
    5. },
    6. {
    7. name: "Draw perpendicular bisector",
    8. draw: drawPerpendicularBisector
    9. },
    10. {
    11. name: "Animate marked ruler movement",
    12. draw: animateRulerMovement
    13. },
    14. {
    15. name: "Determine construction points",
    16. draw: drawConstructionPoints
    17. }
    18. ];

    This structure helps control the animation sequence and facilitates adding pause, replay, single-step execution, and export functionalities later.

    3. Capability to Handle “Process Visualization”

    Traditional code generation usually emphasizes whether the functionality is usable, whereas complex educational web pages also require a clear process. The model must consider visual factors such as color, line type, labels, trace retention, and animation duration.

    For example, elements can be categorized into:

    • Known shapes;
    • Current operation objects;
    • Temporary auxiliary lines;
    • Historical traces;
    • Final results;
    • Text descriptions and step prompts.

    Through layered rendering, all elements can be prevented from mixing together, thereby improving the readability of the page.

    4. Ability to Identify Implicit Constraints

    “Leaving compass traces only in the necessary parts” is not an ordinary drawing instruction; it requires the model to understand the relationship between the trace and the tool’s range of motion. Similar implicit constraints include:

    • The marked ruler must always pass through a specified point;
    • The two marks must simultaneously satisfy different geometric conditions;
    • The animation should show continuous movement rather than direct jumping;
    • The final shape must not obscure the construction process;
    • The exported animation should remain consistent with the page playback effect.

    The ability to identify these hidden requirements is a key indicator of a model evolving from a “code generator” to a “task execution assistant.”

    5. What to Watch for When Comparing with High-Spec Models

    Under the same prompt, different models may generate completely different implementation approaches. High-spec models are not necessarily better at all tasks. Especially when a task involves complex constraints, long code, and special visualization requirements, high-spec models may exhibit the following issues:

    1. Long generation times with no effective progress midway;
    2. Final page visuals are complete, but the internal logic deviates from requirements;
    3. Automatically adding steps that were not requested;
    4. Bypassing the specified construction method to quickly obtain the target shape;
    5. The code runs, but the animation does not match the geometric process;
    6. An export button exists, but it cannot actually generate a valid file.

    Therefore, when comparing models, you cannot just measure response speed or look at the final screenshot. A more reasonable evaluation method should include:

    • Process adherence;
    • Mathematical and geometric correctness;
    • Code maintainability;
    • Interaction completeness;
    • Long-task stability;
    • Error recovery capability;
    • Actual usability of output functions.

    6. Establishing More Scientific Evaluation Metrics

    To avoid the misjudgment of “looking complete,” evaluation can be broken down into four tiers.

    Tier 1: Result Correctness

    Check whether the final shape meets the target, including the number of vertices, side length relationships, symmetry, and closed state.

    Tier 2: Process Consistency

    Check whether the generation process follows the task description. For example, did it actually construct the specified perpendicular bisector? Did it use the required positioning method? Did it avoid directly calculating the result through extra computation?

    Tier 3: Interaction and Animation Quality

    Check if the animation can play, pause, reset, and execute step-by-step. Check if auxiliary lines appear in order and if traces are only displayed in necessary areas.

    Tier 4: Engineering Usability

    Check if the code can run in common browser environments, whether there are obvious variable errors, performance issues, or compatibility problems. Check if the export function generates a valid file and if the page has a basic responsive layout.

    Only when all four tiers meet the standard can the model be considered to have truly completed the complex web generation task.

    7. Practical Insights for Developers

    For developers, lightweight reasoning models can now undertake some prototype development work that previously required manual effort. However, the following principles should still be observed when using them.

    First, break down requirements into clear phases. Do not just describe the final page; specify the data structures, drawing order, animation rules, and acceptance criteria.

    Second, require the model to explain key implementations. Especially for mathematical, graphic, and data processing tasks, the model should be asked to explain the source of coordinates, boundary conditions, and algorithm choices.

    Third, perform result verification. Even if a model-generated page can run, it may contain logical deviations. Confirm the results through unit tests, geometric constraint checks, and manual operation verification.

    Finally, adopt a staged generation approach for complex tasks. You can first have the model design the plan, then generate the static shapes, subsequently add animations, and finally implement the export function. Compared to generating all code at once, this approach makes it easier to locate errors and is more maintainable.

    Conclusion

    Lightweight models are changing the perception of “low-cost models.” They are no longer limited to simple Q&A or short code completion; they can also demonstrate strong capabilities in complex web generation, process visualization, and multi-step reasoning tasks.

    However, model capability cannot be simply judged by whether the final page looks pretty. Truly valuable capabilities include accurately understanding constraints, faithfully executing steps, maintaining mathematical logic consistency, completing operable interactions, and maintaining stable output during long tasks.

    Tests represented by complex geometric animations can simultaneously verify these aspects. For model users, establishing a comprehensive evaluation system that focuses on “process, results, and engineering quality” is more valuable than simply comparing response speeds or page screenshots. Only in this way can you determine whether a lightweight model quickly generated a similar answer or actually completed the technical task required by the user.