How Capable Are Lightweight Flagship LLMs Really? Testing Reasoning and Execution with Complex HTML Tasks
Lightweight flagship models are no longer defined solely by response speed. This article examines how to evaluate a lightweight LLM's true capabilities using a complex, verifiable task: constructing a regular heptagon with a marked ruler in an animated HTML page. It covers why such tasks are effective testbeds, common "pseudo-completion" failures, five core evaluation dimensions, a standardized testing workflow, and practical takeaways for developers assessing models beyond raw benchmarks.
Why Lightweight Models Are Now Competing on Execution, Not Just Speed
In recent years, large language models have settled into a fairly clear capability hierarchy. One class of models emphasizes response speed, deployment cost, and concurrency—well suited to customer service, retrieval, summarization, and simple code generation. Another class prioritizes complex reasoning, long-context analysis, and multi-step task execution, typically at the cost of more compute.
But as model architectures, inference strategies, and training data keep improving, the gap between lightweight and large models is narrowing. In tasks such as code generation, web page building, and mathematical reasoning, some models with deliberately restrained parameter counts are no longer limited to “quick answers”—they are beginning to decompose problems, plan steps, generate code, and verify their own output.
So evaluating a lightweight flagship model should not stop at single-turn accuracy or output speed. A more meaningful approach is to give the model a task with multiple constraints, continuous reasoning requirements, and results that can be validated by actually running the code.
Complex HTML animation is exactly that kind of scenario.
Why Web Animation Is a Good Capability Test
A seemingly ordinary HTML page can impose several technical demands at once:
- Natural language understanding: the model must accurately identify the user’s goals, steps, and constraints.
- Geometric or mathematical reasoning: if the task involves straightedge-and-compass construction, trajectories, intersections, and polygon construction, the model must understand how the objects relate to each other.
- Frontend implementation skills: choosing appropriate HTML, CSS, and JavaScript structures.
- Animation control: the page must show the construction process, stage transitions, and trajectory changes—not just a static result.
- Result verification: whether the final figure is correct, the steps complete, and the animation compliant all need to be checked.
- Format conversion: if the task also requires exporting a GIF or other animation file, the model must consider frame capture, encoding, and browser compatibility.
The difficulty here is not the complexity of any single line of code, but the need to handle “understanding—planning—implementation—verification” as one continuous loop. Producing a visually similar figure does not prove the model actually solved the problem.
A Representative Test Task: Constructing a Regular Heptagon with a Marked Ruler (Two-Marked Ruler)
A suitable test prompt might be:
Create an HTML page that demonstrates constructing a regular heptagon with a two-marked ruler.
First draw a square and construct the perpendicular bisector of its bottom edge. Draw a circle centered at the bottom-right vertex with radius equal to the square’s diagonal. Then use the two-marked ruler, keeping it passing through the bottom-left vertex, with the first mark touching the circle; move the ruler until the second mark lies on the perpendicular bisector of the bottom edge.
Complete the full straightedge-and-compass construction with the necessary circles, lines, intersections, and auxiliary lines. Compass arcs should only appear where necessary. Finally, add animation export functionality.
This prompt has several notable features.
First, it does not simply ask to “draw a regular heptagon”—it prescribes the construction method. The model cannot use precomputed vertex coordinates, nor bypass the specified method with extra steps.
Second, the task requires a dynamic presentation. The page should progressively show the square, auxiliary lines, circle, marked ruler, movement process, intersections, and final polygon—rather than rendering everything at once.
Third, the task includes behavioral constraints. For example, compass arcs should appear only where necessary, the marked ruler must maintain a specific posture, and the export function should be tied to the animation process. These constraints effectively test whether the model truly understood the requirements.
Common “Pseudo-Completion” Failures in Evaluation
In practice, a model’s typical errors are not syntax errors but logic that doesn’t match the requirements.
1. Generating the Target Figure Directly
The model may simply compute the seven vertices of the heptagon and connect them with SVG or Canvas. The page may look correct, but it never performed the construction the user requested.
This is “correct result, wrong process.” If the goal is to assess geometric reasoning and step-following, this implementation does not count as a full success.
2. Adding Geometry the Prompt Never Allowed
Another pattern: the model introduces auxiliary circles, special angles, or preset ratios that were not in the prompt, and arrives at an approximate heptagon.
The problem is that this changes the task’s constraints. The model is not solving the given problem—it is finding an easier substitute path.
3. Faking Animation with a Static Image
Some implementations draw the complete result, then use CSS opacity or scaling transitions to create the illusion of “being constructed.” Without genuine line generation, ruler movement, and trajectory recording, the animation is only a presentation-layer simulation.
4. Reasoning Without Producing Output
Complex tasks can trigger long internal planning. If the model ultimately fails to produce stable code, or the output is truncated or missing key parts, that is still a failure for practical development work.
What developers care about is not how much the model “thought,” but whether it can produce runnable, inspectable, modifiable output within a reasonable time.
Five Core Dimensions for Judging Model Capability
1. Instruction Following
Whether the model executed every requirement is the most basic evaluation dimension. Break the prompt into a checklist:
- Was the initial square drawn?
- Was the perpendicular bisector of the bottom edge constructed?
- Was the circle drawn with the specified center and radius?
- Was the marked ruler’s movement shown?
- Were the necessary construction steps completed?
- Was the compass trajectory limited to the required parts?
- Was animation export implemented?
If the model completes only part of the list, the page may look polished, but it is not a complete implementation.
2. Geometric Relationship Modeling
The model must clearly distinguish points, lines, circles, intersections, and trajectories, and maintain a stable data structure. For example, geometric elements can be represented uniformly as objects:
{type: "line",start: { x: 120, y: 240 },end: { x: 420, y: 240 },visibleAt: 3}
Here visibleAt indicates the animation stage at which the element appears. This design is far easier to verify and modify than stacking raw drawing statements together.
3. Long-Chain Code Generation
Complex pages are rarely solvable in a few dozen lines. The model must organize UI, drawing, animation, interaction, and export logic simultaneously.
A good implementation should have clear module boundaries, such as:
- geometric computation module;
- canvas rendering module;
- animation timeline module;
- instruction/help panel module;
- recording and export module.
If everything is written in one giant function, debugging becomes very hard, and it is difficult to tell whether a bug comes from geometry or animation control.
4. Self-Verification
After generating code, the model should ideally check its own results, for example:
- Are adjacent vertex distances approximately equal?
- Are the polygon’s interior angles close to theoretical values?
- Do construction lines intersect the specified objects?
- Do animation stages execute in the correct order?
- Does the export capture the full frame sequence?
For frontend tasks, runtime validation matters more than a syntax check. Code that runs is not necessarily code that meets requirements.
5. Fixing Failure Paths
An incomplete first attempt does not necessarily mean the model is weak. What matters more is whether the model can locate and locally fix problems after receiving error feedback.
For example, a user might report:
- The marked ruler did not maintain a fixed length;
- Too many compass arcs were drawn;
- The final polygon is not a regular heptagon;
- The animation skipped intermediate steps;
- The exported file contains only a static first frame.
If the model can modify the corresponding module for each issue—rather than rewriting everything from scratch—it demonstrates solid engineering-style repair capability.
Why Slow Output Alone Should Not Disqualify a Model
Generation speed on complex tasks is influenced by many factors:
- whether the model performs deep reasoning;
- the size of the generated code;
- context length;
- whether multiple rounds of self-checking occur;
- the current resource state of the inference service;
- whether the task involves graphics algorithms and animation logic.
Speed should therefore be evaluated together with result quality, stability, and fixability.
That said, speed still matters in production. If a model takes very long to generate complex pages every time, teams may adopt a staged strategy: first have the model produce a task plan, then generate the core code, and finally add animation and export features. This lowers the probability of single-shot failure and makes human intervention easier.
A Recommended Standardized Testing Workflow
To avoid evaluating models “by feel,” establish a unified test process.
Step 1: Fix the prompt. Use the exact same task description for all models to avoid bias from prompt differences.
Step 2: Record the full process. Capture first-response time, total generation time, output length, whether output was interrupted, and whether repeated reasoning or invalid output occurred.
Step 3: Actually run the code. Don’t just read the model’s reply. Run the code in a browser and check console errors, page interactions, and animation behavior.
Step 4: Score against the checklist. Evaluate requirement-by-requirement using a pre-defined checklist, not just the final screenshot.
Step 5: Add correction rounds. Provide specific error messages and observe whether the model fixes problems without breaking other features.
Step 6: Assess maintainability. Check for clear naming, reasonable comments, and modular structure. For enterprise development, maintainability often matters more than a one-off demo.
Practical Takeaways for Developers
Complex HTML tasks show that the value of lightweight models is not just “generating code faster.” When a model can understand multi-step constraints, maintain geometric relationships, and orchestrate animation, it can take on more prototyping and interaction-validation work.
Still, developers should not blindly trust a model’s final output. A more reliable workflow is:
- Ask the model for an implementation plan first;
- Confirm the geometry and data structures;
- Generate code module by module;
- Validate progressively in the browser;
- Add export, error handling, and compatibility logic last.
For enterprise scenarios, this workflow can be integrated with code review, automated testing, log monitoring, and version control systems. If deployed in a cloud environment such as Baidu AI Cloud, you can further combine object storage for saving generated results, container platforms for running test pages, and monitoring alerts for collecting runtime exceptions—though the specific choices should depend on project scale and security requirements.
Conclusion
Whether a lightweight flagship model is truly strong cannot be judged by advertised parameter counts, or by whether one answer “looks like” a completed task. A more scientific approach is to test whether it can complete the full loop under complex constraints:
- correctly understand the requirements;
- formulate an executable plan;
- generate well-structured code;
- complete the dynamic process as specified;
- verify the final result;
- keep fixing issues based on feedback.
Using a task like constructing a regular heptagon with a two-marked ruler as an example: what truly differentiates models is not whether the page shows a heptagon, but whether the model faithfully reproduces the construction logic and makes every intermediate step observable, explainable, and verifiable.
This suggests that model evaluation should shift from “does the output look right” toward “is the process correct, is the result stable, and can the code be maintained.” For developers, mastering this evaluation method is more practically valuable than comparing model names or single speed metrics.
