Lightweight LLM Evaluation: Using a Neusis Geometry HTML Task as a Gate Test

    This article explains why HTML animation tasks can serve as a gate test for lightweight large language models. It covers what the test measures and where it falls short, walks through a case in which a model must build a regular heptagon with a neusis ruler in an HTML page, describes the failure patterns observed, and lists reusable principles for designing model evaluations.

    1. Why a New Perspective on Model Evaluation Is Needed

    When choosing a large language model, developers often rely on public leaderboard scores, conversational impressions, and output speed. As models iterate quickly, however, raw benchmark scores struggle to show the real gap between “lightweight flagship” and “standard flagship” models. Some models labeled “Flash” come close to their own flagship models or to comparable models on certain complex tasks, while some flagship models fail on tasks that look simple.

    As a result, the community has developed a “gate test” approach. It builds a task that appears easy but hides several constraints, then asks a model to complete it end to end in one pass. If the model follows every constraint, it shows a reasonable level of instruction following, spatial reasoning, and code generation ability. If it does not, the weaknesses become visible. HTML animation is a classic form of this test.

    2. Value and Limits of the HTML Animation Test

    2.1 Why It Is Useful

    Implementing an interactive animated page in HTML, CSS, and JavaScript tests several abilities at once:

    • Requirement understanding: whether the model can break a natural-language description into accurate functional points;
    • Algorithms and logic: whether the model can translate mathematical or geometric steps into correct calculations;
    • Front-end engineering: whether the model can write complete, runnable code with reasonable visuals;
    • Self-checking: whether the model can find and fix logic errors during generation.

    A model that cannot write a complex HTML animation correctly may also be unreliable in real engineering work. The test may look like a toy, but it shows the basic floor of a model’s ability.

    2.2 Limitations

    A single HTML test cannot cover tool use, long-context retrieval, multi-turn dialogue, or other dimensions. It works better as a pass/fail gate than as a full basis for ranking capability. A sound evaluation should combine several task types and cross-check the results.

    3. Case Study: Constructing a Regular Heptagon with a Neusis Ruler

    Below is a typical high-difficulty test prompt. Its core requirement is an HTML page that demonstrates the full process of constructing a regular heptagon using neusis construction, which relies on a marked ruler (the neusis ruler).

    3.1 Hidden Difficulties

    On the surface, the task asks for an animation. In practice, it contains several layers of constraints:

    1. Geometry knowledge: A regular heptagon cannot be constructed exactly with an ordinary compass and straightedge. It requires a marked ruler, the neusis ruler. The model must first understand this mathematical background.
    2. Step constraints: The prompt specifies the construction order. Draw a square, draw the perpendicular bisector of the base, draw a circle centered on the lower-right vertex, then slide the neusis ruler against the lower-left vertex until the first mark lies on the circle and the second mark passes through the perpendicular bisector. The model must not skip steps or invent its own.
    3. Animation constraints: The construction must be animated, and the compass path must leave traces only where necessary. This requires conditional control over trace rendering.
    4. Engineering constraints: The page must also include a GIF export feature, which involves frame capture and encoding.

    3.2 Two Typical Failure Modes

    In testing, different models produced two very different kinds of failure:

    Failure mode 1: correct result, wrong process. Some flagship models produced a page that appeared to meet the requirements, and the heptagon was indeed drawn. On closer inspection, however, the construction method did not match the procedure in the prompt. The models added auxiliary steps the prompt did not define to force the final figure into place. Under pressure, the model took a result-oriented shortcut, which shows a weakness in instruction following.

    Failure mode 2: long thinking, little output. Another problem was excessively long reasoning. The thinking chain stalled and restarted, and some runs took more than half an hour to produce a result or got stuck in loops. This points to engineering issues in reasoning efficiency and output stability.

    3.3 What a Passing Answer Looks Like

    A well-performing model implements the animation step by step, following the geometric steps in the prompt. Each compass and ruler action matches its description. The trace retention and erasure logic is correct, the GIF export works, and the overall time and output fluency are acceptable. If a model positioned as “lightweight” achieves all of this, its capability ceiling exceeds the usual range for that tier, and it is worth re-evaluating during model selection.

    4. Reusable Evaluation Principles

    This case suggests general principles for designing evaluations:

    • Stack multiple constraints: A good test combines knowledge, process, and engineering constraints, so that a correct answer by chance is nearly impossible;
    • Make the process auditable: Ask the model to produce intermediate artifacts that can be verified step by step, such as each construction function in the code, rather than checking only the final result;
    • Record generation behavior: Besides results, observe thinking time, output fluency, and whether the model stalls. These process metrics also inform model selection;
    • Use control groups: Run the same prompt on models at several tiers. Flagship failures can serve as a reference point for judging the real level of a lightweight model.

    5. Implications for Engineering Selection

    In production, lightweight models mean lower inference costs and higher throughput. Developers can use the general model inference and deployment capabilities of cloud platforms to connect candidate models to an evaluation pipeline quickly, then run the gate tasks above as regression tests. If a lightweight model passes key tasks consistently, choosing it first for scenarios such as intelligent Q&A, code assistance, and document processing is a reasonable decision that balances cost and user experience.

    6. Conclusion

    Model evaluation should not stop at leaderboard scores. A carefully designed multi-constraint task, combined with strict process auditing and controlled comparisons, often reveals a model’s true capability boundaries better than dozens of benchmark numbers. When “Flash” models begin to produce answers that rival flagship models on tasks like this, developers should update their selection logic accordingly.