Testing Lightweight LLM Reasoning with a Neusis-Ruler Task: Constructing a Regular Heptagon
As hybrid mixture-of-experts architectures, sparse activation, and inference acceleration mature, a wave of "lightweight flagship" models has entered enterprise evaluation. This article argues that traditional interactive HTML page-generation prompts are losing their power to distinguish models, and proposes a hard-constraint alternative: dynamically constructing a regular heptagon with a two-marked (neusis) ruler. It explains the mathematical background, provides a full executable evaluation prompt, describes a small-sample comparison, shows how to document failure cases with an evidence chain, and offers a four-dimension scoring rubric plus practical acceptance recommendations for model-selection teams.
1. How to evaluate lightweight models: from toy problems to hard-constraint problems
Over the past couple of years, the maturation of hybrid mixture-of-experts architectures, sparse activation, and inference acceleration has brought a wave of “lightweight flagship” models into enterprise evaluation. They perform well in edge deployment, high-concurrency serving, and cost-sensitive tasks, and they have pushed teams to reconsider a question: as model capabilities converge, how do you actually evaluate a lightweight model?
If you judge model strength only with traditional interactive HTML page-generation prompts, you can easily reach a distorted conclusion. The reason is that this kind of problem is too easily diluted by “just getting it done”: the page runs, the animation moves, the visuals look the part, but whether the model truly understands the constraints, follows the specified method, and maintains reasoning consistency across a complex chain usually goes unseen.
For that reason, this article uses “constructing a regular heptagon with a two-marked ruler” as its evaluation sample. It looks like a math-heavy construction problem, but it actually examines three dimensions at once: mathematical difficulty, engineering implementation, and instruction following. Compared with “does the page look good,” this kind of problem is better suited to model acceptance and selection comparisons.
2. Why simple HTML tests are gradually losing their edge
For a while, “have the model generate a dynamic HTML page” was treated as a litmus test for lightweight models. It does cover layout, animation, styling, and interaction, but the problems are also obvious.
First, saturation is too high. Most mainstream models can already generate a working page, and “it looks like it moves” is no longer scarce, so the discriminating power has dropped sharply.
Second, there is too much room for subjective judgment. Whether an animation looks good or a layout is reasonable often depends on personal taste and incidental first impressions, which makes a stable scoring standard hard to form.
Third, models can easily work around the constraints. Many animation problems have multiple implementation paths. A model can skip the method the problem specifies and instead “assemble” a result using coordinate calculation, off-the-shelf functions, ad hoc templates, or extra helper logic. The final image may be correct, but the process may not follow the instructions.
An evaluation problem with real discriminating power should satisfy two conditions: it must have a clear, hard-to-avoid mathematical or logical threshold, and every step must be objectively verifiable. Based on this idea, this article designed and observed the “two-marked ruler regular heptagon” task.
3. Mathematical background: why a regular heptagon needs a neusis ruler
A regular heptagon cannot be constructed with only an unmarked straightedge and compass using traditional straightedge-and-compass construction; this is a classic non-constructible problem. The necessary and sufficient condition for a regular n-gon to be constructible with straightedge and compass is related to Fermat primes. A Fermat prime is a prime of the form 2^(2^k) + 1. The number 7 is prime, but it is not a Fermat prime, so a regular heptagon does not satisfy the straightedge-and-compass constructibility condition.
From an algebraic standpoint, constructing a regular heptagon requires handling the cubic equation corresponding to cos(2π/7), typically of the form 8x³ + 4x² − 4x − 1 = 0. This kind of cubic equation falls into the so-called casus irreducibilis, the “irreducible case”: it has real roots, but they cannot be expressed using only square roots and must rely on extra geometric operations such as angle trisection or a sliding ruler.
The two-marked ruler is precisely one of the classic solutions. A two-marked ruler can be understood as a sliding ruler carrying two parallel marks, essentially an engineering expression of a neusis operation. It requires the ruler body to slide after satisfying a positioning condition, so that one mark lands on a specified curve while the other mark passes through another constraint line. The key to this operation is not “drawing it out” but “completing the positioning under a fixed spacing, a fixed datum, and a fixed constraint.”
This is why the problem naturally requires a model to understand: why is a conventional straightedge and compass not enough? What is the constraint of the two-marked ruler? When does it count as a hit? If a model merely draws circles, connects lines, and generates shapes mechanically, it can lose points on process correctness.
4. Task description: turning the neusis problem into an executable evaluation
To reduce subjectivity, the evaluation prompt cannot simply say “implement the two-marked ruler construction of a regular heptagon” — it has to spell out the constraints clearly. The following is a version better suited to model evaluation.
Draw an HTML page that dynamically demonstrates the two-marked ruler construction of a regular heptagon, meeting the following requirements:
- The canvas size is 1200 × 800, and the square side length is fixed at 180 pixels. First construct the square, then construct the perpendicular bisector of its bottom edge. The perpendicular bisector must be generated by straightedge-and-compass steps and must not be replaced by directly calling a fixed-coordinate function.
- Let the bottom-left vertex of the square be D and the bottom-right vertex be E. With E as the center and the diagonal length of the square as the radius, draw circle E.
- The two-marked ruler consists of two parallel marks L1 and L2, with a fixed spacing equal to the square side length of 180 pixels. During sliding, the ruler’s datum edge must stay flush against D, and the spacing between the two marks must not change.
- The goal of the two-marked ruler operation is: the first mark L1 slides along circle E, while the second mark L2 passes exactly through the perpendicular bisector of the bottom edge. The hit tolerance is set to 1 pixel; if the error between L2’s intersection with the perpendicular bisector exceeds 1 pixel, it must not be judged a hit.
- After a hit, use the standard perpendicular-bisector construction to determine the circumcircle center and vertices of the regular heptagon, and complete the necessary straightedge-and-compass construction details.
- The compass or sliding-ruler process may leave traces, but only the necessary ones should be kept — for example, circle E, positioning circles, the final key points, and the hit location. Do not retain a large amount of useless draft work.
- The page must export the full process as a GIF and output a JSON summary containing at least: the square side length, the radius of circle E, the two-marked ruler spacing, the L1 hit point, the L2 hit point, the equation of the perpendicular bisector, the final list of vertices, and the hit tolerance.
- If a step cannot be completed under the straightedge-and-compass or two-marked ruler constraints, it must clearly report a failure and must not force an approximate result using extra methods the problem did not ask for.
This version of the prompt turns “looks correct” into “verifiably correct”: whether the mark spacing is fixed, whether it slides through D, whether L1 lies on circle E, whether L2 falls within the tolerance of the perpendicular bisector, and whether it ultimately outputs the JSON and GIF. Each of these can be checked item by item.
5. Experiment design and observations: controlling the setup, avoiding overgeneralization
To compare model differences, this observation used a small-sample comparison approach. It should be emphasized that this is a single-case or small-sample observation and cannot be directly generalized into a universal conclusion about all models or all scenarios. When making a formal selection, a team should expand the sample size and record versions.
The experimental setup is as follows:
| Item | Setting |
|---|---|
| Comparison targets | Model A: a certain lightweight flagship model; Model B: a certain flagship large model |
| Version information | Formal evaluation must fill in the specific version number, invocation date, and evaluation record ID |
| Runtime environment | Run under the same AI coding tool, the same browser rendering environment, and the same network conditions |
| Prompt | Use the “two-marked ruler regular heptagon” evaluation prompt above |
| Timing definition | From submitting the request to completing the generation of the first runnable page |
| Verification method | Manual step-by-step checking against the step table, plus reviewing the page source, the JSON summary, and the GIF |
| Scoring focus | Whether it follows the two-marked ruler sliding constraint, whether it completes the straightedge-and-compass details, and whether it outputs the necessary artifacts |
In this small-sample observation, the difference between the two models showed up mainly in process adherence, not in whether a heptagon ultimately appeared.
| Model | Time | Step-conformance observation | Extra-operation observation | Conclusion |
|---|---|---|---|---|
| Model A, lightweight flagship | ~35 minutes | In this sample, the steps for the square, circle E, two-marked ruler sliding, and center completion basically matched the problem statement | No obvious extra steps that bypass the two-marked ruler constraint were found | The process is relatively controllable, but the speed is slow and more samples are needed to verify stability |
| Model B, flagship model | ~20 minutes | The page showed a regular heptagon, but the two-marked ruler sliding/positioning process did not fully match the problem statement | The model was observed to possibly generate the result through extra helper logic or an approximation | The result looks right, but process adherence is questionable and requires manual review |
This table shows that speed is not the only metric. Model A is slower but, in this sample, stays closer to the problem requirements; Model B is faster, but if it replaced a key constraint with extra steps, you cannot judge it the stronger model just because “the page runs.”
6. Writing failure samples: you need an evidence chain
In model evaluation, the most common misjudgment is treating “the result is correct” as equivalent to “the instruction was executed correctly.” Therefore, for a so-called failure sample, you should not just write “the model didn’t do it as the problem asked” — you should provide evidence.
If a model did not actually complete the two-marked ruler sliding positioning, you can record the following extra steps or suspicious implementations:
- It did not show the two parallel marks and instead computed the final heptagon directly through coordinates.
- It did not use the “ruler flush against D, spacing fixed” sliding process and instead skipped a key constraint.
- It added auxiliary circles or lines the problem did not ask for and used another method to force the intersection.
- It changed the two-marked ruler spacing so that it no longer matched the fixed 180 pixels in the problem.
- It replaced the construction process with a pre-written regular heptagon template or an approximate figure.
- It kept only the final figure in the compass trace and did not preserve the necessary positioning marks, making the process untraceable.
In a formal evaluation report, it is recommended to attach screenshots, source-code snippets, or logs. If there is no log evidence, you should write “an extra step was suspected” or “the process is inconsistent with the problem statement and needs manual review,” rather than using absolute wording like “completely doesn’t match.” This preserves the judgment while reducing the risk of misreading.
7. Scoring the neusis task: separating the goal from the process
To make lightweight model evaluation reusable, it is recommended to break scoring into four dimensions: goal achievement, process constraints, verifiability, and engineering closure.
| Scoring dimension | Weight | Checkpoints |
|---|---|---|
| Goal achievement | 30 | Whether a regular heptagon is ultimately formed, and whether the circumcircle and vertices are basically reasonable |
| Process constraints | 35 | Whether the square, bottom-edge perpendicular bisector, circle E, two-marked ruler spacing, L1/L2 hits, and center/vertex completion match the problem statement |
| Verifiability | 20 | Whether it outputs JSON, key coordinates, errors, tolerance, and step descriptions, and whether it is easy to review |
| Engineering closure | 15 | Whether the GIF plays, whether trace retention is restrained, and whether the page is interactive and reproducible |
Deduction items should be written out explicitly, for example:
- Not fixing the two-marked ruler spacing: deduct from process constraints.
- Not sliding with D as the datum edge: deduct from process constraints.
- Generating the result with out-of-scope auxiliary steps: deduct from process constraints.
- Not outputting the JSON summary or key parameters: deduct from verifiability.
- Retaining a large amount of useless trace: deduct from engineering closure.
- Being unable to export the GIF or having the animation break: deduct from engineering closure.
This scoring approach effectively avoids the “looks like it runs, so it gets a high score” problem. What it focuses on is not whether the model can draw a decent heptagon, but whether the model can complete the task under explicit constraints.
8. Acceptance recommendations for lightweight model selection
Based on this observation, teams that are selecting models are advised to focus on the following.
First, prioritize designing evaluation problems with hard constraints. Tasks such as mathematical construction, protocol parsing, algorithm implementation, and workflow approval are better suited to accepting a model than open-ended animation problems.
Second, separate goal achievement from process correctness. Add items to the scoring table such as “whether it follows the established steps,” “whether it introduces out-of-scope assumptions,” and “whether there is an unexplainable bypass.”
Third, focus on reasoning stability rather than only generation speed. Being a little slower is not scary; what matters is whether the steps stay coherent across long chains, whether it can self-correct, and whether it can adhere to constraints.
Fourth, use a unified environment for horizontal comparison. Comparing different models under different tools, different prompts, and different rendering environments easily distorts conclusions. Use a consistent calling interface, runtime environment, and evaluation script.
Fifth, build a regression test set. A single selection cannot represent long-term capability. Teams should add the two-marked ruler problem, regular polygon construction problems, and workflow parsing problems to a regression set and continuously observe changes as model versions upgrade.
9. Conclusion
The advantage of lightweight models is not just that they are cheaper, but that they give enterprises the opportunity to complete more complex tasks at lower cost. Yet selection cannot rely only on demo effects, nor can it be swayed solely by quickly generated results. A well-designed two-marked ruler regular heptagon problem can test whether a model understands the mathematical threshold, whether it can follow engineering constraints, and whether it can output stably across long chains.
For developers, choosing the right evaluation method often matters more than simply comparing model parameters. Because what truly determines engineering reliability is not whether a model can “draw it to look right,” but whether it can honestly do every step correctly under explicit constraints.
