Evaluating Lightweight Flagship Models via Complex Geometric Construction Tasks

    This article presents a reproducible evaluation methodology for lightweight flagship models, using the complex front-end task of constructing a regular heptagon with a marked ruler as a benchmark. It explains why this task effectively distinguishes models that merely produce visually similar output from those that truly follow constrained geometric procedures, outlines a multi-layered automated and manual verification framework, and discusses the practical strengths, limitations, and engineering strategies for deploying lightweight models in production.

    Introduction

    Lightweight flagship models are designed to balance parameter count, inference cost, and response latency. Evaluating these models requires more than generic question-answering or simple code completion benchmarks; it demands tasks that expose process constraints, long-chain reasoning, and visual implementation capabilities. Complex front-end geometric construction serves as a suitable test case: it requires the model to understand mathematical construction steps, map those steps to executable front-end code, and produce checkable graphics and animations at the rendering layer. This article outlines a reproducible evaluation methodology around this theme and discusses the behavioral characteristics and engineering responses of lightweight models.

    Part One: Why “Constructing a Regular Heptagon with a Marked Ruler” Is a Threshold Task

    Simple front-end animation or shape-drawing tasks are susceptible to pattern matching. A model can generate an approximate figure that “looks correct” visually, but whether it actually followed the construction steps cannot be determined from a screenshot alone. In contrast, constructing a regular heptagon with a marked ruler imposes strict geometric constraints and explicit step dependencies, making it a suitable threshold task for evaluating complex code generation capabilities.

    The task can be decomposed into the following key constraints:

    1. Start with a square and construct the perpendicular bisector of its base;
    2. Use the square’s bottom-right vertex E as the center and the diagonal as the radius to draw circle E;
    3. Using the marked ruler, keep it in contact with the bottom-left vertex D;
    4. Move the first marked line of the marked ruler along circle E until the second marked line passes through the perpendicular bisector of the base;
    5. Subsequently use the standard perpendicular-bisector method to determine the center and complete the omitted compass-and-straightedge construction steps;
    6. The compass may only produce traces where necessary and must not leave auxiliary lines in unrelated areas;
    7. The final output must be an HTML page with an additional GIF export feature.

    These constraints span mathematical understanding, geometric relationships, code organization, animation frame control, and file export. Any shortcut—such as directly plotting the heptagon using preset coordinates, ignoring the marked-ruler movement conditions, or substituting approximate circles for constructed ones—results in “visually similar but procedurally incorrect” output. The value of this task lies not in the aesthetics of the figure but in whether the construction process can be verified.

    Part Two: Evaluation Design: Task, Environment, and Verification

    Evaluation should isolate variables as much as possible: fix the input task template, fix the runtime environment, fix the timeout period, and require the model to output verifiable intermediate artifacts. The task template should include three components: a final page, a construction event log, and a GIF export entry. The construction event log can be a JSON record capturing key events such as points, lines, circles, marked-ruler movement conditions, and visible traces.

    An illustrative checker is as follows:

    1. type ConstructionEvent =
    2. | { kind: "point"; id: string; x: number; y: number }
    3. | { kind: "circle"; center: string; through: string }
    4. | { kind: "line"; a: string; b: string }
    5. | { kind: "rulerMove"; mark1On: string; mark2On: string }
    6. | { kind: "arc"; center: string; from: string; to: string; visible: boolean };
    7. function validate(events: ConstructionEvent[]) {
    8. // 1. The square and perpendicular bisector of the base must exist
    9. // 2. A circle centered at E with the diagonal as radius must exist
    10. // 3. The marked-ruler movement condition must be recorded:
    11. // first mark line on circle E, second mark line passing through the bisector
    12. // 4. The subsequent center must be determined by bisector intersections
    13. // 5. Compass traces must be visible only at necessary steps
    14. return { passed: false, reasons: ["Example: missing marked-ruler movement event"] };
    15. }

    Verification operates at three levels. The first level is syntax and runtime: whether the page opens and the script executes without errors. The second is process constraints: whether the event log covers all critical steps. The third is rendering and export: whether the figure is correct, whether animations correspond to the construction process, and whether the GIF can be generated. In addition to automated checks, manual spot checks are necessary, focusing on whether approximate coordinates were used in place of actual constructions.

    Part Three: Typical Phenomena: Visual Similarity Does Not Equal Procedural Correctness

    In replicating such tasks, two common outcomes emerge. One is strict adherence to the steps, which requires more time, exhibits discontinuous streaming output, shows noticeable pauses between stages, and may even present “thinking without producing output.” However, the final code and event log align with the task requirements. The other is a fast-generated page that appears to be a regular heptagon but internally relies on preset vertices, approximate angles, or hidden steps. This second type is easily misclassified as successful when judged by screenshots alone.

    Therefore, evaluation must require the model to output explicit intermediate quantities rather than only a final visual result. For GIF files, the frame sequence must correspond to the construction process rather than a rotating or fading final figure. From an engineering standpoint, the page should expose a read-only log interface such as window.__constructionLog to facilitate automated inspection.

    Part Four: Potential Advantages and Boundaries of Lightweight Models

    The core advantage of lightweight models lies not in unlimited parameter scaling but in cost efficiency, deployment elasticity, and execution potential under well-defined constraints. If a model can reliably follow strict procedural steps—even at slower output speeds—it remains useful for offline generation, batch evaluation, and code review assistance. When serving inference at scale across clusters, per-call cost and multi-tenant elasticity are also important considerations.

    The boundaries are equally clear. Long-chain tasks amplify end-to-end latency; insufficient streaming stability degrades interactive experience; weak procedural interpretability increases review cost; and complex mathematical constructions often invite approximate substitution. Evaluation reports should distinguish between lightweight and high-capability tiers, reporting not only overall scores but also metrics such as correctness pass rate, process-constraint pass rate, rendering pass rate, GIF export pass rate, end-to-end latency, long-duration task stability, and human review consistency.

    Part Five: Engineering Implementation Recommendations

    First, formalize the task. Write geometric constraints as verifiable event sequences, avoiding vague goals like “draw a regular heptagon.” Second, log the process. Require the model to output construction events or explicit intermediate quantities in code for rule-based inspection. Third, combine automated checks with manual spot checks. Automated checks cover hard constraints; manual spot checks identify approximate substitutions and visual deception. Fourth, set timeouts and retries. Long-running inference tasks require heartbeat mechanisms, timeout interruption, and checkpoint-based retry. Fifth, impose resource limits. The GIF export should limit frame count, resolution, and memory consumption to prevent browser-side encoding from degrading page performance. Sixth, layer the evaluation set. Separate simple shapes, constrained constructions, animation export, and long-chain reasoning into distinct statistical categories to avoid representing overall capability with a single task.

    An illustrative task template:

    1. Please output a standalone HTML file that uses Canvas to draw the specified geometric construction process.
    2. Follow the given steps exactly and additionally output a JSON event log.
    3. Do not use preset heptagon vertex coordinates, and do not omit the marked-ruler movement conditions.
    4. Compass traces should be visible only where necessary.
    5. Include an “Export GIF” button; the frame sequence must reflect the construction process.

    Conclusion

    Complex geometric construction tasks effectively distinguish between models that “appear capable of writing front-end code” and those that “truly understand constraints and execute with stability.” Evaluation of lightweight flagship models should uphold three principles: the process must be verifiable, the rendering must be reproducible, and failures must be classifiable. Lightweight models may offer advantages in cost and deployment elasticity, and they may demonstrate stronger-than-expected execution on tightly constrained tasks. However, long-duration inference, streaming stability, and procedural explanation remain critical areas requiring engineering support. Establishing a neutral, reproducible evaluation methodology carries greater long-term value than a single comparative benchmark.