Evaluating Lightweight Flagship Models with Complex HTML Tasks: Probing the Boundaries of Reasoning

    This article examines lightweight flagship models through a complex HTML geometry animation task: constructing a regular heptagon with a two-mark ruler. It analyzes implicit geometric relationships, dynamic constraints, the difference between a correct result and a correct process, common pitfalls in HTML-based tests, and a more reliable evaluation workflow for assessing model reasoning and engineering delivery.

    1. Lightweight Model Capability Cannot Be Judged by Response Speed Alone

    In recent years, lightweight models have gradually evolved from low-cost, fast-response auxiliary tools into general-purpose models capable of handling complex tasks. Contrary to conventional assumptions, the value of lightweight models is not limited to generation speed, deployment cost, or concurrency. Some models are already approaching larger models in code generation, mathematical reasoning, complex instruction execution, and multi-step task planning.

    However, whether a model truly has strong overall capability cannot be judged only through simple Q&A or routine code completion. Many tasks appear to require only a block of HTML code, but in practice they also involve geometric reasoning, algorithm design, interactive animation, graphics rendering, and format export. If a model merely generates a page that “looks runnable,” that does not mean it has accurately understood and executed the task.

    Complex front-end tasks are therefore suitable as a comprehensive test: they can reveal whether a model understands natural language, and they can also verify whether the model can translate an abstract description into a rigorous executable program.

    2. Test Case: Constructing a Regular Heptagon with a Two-Mark Ruler

    The test can be designed as the following task:

    Draw an HTML page that uses a two-mark ruler to construct a regular heptagon. First take a square and construct the perpendicular bisector of its bottom edge; then draw a circle centered at the bottom-right vertex with the diagonal as the radius; next use the two-mark ruler so that it is pressed against the bottom-left vertex, let the first tick mark move along the circle until the second tick mark passes through the perpendicular bisector of the bottom edge. After that, complete the full construction steps to finish the regular heptagon, dynamically display the necessary auxiliary lines and arcs, and finally provide animation export.

    The difficulty of this task is not drawing a polygon. With standard trigonometric functions, a regular heptagon’s vertices can be calculated in a few lines of code. But the test requires the model to follow a specific geometric construction process. It cannot skip the derivation, and it cannot fake the result by hard-coding vertex coordinates in advance.

    In other words, a qualified implementation must satisfy at least the following conditions:

    1. The page clearly presents the initial square and key auxiliary lines;
    2. It represents the circle, perpendicular bisector, intersection points, and the movement of the ruler-and-compass construction;
    3. The motion path of the two-mark ruler matches the task description;
    4. The vertices of the regular heptagon come from the construction result rather than being simply preset;
    5. Auxiliary lines and arcs appear only at necessary stages, avoiding meaningless full-screen traces;
    6. The page supports basic play, pause, reset, and animation export;
    7. The code structure is clear enough to verify each geometric relationship.

    These requirements test both the model’s comprehension capability and its engineering implementation capability, making the task far more discriminative than an ordinary “generate a webpage” prompt.

    3. The Real Difficulty: From Natural Language to a Verifiable Program

    3.1 Identifying Implicit Geometric Relationships

    Concepts such as “perpendicular bisector,” “circle center,” “tick mark,” and “intersection point” in the task description are not simple drawing commands. The model must first establish relationships among geometric objects, then translate those relationships into coordinates, vectors, and computational steps.

    For example, constructing the perpendicular bisector of a line segment usually requires first calculating the midpoint of the segment, then deriving the perpendicular direction from the original segment’s direction. If the two endpoints of the segment are:

    1. const midpoint = {
    2. x: (a.x + b.x) / 2,
    3. y: (a.y + b.y) / 2
    4. };
    5. const direction = {
    6. x: b.x - a.x,
    7. y: b.y - a.y
    8. };
    9. const normal = {
    10. x: -direction.y,
    11. y: direction.x
    12. };

    The infinite line then needs to be clipped to the visible area according to the canvas scale. If a model interprets “perpendicular bisector” merely as a vertical line on the page, the visual result may look close, but the model has not actually executed the required construction.

    3.2 Handling Dynamic Constraints

    The two-mark ruler is not an ordinary line segment. It contains tick marks with a fixed spacing, and during motion it must simultaneously satisfy multiple conditions: the ruler must pass through a specified point, the first tick mark must lie on the circle, and the second tick mark must pass through another constraint line.

    This means the model needs to handle a rigid-body motion problem. The two-mark ruler can be abstracted as:

    • a reference point;
    • a direction vector;
    • several tick positions at fixed distances;
    • a rotation angle that changes over time;
    • a translation position calculated from geometric constraints.

    In animation implementations, a common approach is to search step by step over angles to find a pose that satisfies an error threshold. Illustrative code is shown below:

    1. function distance(a, b) {
    2. return Math.hypot(a.x - b.x, a.y - b.y);
    3. }
    4. function pointOnLine(point, lineStart, lineEnd) {
    5. const cross =
    6. (point.x - lineStart.x) * (lineEnd.y - lineStart.y) -
    7. (point.y - lineStart.y) * (lineEnd.x - lineStart.x);
    8. return Math.abs(cross) < 0.5;
    9. }

    Note, however, that this is only the foundation of geometric verification. A high-quality implementation should also account for numerical error, coordinate scaling, animation frame rate, and browser rendering differences.

    3.3 Distinguishing “Correct Result” from “Correct Process”

    A common situation in complex code tasks is that the final page looks correct, but the intermediate process does not meet the requirements at all. For example, a model can directly use:

    1. const angle = 2 * Math.PI / 7;

    Then calculate seven equally spaced points and draw a regular heptagon. The shape itself is fine, but it bypasses the required ruler-and-compass construction process, so it cannot be considered a strict completion of the task.

    Evaluation should split the result into two parts:

    • Final-state correctness: whether the final shape is a regular heptagon;
    • Process consistency: whether the construction steps match the task description.

    Only when both conditions are satisfied can we say the model has strong instruction-following capability. Otherwise, the model may simply have used the easiest alternative algorithm.

    4. How Model Performance Should Be Analyzed

    In actual tests, lightweight models may show several noteworthy characteristics.

    First, a model may begin outputting code only after lengthy reasoning. This often indicates that the task has been decomposed into multiple subproblems, and the model is trying to establish geometric relationships, organize animation steps, and handle export functionality. For complex tasks, longer planning time does not necessarily mean weaker capability, but if no executable result appears for a long time, practical usability is affected.

    Second, a model may fall into “analysis only, no delivery.” It can identify the difficult parts of the problem and discuss possible algorithms, but fail to turn the plan into a complete page. For developers, analysis cannot replace runnable code; the model must balance reasoning with delivery.

    Third, some models are slower to output but more stable in instruction following. They do not easily adopt simplifications outside the task requirements; instead, they try to preserve auxiliary lines, ruler motion, and the step-by-step construction process. Such behavior shows that model capability should not be ranked simply by response speed. Evaluation should also consider:

    • depth of instruction understanding;
    • multi-step task planning capability;
    • code runnability;
    • consistency between result and process;
    • self-checking of abnormal situations;
    • degree of compliance with user constraints.

    5. Why Common HTML Tests Can Be Misleading

    “Ask the model to generate a complex webpage” has become a common test method, but such tests have clear limitations.

    First, visual results can easily mask implementation errors. As long as colors, layout, and animation effects look good, a page may give the impression of high completion, even though the internal logic may not meet the requirements at all.

    Second, the browser environment affects results. Fonts, canvas size, device pixel ratio, animation timers, and export capabilities can all cause the same code to behave differently in different environments. Therefore, a test should not rely only on a screenshot; it should also inspect code structure and interaction behavior.

    Third, a single task cannot represent the model’s full capability. Complex geometry tasks emphasize spatial reasoning and graphics programming, and they cannot directly indicate how the model performs in backend development, data processing, or engineering architecture.

    A more reasonable approach is to build a multidimensional test set, including:

    1. strict instruction execution;
    2. mathematical and geometric reasoning;
    3. multi-file project organization;
    4. exception handling and boundary conditions;
    5. code maintainability;
    6. interaction and visual fidelity;
    7. long-context information extraction;
    8. automated verification of generated results.

    6. Designing a More Reliable Evaluation Workflow

    To reduce subjective judgment, an approach based on “task decomposition plus automated checks” can be used.

    Step 1: Verify That the Page Runs

    Check whether HTML, CSS, and JavaScript contain syntax errors, whether the page loads normally, and whether the main buttons are usable.

    Step 2: Verify the Final Geometry

    By calculating side lengths, interior angles, or distances from vertices to the center, determine whether the final shape satisfies the characteristics of a regular heptagon. For example, the distances from the seven vertices to the center should be approximately equal, and the chord lengths between adjacent vertices should also be close.

    Step 3: Verify the Construction Process

    Check whether the code actually creates the square, perpendicular bisector, circle, two-mark ruler, and relevant intersection points. It is not enough to verify that a heptagon appears at the end; confirm that it was not drawn directly from preset coordinates.

    Step 4: Verify the Animation Trajectory

    Record the ruler position and auxiliary-line states, and confirm whether the motion process satisfies the constraints. Necessary trajectories should be generated at specified stages; nonessential motion traces should not remain permanently.

    Step 5: Verify Export Capability

    Animation export can be implemented by drawing and encoding frame by frame, or by first generating consecutive image frames and then handing them to a browser-side encoding module. In either case, the export format, frame rate, dimensions, and failure prompts should be clearly defined.

    7. Conclusion: The Value of Lightweight Models Lies in Completing Complex Tasks

    From this kind of HTML geometry animation task, it is clear that the core competitiveness of lightweight models is not merely “answering faster.” It is whether they can complete complex, continuous, and verifiable work under limited resources.

    A truly valuable model should be able to:

    • understand implicit constraints in natural language;
    • translate abstract rules into algorithms;
    • generate clear, runnable code;
    • avoid replacing original requirements with seemingly correct shortcuts;
    • self-check and correct its results;
    • ultimately deliver usable outcomes in complex tasks.

    Therefore, when evaluating lightweight models, it is not appropriate to look only at single-output speed, nor to draw conclusions solely from a final screenshot. A more professional approach is to review task understanding, process execution, code quality, and final results together. For developers, this evaluation method is useful not only for horizontal model comparison, but also for helping teams determine whether a certain type of model is suitable for prototyping, automated programming, interactive teaching, and internal enterprise tooling.