Evaluating Lightweight LLMs with a Neusis Heptagon Construction Test in HTML
Traditional benchmark tests can no longer reliably distinguish between lightweight and flagship large language models. This article introduces a strict, verifiable evaluation method built around an animated straightedge-and-compass geometric construction in HTML—specifically, constructing a regular heptagon using a marked ruler (neusis). Through a controlled experiment comparing a lightweight "flash"-tier model with a flagship "max"-tier model, the article demonstrates why instruction following, domain knowledge, and execution path matter more than visual polish, and outlines a practical framework developers can use to build their own model evaluation methodology.
Why We Need a Harder Benchmark
In the model evaluation community, there is growing awareness of the limitations of traditional benchmarks. Popular novelty tests—such as generating an animated page featuring a cartoon character—are intuitive but no longer effective at differentiating model tiers. These tasks allow too much freedom in how the solution path is chosen: a model can deviate from the instructions and still produce something that “looks good.”
A better test should satisfy three conditions simultaneously:
- Strong constraints: The task description specifies an explicit sequence of steps, and the model must follow them one by one.
- Verifiability: The final output (geometric figures, animation trajectories, etc.) can be judged by humans or programs against the requirements.
- High difficulty: The task embeds deep domain knowledge, creating a meaningful gap between models.
The test in this article follows this approach: the model must use an HTML page to draw an animated straightedge-and-compass construction, specifically “constructing a regular heptagon with a marked ruler (neusis).” On the surface it’s just “draw a web page,” but it contains multiple hidden traps.
Breaking Down the Test Task
The complete prompt consists of the following steps:
- Take a square and construct the perpendicular bisector of its bottom edge;
- Using the bottom-right vertex as the center, draw a circle with the diagonal length as the radius;
- Using a “marked ruler” (neusis), keep it pressed against the bottom-left vertex while sliding the first mark along the circle until the second mark passes through the perpendicular bisector of the bottom edge;
- Fill in all the omitted standard compass-and-straightedge steps (locating centers, dividing the circumference, etc.);
- Finally, add a GIF export feature.
The reason this task can “make flagship models fail” lies in several key difficulties:
- Geometric knowledge barrier: A regular heptagon is a classic case of impossibility in exact straightedge-and-compass construction. The model must understand the given approximate construction method rather than inventing its own incorrect path.
- Strict step dependencies: Each geometric element builds on the output of the previous step; any deviation in one step cascades into misalignment for everything that follows.
- Distinguishing trajectories from traces: The prompt explicitly requires that “traces appear only where necessary,” testing the model’s control over animation details.
- Additional engineering requirement: GIF export involves Canvas frame-sequence composition or frame-by-frame encoding, providing an extra test of front-end engineering capability.
Experiment Design: Test Group and Control Group
To observe performance differences across model tiers, this article set up a simple controlled experiment, testing both a lightweight model and a flagship model within a coding assistant tool.
Test Group: The Lightweight Model’s Performance
The performance of a certain lightweight “flash”-tier model was surprisingly good. Observing its reasoning process revealed two phenomena:
- Non-smooth reasoning output: The reasoning-phase text appeared in intermittent bursts rather than the usual continuous streaming, possibly related to segmented scheduling in the inference framework.
- A “thinking without output” phase: The model engaged in extended internal reasoning before producing its formal answer, with total elapsed time on the order of thirty minutes.
However, the final HTML page followed every single step of the prompt: the perpendicular bisector was positioned correctly, the auxiliary circle’s center and radius matched the definition, the marked ruler’s sliding logic and constraints were properly represented, the omitted standard construction steps were correctly filled in, and the GIF export feature worked.
Control Group: The Flagship Model’s Failure
As a control, a certain flagship “max”-tier model spent roughly twenty minutes generating a page that “seemed to meet the requirements”: a regular heptagon did indeed appear on the page.
But upon examining its implementation logic, the problems immediately surfaced: its construction method did not match the steps described in the prompt at all. Instead of following the specified marked-ruler method, the model added extra steps that did not exist in the task, forcibly cobbling together the final figure. This “correct result, wrong path” answer sheet is precisely the failure mode most worth guarding against in evaluation, because the model uses deviation from instructions to mask its knowledge gaps.
What These Results Tell Us About Capabilities
Comparing the two experiments yields several insights:
1. Instruction following is not the same as reasoning ability. The flagship model excels at producing visually polished pages, but when the task demands strict adherence to a prescribed mathematical path, it chose to “rewrite the problem.” The lightweight model, by contrast, was more robust in constraint compliance—suggesting that instruction following is a trainable capability independent of model scale.
2. The depth of domain knowledge determines the ceiling. Geometric construction tasks require the model to build mappings across three layers: knowledge recall, geometric reasoning, and code implementation. The lightweight model’s ability to fully reproduce the construction path shows it can invoke mathematical knowledge accurately at a flagship-level standard.
3. Speed is not the only trade-off dimension. The lightweight model’s weaknesses lie in output speed and reasoning fluency. But on the quality of a complex single-turn task, the gap between it and the flagship model is far smaller than the parameter tiers would suggest—in this test, it could even go head-to-head with the flagship tier.
Building Your Own Model Evaluation Methodology
Developers can set up their own evaluation system using the following workflow:
1. Choose strongly constrained tasks: mathematical constructions, state machine simulations, multi-step workflow orchestration2. Define scoring dimensions:- Step compliance (does it follow the instructed path?)- Final correctness (does the result meet the requirements?)- Code quality (structure, maintainability)- Additional features (export, interactivity, etc.)3. Control variables: identical prompt, identical generation parameters, multiple repeated runs4. Record process metrics: reasoning duration, first-token latency, retry counts on failure
The core principle is: don’t just look at the result—look at the path. A model that strictly solves a problem along a specified path is more trustworthy than one that happens to reach a correct answer through “free improvisation.”
Conclusion
The rapid iteration of lightweight models is challenging the entrenched assumption that “parameter scale equals capability.” For cost-sensitive scenarios such as bulk code generation and agent invocation, lightweight flagship-tier models may already be sufficient. For interactive scenarios demanding the smoothest possible experience, speed differences remain a factor to weigh. A scientific evaluation methodology—strongly constrained tasks plus process auditing plus multi-dimensional scoring—is the only reliable basis for making sound model selection decisions. Before choosing a model, designing a test that can “make flagship models fail” is often more valuable than consulting any leaderboard.
