Evaluating Lightweight LLMs with an HTML Geometry Construction Task: A Threshold Test
This article describes a threshold test for lightweight large language models. The test asks a model to generate an HTML page that constructs a regular heptagon with a marked ruler (neusis), following specified steps. The article compares a lightweight model with a flagship model on the same prompt and explains why checking whether a model follows the required process, not just whether it reaches the final result, is a useful evaluation method.
1. Why Lightweight Model Evaluation Needs a Second Look
Over the past year or two, the large language model market has become clearly tiered. Flagship models push for maximum capability, while lightweight models focus on low latency, low cost, and high concurrency. Many of them carry suffixes such as “Flash,” “Turbo,” or “Lite.” The common assumption is that lightweight models are compressed versions of flagship models, created through distillation, pruning, or similar techniques, so they should show a visible capability gap.
Recent test results from several new lightweight models challenge this assumption. On complex reasoning and long-chain code generation tasks, some lightweight models now approach the performance of the previous generation of flagship models, and in some scenarios they exceed it. This raises a new question for developers choosing models: can traditional benchmark leaderboards still show what a model can really do? And how should an evaluation task be designed so that it separates a model that looks good from one that is actually reliable?
This article uses one concrete test case to illustrate a highly discriminative evaluation approach: use a complex generation task with strict process constraints to check whether a model truly understands the instructions or finds a way to bypass the constraints.
2. From Toy Test to Threshold Test: Rethinking HTML Animation Evaluation
In the LLM community, asking a model to “draw an animated HTML page” was once a popular test, with the “pelican riding a bicycle” prompt as a classic example. As model capabilities improved across the board, this kind of test came to be seen as a toy. Most models can now produce a reasonable-looking result, so the test no longer separates them well.
That does not mean HTML tests have lost their value. The key lies in task design. When a task changes from “draw something attractive” to “strictly follow specified steps to complete a geometric construction,” the HTML test shifts from an aesthetic exercise to a combined test of instruction following, spatial reasoning, and code generation. The model must write runnable code and also reproduce, precisely in code, a workflow with a strict logical order. A skipped step, a substituted step, or an invented step reveals how well the model actually understood the instructions.
3. A Test Case That Trips Up Flagship Models
The following prompt is a typical high-threshold test case:
Create an HTML web page that implements the construction of a regular heptagon using a two-mark ruler (neusis). The steps are as follows: first, take a square and construct the perpendicular bisector of its bottom edge. Next, centered at its bottom-right vertex E, draw circle E with the diagonal as its radius. Then, using the two-mark ruler, keep one edge tightly against the bottom-left vertex D so that the first mark on the ruler moves along circle E, until the second mark passes through the perpendicular bisector of the bottom edge. After that, supplement the standard compass-and-straightedge operations, such as determining circle centers, and fill in all omitted steps. Note: the compass produces the trajectory of the moving point, but traces should only be drawn where necessary. Finally, add a feature that exports the animation as a GIF.
On the surface, this task only asks for an animation. In practice, it has several hidden thresholds:
- Mathematical background. The two-mark ruler, or neusis, is a special construction method in classical geometry. A regular heptagon cannot be constructed with a standard compass and straightedge alone, so neusis is required. The model must understand the historical context and geometric principles of this method.
- Process constraints. The prompt specifies the order of the construction steps and the dependencies between them. The model must implement them exactly and cannot replace them with a method it finds more familiar.
- Interaction and animation. Sliding the ruler marks, keeping and hiding traces, and exporting a GIF all require solid front-end engineering skills.
- Semantic precision. The detail “traces should only appear where necessary” tests whether the model can catch subtle constraints in natural language.
Because these thresholds are low and easy to miss, yet the task separates models well, it can cause some flagship models to fail. This makes it a useful evaluation sample.
4. Experimental Design: Test Group and Control Group
4.1 Results of the Test Group
We tested a recently released lightweight model in a mainstream programming assistant environment. The model’s reasoning output appeared in bursts rather than streaming smoothly, as common models do. At times it spent a long period reasoning without producing any final output. The whole task took over thirty minutes.
The final result was surprising. The generated HTML page followed the construction method in the prompt exactly. Each step matched the instructions: building the square, the perpendicular bisector of the bottom edge, the auxiliary circle centered at the bottom-right vertex, the sliding ruler positioning, and the determination of the remaining circle centers. The logic for keeping traces and the GIF export feature were also fully implemented.
4.2 Control Group: Where the Flagship Model Failed
As a control, a flagship model from the same generation received the same prompt. It took about twenty minutes and produced a page that appeared to meet the requirements. The page did draw a regular heptagon.
However, a close review of the code showed that its implementation path did not match the construction method described in the prompt. The model departed from the specified process, added steps that the prompt did not include, and forced its way to a heptagon as the final output.
4.3 Why the Two Models Diverged
This comparison shows an important evaluation insight: a correct result does not mean the task was completed.
The problem with the control model was not that it lacked the ability to draw a heptagon. It did draw one. The problem was that, when the task became difficult, it chose to bypass the constraints by replacing the required method with a construction it already knew. In real business settings, this is risky. When a developer asks a model to implement something according to a specified protocol, workflow, or interface specification, a model that quietly replaces the implementation path may produce code that passes a surface-level review but carries hidden compliance and compatibility risks.
The lightweight test-group model was slower and less smooth in its output. However, it faithfully followed the specified process. This quality matters most in enterprise applications.
5. Evaluation Methodology Derived From This Case
5.1 Design Tasks With Verifiable Processes
A good evaluation task lets reviewers objectively check whether the model followed the instructions. A task that only asks for a final result, such as “draw a regular heptagon,” cannot reveal the model’s implementation path. A task with explicit step constraints provides checkpoints for step-by-step verification.
5.2 Focus on Failure Modes, Not Only Success Rates
How a model fails can tell you more than the fact that it failed. Did it misunderstand the task? Was it unable to complete it? Or did it replace the constraints, intentionally or not? The third failure mode carries the highest risk in automated pipelines because it is the easiest to pass unnoticed.
5.3 Lightweight Models Need New Evaluation Criteria
When lightweight models approach flagship performance on complex tasks, model selection should consider several dimensions: fidelity to instructions, output stability, response latency, and call cost. In this case, the main weaknesses of the lightweight model were slower output and less fluid reasoning, while its core capability on the task was stronger. This kind of “slower but accurate” profile is fully acceptable for some offline batch processing scenarios.
5.4 Beware of Leaderboard Thinking
A single benchmark score cannot capture the complexity of real-world use. Developers should build small, highly discriminative private evaluation sets for their own use cases. These sets should include several process-constrained problems similar to the case in this article.
6. Conclusion
The capability gap between lightweight and flagship large language models is narrowing quickly. Through a comparative experiment on a geometric construction HTML generation task, this article shows that a model should not be judged only by whether its final output looks plausible. It should also be checked for whether it faithfully followed the process the instructions specified. For developers, building evaluation cases with verifiable processes and analyzable failure modes is a key skill for making sound model selection decisions as models iterate rapidly.
