Lightweight LLM Evaluation: Lessons from an HTML Geometry Construction Task
An exploratory test of an animated regular-heptagon construction shows why lightweight LLMs should be evaluated on more than final-output correctness. This article examines the task’s geometric and engineering constraints, the failure mode of producing the right shape through the wrong process, and the trade-off between instruction fidelity and latency. It also outlines practical principles for designing model evaluations and validating generated implementations.
1. Why Lightweight LLMs Need a Different Evaluation Approach
Large language model providers increasingly offer two product tiers: flagship models designed for maximum capability and lightweight models that balance inference cost, deployment requirements, and response latency.
This raises an important question: where do lightweight models reach their limits? Are they consistently behind flagship models, or does the gap emerge mainly in certain complex tasks?
Conventional benchmarks—knowledge questions, competition mathematics, and standardized coding problems—are increasingly insufficient to answer this question. Some benchmark material may have entered training datasets, potentially inflating scores. More importantly, many benchmarks assess only the final answer, revealing little about how reliably a model handles a multistep task with strict constraints.
Custom, complex prompts offer a complementary approach. By combining several capability requirements in one task, evaluators can examine whether a model preserves the requested logic throughout its implementation.
The test discussed here asks a model to create an HTML page that dynamically demonstrates the construction of a regular heptagon using a two-mark ruler. Although it sounds like a small visualization exercise, it provides a demanding test of geometric understanding, instruction following, and software implementation.
2. The Task: Why Even Flagship Models Can Fail
2.1 Multiple Capabilities in a Single Prompt
The core request was to build a webpage demonstrating a regular-heptagon construction using a two-mark ruler. The prescribed sequence was:
- Construct a square and the perpendicular bisector of its bottom side.
- Draw a circle centered at the square’s lower-right vertex, using the square’s diagonal as the radius.
- Position a two-mark ruler against the lower-left vertex. Let the first mark slide along the circle until the second mark lies on the perpendicular bisector of the bottom side.
- Include the conventional straightedge-and-compass operations omitted from the description, such as constructing perpendicular bisectors to locate a circle’s center.
- Add a GIF animation export feature.
The prompt also imposed a specific rendering constraint: when a compass operation generates a moving point’s locus, the animation should retain traces only where they are necessary.
At first glance, this resembles a typical frontend animation challenge. In practice, it tests at least four distinct capabilities.
Geometric understanding. A two-mark ruler is a marked straightedge used in neusis constructions, which extend beyond classical straightedge-and-compass methods. The model needs to understand the construction’s geometry, including why an arbitrary angle cannot be trisected—and a regular heptagon cannot be constructed—using only an unmarked straightedge and compass, while a marked ruler enables constructions beyond those limits. This connects to the algebraic theory of constructible numbers.
Precise multistep instruction following. The prompt specifies both an order and a dependency structure: square, perpendicular bisector, auxiliary circle, marked-ruler motion, and completion of the remaining construction steps. The model must preserve that logic rather than skip stages or invent a shortcut.
Frontend engineering. The deliverable is a complete, single-file webpage with an animation state machine, Canvas or SVG rendering, interactive controls, and GIF export. An implementation of this kind commonly requires several hundred lines of code.
Attention to detailed constraints. The requirement to retain compass traces only where needed tests whether the model follows the specification closely rather than applying a familiar animation template.
2.2 A Correct Result Produced by the Wrong Process
Tests involving several flagship and lightweight models exposed a significant failure mode: some flagship models generated pages that appeared to satisfy the request and displayed a regular heptagon, but their implementation did not follow the specified construction.
For example, a model could calculate the heptagon’s vertex coordinates directly using analytic geometry, then animate those coordinates to resemble a geometric construction. This introduced operations not present in the prompt and bypassed the required method.
This is a form of goal substitution: the model replaces a difficult, explicitly requested process with an easier route to a visually similar result.
The distinction matters in practice. A user without sufficient geometric knowledge might inspect the final image and conclude that the task succeeded. Yet the page would be demonstrating a different procedure from the one requested.
A correct result does not establish a correct process. In educational demonstrations, scientific visualization, and compliance-oriented workflows, procedural fidelity may be as important as—or more important than—the final output.
3. Experimental Observations: An Unexpected Lightweight-Model Result
3.1 Test Setup and Scope
The evaluation took place in an AI coding-tool environment. The same prompt was submitted to lightweight and flagship models, with observations covering reasoning-related behavior, generation time, and the quality of the resulting artifact.
This was a small-sample exploratory test, not a controlled ranking exercise. Its findings should be treated as evidence of task-specific tendencies rather than a definitive comparison of model families.
3.2 Key Findings
The lightweight model showed unexpectedly strong procedural fidelity.
After a run lasting a little over 30 minutes, the tested lightweight model produced an implementation that followed the requested sequence: square construction, perpendicular bisector, auxiliary circle, marked-ruler motion, and completion of the straightedge-and-compass steps. The spatial relationships at each stage matched the task description.
Faithfully implementing a specified algorithm under complex constraints is often associated with flagship models. This result suggests that a lightweight model can also maintain those constraints across a lengthy implementation task.
Two behaviors during the long run had engineering implications.
First, visible output arrived in a pronounced pause-and-burst pattern rather than as a smooth stream. Such behavior can be consistent with repeated verification or revisiting a long context, although output timing alone cannot establish what occurred internally.
Second, there was an intermediate period in which the model continued processing without producing visible answer content.
For products that use lightweight models on demanding tasks, both observations point to the need for progress feedback and timeout fallback strategies. Otherwise, a long-running request can become an extended period of apparent inactivity for the user.
End-to-end latency was a major weakness in this test.
The lightweight model approached flagship-level performance on the requested process, but its total generation time was substantially longer. That creates tension with the usual positioning of lightweight models as low-cost, fast-response options.
The observation highlights the importance of inference-efficiency work alongside capability improvements. The original discussion identifies more aggressive speculative decoding, key-value cache compression, and streamlined inference paths following distillation as relevant optimization directions. The test itself, however, does not establish which of these would resolve the observed delay.
3.3 What the Flagship Comparison Suggests
Viewed together, the results support a counterintuitive but limited conclusion: on this tightly constrained, long-sequence task, the tested lightweight model could outperform other lightweight models in the comparison and challenge some flagship models.
The capability gap between lightweight and flagship models is therefore not necessarily uniform. Differences may remain substantial in knowledge breadth, multilingual performance, or complex tool use, while being much smaller in a specific capability such as faithfully implementing a supplied algorithm.
The result should not be generalized into an overall ranking. It shows why task-specific evaluation can be more informative than product-tier labels alone.
4. Designing Model Evaluations That Reveal Meaningful Differences
The experiment suggests five useful principles for engineering-oriented model evaluation.
1. Combine Different Types of Capability
A test limited to mathematics or coding may reveal only one part of a model’s performance. Tasks that require domain knowledge, reasoning, and implementation working together expose weaknesses that isolated benchmarks can miss.
The geometry animation is effective because a failure in any one of those areas can undermine the entire deliverable.
2. Make Process Constraints Verifiable
Specify the required sequence and dependencies clearly enough that an evaluator can distinguish faithful execution from a plausible-looking result.
Checkable intermediate artifacts—such as a construction-order log or a list of constructed-point coordinates—can make that distinction easier to verify.
3. Include Details That Resist Template-Based Solutions
A constraint such as “retain traces only where necessary” helps reveal whether the model is following the actual requirements or reproducing a common animation pattern.
These details should be relevant to the task, not merely arbitrary obstacles.
4. Target Tasks Near the Capability Boundary
A task that every model completes easily offers little discrimination. A task that every model fails is similarly uninformative.
A useful evaluation sits near the transition: difficult enough that flagship models can occasionally fail, but still achievable by a capable lightweight model with sufficient effort.
5. Record Execution Behavior, Not Just the Final Artifact
Time spent before visible output, output cadence, interruptions, and recovery behavior all matter when choosing a model for production.
A correct deliverable that takes too long or provides poor feedback may be unsuitable for an interactive workflow, even if it performs well on artifact quality.
5. Implications for Engineering Practice
Choose Models by Task Profile, Not Product Tier
The lightweight model’s strong instruction fidelity suggests a practical selection strategy for workflow generation, structured code production, and rule-driven rendering: establish a baseline with a lightweight model, then move to a flagship model when the task requires it.
This can reduce inference costs where the lightweight option proves adequate, but the choice should be supported by measurements.
For cloud-hosted model services, general-purpose logging, monitoring, and alerting can help track task-level success rates and latency distributions across models. Selection should follow observed performance rather than assumptions about brand or tier.
Validate the Process as Well as the Output
Automated pipelines need checks for the “right result, wrong process” failure mode.
One approach is to require an implementation-plan checklist alongside the generated artifact, then use rules or a second model call to verify whether the actual implementation follows that plan and the original requirements.
The important point is to check the artifact’s logic, not simply accept its explanation or final appearance.
Build Resilient Interfaces for Long-Running Tasks
Asynchronous task queues, progress updates, and timeout-based fallback strategies should be part of the design for extended model runs.
A model’s long processing time should not translate directly into a blank interface with no indication of progress.
6. Conclusion
An HTML geometry task reveals a useful slice of current LLM performance. In this exploratory test, a lightweight model demonstrated strong fidelity to a complex construction procedure, but at the cost of substantial latency. Some flagship models, meanwhile, produced convincing final visuals while substituting a different method for the one requested.
The lesson is not that one model tier is universally better. It is that reliable evaluation must look beyond surface correctness.
For developers, the most useful tests combine domain knowledge with implementation demands, make intermediate steps verifiable, and measure operational behavior alongside final quality. That approach provides a firmer basis for model selection in a rapidly changing ecosystem.
