Testing Lightweight LLMs: Evaluating True Capabilities via HTML Geometric Constructions
Lightweight LLMs offer low costs and fast responses, making them attractive for edge deployment. However, standard benchmarks often fail to accurately measure the gap between lightweight and flagship models in real-world scenarios. This article explores using a complex HTML neusis construction of a regular heptagon as a custom evaluation task to probe model boundaries. It details observations from comparing a lightweight model against a flagship model, and provides a practical framework for designing your own process-level evaluation tasks, including acceptance tables and statistical design strategies.
Lightweight models offer low invocation costs and fast response times, making them highly suitable for edge deployment. As a result, an increasing number of developers are integrating them into their business pipelines. The core question, however, is how far their capabilities truly lag behind flagship models—a question that common evaluation methods struggle to answer.
Public benchmarks typically suffer from two main issues. First, the questions are often subject to targeted optimization, meaning benchmark scores may not align with daily user experience. Second, most benchmarks rely on single-turn Q&A, failing to reflect a model’s performance in multi-step, multi-constraint tasks. Consequently, many teams are pivoting to custom-designed composite tasks to explore capability boundaries. The HTML geometric construction task discussed in this article falls into this category.
II. The Test Task: Demonstrating a Neusis Construction of a Regular Heptagon in HTML
2.1 Task Points
The task requires the model to write an HTML page that dynamically demonstrates the process of constructing a regular heptagon using the neusis construction method. The primary constraints include:
- Complete the construction in a specified sequence; skipping steps, altering the order, or adding self-initiated steps is prohibited.
- Omitted compass and straightedge steps must be completed, and the compass should only retain necessary traces.
- The page must provide a GIF export functionality.
2.2 Why It Differentiates Models
It is mathematically proven—by Gauss and Wantzel—that a regular heptagon cannot be constructed precisely using only an unmarked straightedge and compass. The neusis construction (using a marked ruler) exceeds the boundaries of pure compass-and-straightedge methods and allows for an exact construction. To complete this task, the model must understand the underlying geometric logic; it cannot simply rely on memory to draw a shape that roughly resembles a heptagon.
The task simultaneously evaluates multi-step instruction execution, geometric coordinate calculation, animation timing control, and GIF export implementation. An error in any single component will typically be exposed in the final output.
2.3 Information Needed for Reproduction
The original prompt text is not fully included in this article. To reproduce the experiment, the following elements must be defined beforehand; otherwise, results from different runs cannot be compared:
- The side length of the square and the coordinate system origin.
- The tick spacing of the marked ruler, and the correspondence between the two marks, the circle, and the perpendicular bisector.
- The tolerance for determining if the “second mark exactly passes the perpendicular bisector” (e.g., acceptable pixel deviation).
- The input, output, and completion criteria for each step.
III. Observations from a Personal Exploration
3.1 Experimental Conditions
This exploration was a personal experiment without a strict control group design. The two models tested are referred to as the “lightweight model” and the “flagship model.” The model versions, temperature, maximum output length, and execution dates were not fully recorded, so this article does not provide a precise ranking of the models. Each model was run only once.
3.2 Lightweight Model Performance
The lightweight model’s thought process was not entirely fluid. The output was often intermittent, occasionally entering prolonged phases of thinking without generating output. The overall process was noticeably slow, though the timing metrics were not standardized, making direct comparisons with other models difficult.
However, the final HTML page was relatively complete. In this run, it generated the construction steps in the correct order, and auxiliary lines and compass traces only appeared where necessary. The GIF export function also worked correctly.
3.3 Flagship Model Performance
The page generated by the flagship model featured a regular heptagon, which superficially met the requirements. However, upon closer inspection of the construction process, it became evident that the model independently introduced construction methods not present in the prompt, essentially cobbling the final shape together. This “correct result, deviated process” scenario is very difficult to spot if one only looks at the final rendered page.
3.4 What Can We Conclude?
A single sample can only indicate that, in this specific run, the lightweight model followed the instructed construction process, while the flagship model deviated procedurally. It does not prove that lightweight models are universally superior to flagship models, nor does it imply that the capability gap between the two has vanished. Reaching such a conclusion would require multiple repeated runs and blind evaluations.
IV. How to Design Your Own Model Capability Tests
4.1 Choose Composite Constraint Tasks
A good test task should simultaneously evaluate multiple capabilities, such as mathematical reasoning, code generation, instruction following, and engineering implementation. The constraints should not overlap; otherwise, the same capability will be scored repeatedly. You can refer to the following template:
Task Goal: Use an HTML page to fully demonstrate a classic mathematical construction process.Hard Constraints: The step sequence must match the description; introducing unmentioned auxiliary methods is prohibited.Soft Constraints: Animation pacing, export functionality, visual presentation.Acceptance Criteria: Verify intermediate processes step-by-step, rather than just checking the final result.
4.2 Establish Process-Level Acceptance Tables
Each construction step should have an independent acceptance item. Below is an example structure:
| Step ID | Expected Input & Output | Pass Criteria | Failure Criteria | Evidence |
|---|---|---|---|---|
| S1 | Draw a square and construct the perpendicular bisector of the base | The bisector is perpendicular to the base and passes through the midpoint | Missing, misaligned, or extra auxiliary lines | Screenshot or coordinate log |
| S2 | Draw a circle with the bottom-right corner as the center | The radius equals the diagonal length | Incorrect radius or center | Screenshot and radius value |
| S3 | Slide the marked ruler to the判定 position | The second mark passes the bisector within the preset tolerance | Exceeds tolerance or step skipped | Animation keyframes |
| S4 | Determine the center and locate the vertices | Seven vertices are equally spaced on the circumference | Vertex count is not 7 or spacing is uneven | List of vertex coordinates |
| S5 | Export GIF | The file is playable and matches the page animation | Cannot export or frame sequence is wrong | Exported file |
4.3 Statistical Design
Single-run results can easily lead to misjudgments. It is recommended to design your evaluation as follows:
- Run each model at least 5 times; conclusions from too few samples are unreliable.
- Fix the temperature and maximum output length, and record the model version and run date.
- Define “success” in advance—for example, it must pass all process-level acceptance items simultaneously.
- Have two reviewers score independently, with a third reviewer acting as a tiebreaker. If conditions permit, use blind evaluation where reviewers do not know which model generated the output.
4.4 Three Typical Failure Modes
| Failure Mode | Symptoms | Diagnostic Significance |
|---|---|---|
| Faked Results | Correct geometry, but process deviates from the prompt | Insufficient instruction-following capability |
| Partial Implementation | Only completes a simplified version | Insufficient mathematical or logical reasoning |
| Engineering Shortcomings | Correct logic, but missing features | Insufficient code generation and debugging capabilities |
V. Practical Recommendations
- Do not rely solely on benchmark scores. Extract a few composite tasks from your own business scenarios to create an internal evaluation set.
- Lightweight models are more suited for low-frequency scenarios that require a certain depth of reasoning. If your business is latency-sensitive, pair them with techniques like caching and streaming output.
- Record evaluation conditions. Save the model version and run parameters for every execution.
