Evaluating Lightweight LLMs on Complex HTML Tasks: Measuring Real-World Capability
This article explains why lightweight model tiers can no longer be assumed to trail flagship models. It proposes a practical evaluation method built on a compass-and-straightedge animation task. The method tests geometric reasoning, process correctness, constraint following, and output stability, and it covers common failure modes and an engineering checklist for repeatable testing.
1. Why “Lightweight Flagship” Models Need a Fresh Look
Over the past year or so, large language models have been released at an accelerating pace, and the line between “flagship” and “lightweight” models is becoming blurry. Lightweight models generally refer to model families with significantly fewer parameters or lower inference costs than their flagship versions. Their main selling points are low latency and low cost. The industry convention is to mark them with suffixes such as “flash,” “mini,” or “lite.” Traditionally, these models were positioned for simple conversation, summarization, and format conversion, and they clearly trailed flagship versions on deep reasoning tasks.
Recent observations show that some lightweight models now approach, or even match, their own flagship versions on certain difficult tasks. This challenges the assumption that “lightweight means reduced capability.” It also raises a key question: which benchmark should we use to judge a model’s real level?
2. Limits of Traditional Evaluation: Why “Toy” Stress Tests Are Needed
Public benchmark leaderboards have several common problems:
- Data contamination risk. Well-known evaluation sets circulate widely online. A model may have seen the questions and answers during training, which inflates its scores.
- Insufficient discrimination. When many models’ scores cluster tightly, the ranking differences often fall within the margin of error. They do not reflect real differences in user experience.
- Disconnect from real use. A high leaderboard score does not guarantee that a model works well in real development environments.
As a result, the community has adopted an alternative approach: designing tasks that look simple but demand strong overall capability. These are often called “toy tests.” A typical example is the “pelican riding a bicycle” task, an SVG or HTML animation. It does not test memorization. It tests end-to-end integration of spatial imagination, geometric reasoning, code organization, and visual presentation.
These tests are toys. They have small sample sizes and are highly subjective, so they are not rigorous academic benchmarks. As a gatekeeping filter, however, they are effective. A model that fails at such tasks is unlikely to be reliable on complex engineering work.
3. A High-Discrimination Test: Compass-and-Straightedge Construction Animation
One prompt that has repeatedly shown high discrimination asks the model to build an HTML animation of a compass-and-straightedge construction. The example below constructs a regular heptagon with a two-mark ruler (neusis construction):
Create an HTML page that animates the construction of a regular heptagon using a two-mark ruler, following these steps:1. Take a square and construct the perpendicular bisector of its bottom edge.2. Using the bottom-right vertex E as the center and the diagonal as the radius, draw circle E.3. Keep the two-mark ruler pressed against the bottom-left vertex D. Move the first mark along circle E until the second mark passes through the perpendicular bisector of the bottom edge.4. Complete the remaining standard construction steps, such as using perpendicular bisectors to locate centers.5. Requirement: the compass should produce a moving point trajectory, but only the necessary parts should leave a trace.6. Finally, add a feature to export the animation as a GIF.
The task is hard for several reasons:
- Geometric reasoning: The model must understand what each construction step means geometrically. Reciting a general result is not enough.
- Process reconstruction: The animation must show the construction step by step, not only the final figure. This tests how the model represents intermediate states.
- Constraint adherence: Details such as “the compass leaves traces only where necessary” are often ignored or improvised.
- Engineering integration: Animation timing, state management, and GIF export together test front-end engineering skills.
4. Typical Failure Modes: Flagship Models Also Fail
In testing, even some flagship models show the following failure modes. Developers should watch for them.
Pattern 1: Deviating from the specified path to reach the result. This is the most subtle failure. The final page does draw a regular heptagon, so it looks correct. However, the construction process does not match the steps in the prompt. The model may add steps that the prompt does not describe, or it may take a shortcut by computing coordinates directly with analytic geometry. This matters most where process correctness is required, such as teaching demonstrations or algorithm explanations. Evaluators who check only the final screenshot can easily be misled.
Pattern 2: Thinking without producing output. Some reasoning models spend a long time on chain-of-thought and then delay or never produce the final code. The thinking stream may stall or stutter, and the request may eventually time out. Reasoning budget and output stability are evaluation dimensions that teams often overlook.
Pattern 3: Lost constraints. Detailed requirements in a long prompt, such as the GIF export or the rule for leaving traces, can be forgotten during generation. This shows that instruction following over long contexts is still a weakness for many models.
5. Engineering Practices for Evaluation
Based on these observations, teams can use the following reproducible evaluation method:
1. Fix the environment and toolchain. Run all tests through the same coding tool or inference framework. Keep settings such as temperature and context length consistent. When comparing two models on the same prompt, eliminate environmental differences.
2. Record process metrics, not only results. Track:
- End-to-end latency, including thinking time
- Continuity of the thinking stream and the number of interruptions
- A constraint checklist that verifies each requirement in the prompt
- Process correctness, meaning whether the construction or algorithm steps match the problem
3. Read the code to verify the process. For geometry tasks, read the generated logic directly. Check whether coordinates are computed analytically or derived step by step from the construction. Simple assertion scripts can verify that key intermediate points fall on the expected trajectories:
// Verify that circle E is centered at E and has the diagonal as its radiusconst radius = Math.hypot(w, h); // Length of the diagonalassertCircle(centerE, radius);// Verify that the trail appears only on the required arcsassertTrailSegments(allowedArcs);
4. Sample repeatedly. A single success may be luck. Run each task three to five times and calculate the success rate. This is the metric worth reporting externally.
5. Weigh output speed against quality. A lightweight model may meet quality targets but still generate slowly enough to hurt the experience in interactive use. The quality, speed, and cost trade-off is the final basis for model selection.
6. Conclusion
The fast progress of lightweight models changes how teams should select models. A suffix no longer signals a capability ceiling, and a flagship model does not guarantee error-free output. Instead of relying on leaderboards, teams should build a multi-dimensional evaluation process that covers process correctness, constraint adherence, stability, and efficiency. They should validate models repeatedly with high-discrimination composite tasks. For enterprise users, this kind of test is low cost, reproducible, and an efficient way to choose and accept models before launch. Cloud platforms that offer hosted model services and evaluation tools can help teams turn this process into automated, ongoing regression testing, so each model upgrade is checked against evidence.
