Evaluating Lightweight LLMs with a Demanding HTML Geometry Task

    This article explores why conventional benchmarks fall short in assessing real-world model capabilities, introducing a task-based evaluation approach centered on an HTML geometry construction challenge. It walks through the design principles of a high-density instruction task, presents observed failure modes across model categories, and offers practical guidance for building your own evaluation pipeline to inform model selection decisions.

    Why Conventional Benchmarks Fall Short in Model Evaluation

    When selecting a model, many engineering teams default to reviewing general benchmark scores. However, these broad benchmarks typically reflect a model’s “average performance” and often fail to expose weaknesses in complex instruction following or multi-step reasoning. A common real-world observation: a model that ranks well on leaderboards may produce output that looks correct when handed a detailed specification, yet the implementation path deviates significantly from what was actually requested.

    To address this gap, a “task-based evaluation” approach has been gaining traction. The idea is straightforward: design a task that appears simple at first glance but actually contains multiple hidden failure points. By comparing both the correctness of the output and the implementation approach, you can quickly assess a model’s true capability boundaries. HTML animation tasks have emerged as a representative example of this technique.

    Design Principles for Effective Evaluation Tasks

    A well-designed evaluation task should satisfy the following criteria:

    1. A clear technical threshold. The task must simultaneously exercise multiple capabilities: geometric or logical comprehension, structured front-end code generation, and animation rendering. A weakness in any one area results in failure.
    2. A verifiable implementation path. The target outcome should be unambiguous, but the implementation must be auditable. This distinguishes between “accidentally producing the right result” and “strictly following the procedural steps”—only the latter genuinely tests instruction-following ability.
    3. Inherent comparative value. The difficulty must be high enough that even capable models stumble, creating differentiation across models rather than serving as an easy “toy problem” that everyone passes.

    A widely used classic example is asking a model to dynamically demonstrate, within an HTML page, the complete straightedge-and-compass construction of a regular heptagon using a neusis (marked ruler) method. The prompt provides an explicit sequence of steps:

    • First, draw the perpendicular bisector of the square’s bottom edge;
    • Using the bottom-right vertex as center and the diagonal as radius, draw a circle;
    • Using a “marked ruler” anchored at the bottom-left vertex, slide the first mark along the circle until the second mark crosses the perpendicular bisector;
    • Then complete the standard perpendicular bisector steps to determine the center and finish the heptagon;
    • Additional requirement: output as an animated GIF demonstration.

    On the surface, this prompt appears to merely ask for “an animation.” In reality, it requires the model to precisely interpret a non-standard geometric construction description and translate each step into coordinate calculations and drawing code—a classic high-instruction-density task.

    Typical Failure and Success Patterns Observed in Evaluation

    When running this evaluation, model behavior can be categorized along the “reasoning-to-output” pipeline:

    1. Disrupted Reasoning Chains

    Some lightweight models produce stuttering or discontinuous output across long reasoning sequences. In some cases, the model remains in an internal reasoning state for extended periods without generating any visible output. These behaviors suggest that the model has not yet found a stable balance between long-context reasoning and streaming generation—an issue that directly impacts interactive user experience in real development scenarios.

    2. Output Looks Correct, but the Implementation Deviates

    This is the most deceptive category of failure. In one observed case, a flagship model spent nearly twenty minutes generating a page that did depict a regular heptagon and satisfied the visual requirements of the prompt. However, a careful review of the generated code revealed that the model did not follow the neusis construction method described in the prompt at all. Instead, it introduced auxiliary steps that were never mentioned in the task description, forcing a workaround to produce the final shape.

    This “right answer, wrong process” failure is more dangerous for developers because it cannot be detected by casual visual inspection. It only surfaces during code review or result verification. This pattern exposes a fundamental defect in robust instruction following: the model invents conditions that were never specified in order to achieve the goal.

    3. Following Every Step as Instructed

    A small number of models manage to faithfully reproduce the construction logic described in the prompt. Each auxiliary line appears at the correct time, the arc traces only show marks where needed, and the final animation export function meets all requirements. This level of output indicates that the model simultaneously possesses geometric reasoning, coordinate calculation, animation state management, and long-instruction decomposition—performance that exceeds typical expectations for a “fast-response” lightweight model.

    The Line Between Lightweight and Flagship Models Is Blurring

    Several practically relevant conclusions emerge from this evaluation:

    • The upper limits of lightweight models are commonly underestimated. On complex reasoning tasks, some lightweight models can approach—or in certain cases match—flagship performance, especially when longer thinking time is permitted.
    • Flagship models are not a guarantee. The rigor of instruction following does not correlate perfectly with model size. The “correct result but distorted process” failure mode appears in flagship models as well.
    • Latency vs. quality remains the core trade-off. Lightweight models typically need extended generation time to reach high completion quality on reasoning-heavy tasks. Teams should make selection decisions based on their latency tolerance: interactive scenarios benefit from faster responses, while batch processing scenarios can afford longer inference times in exchange for higher output quality.

    Building Your Own Evaluation Pipeline: Practical Recommendations

    For teams evaluating multiple large models for technical selection, the following workflow is recommended:

    1. Build a task library rather than relying on a single problem. In addition to HTML geometry construction, consider adding multi-round code refactoring exercises, constrained text generation, and formatted data transformation tasks to cover different capability dimensions.
    2. Evaluate the implementation path, not just the end result. Acceptance criteria should explicitly require that the implementation method aligns with the task description. Verification can be done through manual code review or automated assertions (for example, checking the sequence of drawing steps).
    3. Track process-level metrics. Record total elapsed time, the ratio of thinking time to output time, whether streaming output stutters, and anomalies such as “thinking without producing output.” These indicators have direct predictive value for real-time user experience.
    4. Set up controlled experiments. Run the same task multiple times with identical prompts and temperature parameters to measure reproducibility of success rates, avoiding conclusions drawn from a single lucky run.
    5. Automate the pipeline with cloud-based tooling. Leverage general-purpose model serving APIs, object storage (for saving evaluation artifacts), logging services, and monitoring alerts to automate the evaluation flow and enable continuous regression comparison across model versions.

    Conclusion

    Large language model evaluation is moving beyond “leaderboard checking” and into “hands-on experimentation.” A well-designed demanding task can, within a short time, reveal a model’s true capability level in instruction following, procedural reasoning, and engineering implementation. For developers, the more productive path forward is not debating the naming differences between lightweight and flagship models, but building a task-based evaluation pipeline tailored to your own business needs—and letting the data, rather than marketing language, drive technical decisions.