Evaluating Complex Instruction-Following in Lightweight Flagship Models
As lightweight flagship models gain traction among developers and enterprises, evaluating their ability to handle complex tasks becomes critical. This article discusses evaluating these models through a highly constrained HTML geometric animation task: constructing a regular heptagon using a marked ruler. By analyzing experimental observations, failure modes, and engineering insights, we highlight why process consistency is just as important as result correctness when deploying lightweight models for complex front-end generation and instructional demonstrations.
Background: Why “Lightweight Flagship” Models Need Reassessment
With the increasing stratification of AI models, lightweight flagship models have gradually become a focal point for developers and enterprise users. These models aim to strike a balance between inference cost, response speed, and complex task capabilities: they should avoid the high inference overhead of ultra-large models while remaining viable in scenarios like code generation, structured output, and long-instruction following.
However, “lightweight” does not mean “simple.” In actual engineering, what truly differentiates models is often not single-turn Q&A, but complex tasks involving long steps, strict constraints, and multi-stage state maintenance. For example, asking a model to generate an HTML page that includes geometric construction steps, animation trajectories, and file export capabilities simultaneously tests the following abilities:
- Sequential understanding and constraint maintenance of natural language instructions;
- Abstract modeling of geometric construction steps;
- Code organization for front-end rendering, animation timing, and export workflows;
- Adherence to detailed requirements like “only output necessary traces”;
- Self-checking and correction of failed steps.
Therefore, rather than reviewing a specific product, this article uses a general technical problem to discuss how to evaluate the capability boundaries of lightweight flagship models in complex HTML geometric animation generation.
Evaluation Task Design: Creating Real Constraints with a Marked Ruler Heptagon Construction
A representative complex task is: draw an HTML webpage that animates the “construction of a regular heptagon using a marked ruler” and supports GIF export. The task description roughly includes the following steps:
- Take a square and construct the perpendicular bisector of its bottom edge;
- Draw a circle centered at the bottom-right vertex of the square with the diagonal as the radius;
- Using a “marked ruler,” keep it fixed against the bottom-left vertex, move the first mark along the circle until the second mark passes through the perpendicular bisector of the bottom edge;
- Supplement with standard compass-and-straightedge construction steps to determine the center and complete the regular heptagon;
- The compass trajectory should only leave traces where necessary;
- Finally, add the ability to export a GIF.
This task appears to be simply “drawing,” but it is actually a typical multi-constraint instruction-following problem. It requires the model not only to generate the final figure but also to organize the animation according to the specified steps. It cannot add unrequested auxiliary steps or replace key constraints with easier approximate implementations.
In the evaluation design, three observation dimensions can be set:
- Result Correctness: Whether the final output is a regular heptagon that conforms to geometric relationships;
- Process Consistency: Whether the animation steps strictly correspond to the construction sequence in the prompt;
- Engineering Completeness: Whether animation, trajectory control, and GIF export are implemented, and whether the code is executable.
Experimental Observations: Lightweight Models Can Be “Slow but Steady,” Large Models “Fast but Deviated”
In general evaluation environments, two typical phenomena can be observed.
The first phenomenon is that lightweight flagship models demonstrate strong step-maintenance capabilities in complex tasks. Their thinking process might not be fluent, potentially exhibiting long pauses and segmented outputs, but the final result can comprehensively cover the key steps in the prompt. For geometric construction tasks, this “slowness” is not necessarily a drawback, as the model needs to maintain multiple states internally, such as vertices, centers, radii, perpendicular bisectors, and marked ruler positions. If the model can maintain constraints over a long chain, the process consistency of the final product will be better.
The second phenomenon is that while some large general-purpose models can quickly generate a page that “looks correct,” their implementation path deviates from the prompt’s requirements. For example, the final figure might indeed be a regular heptagon, but the model independently added auxiliary steps not present in the prompt, or replaced the specified marked ruler movement process with an approximate construction. This type of failure mode is more隐蔽 than “directly throwing an error” because the result appears correct on the surface, but the process is untrustworthy.
In engineering evaluation, special attention should be paid to cases where “the result is correct but the process deviates.” It indicates that the model may possess strong goal-achieving abilities but lacks adherence to complex instruction constraints. For scenarios like instructional demonstrations, geometric proofs, and workflow reproductions, process consistency is often just as important as the result.
Breaking Down Failure Modes: Four Challenges in Complex HTML Animation Generation
1. Constraint Attenuation in Long-Step Instructions
Complex prompts usually contain multiple sequential steps. When generating code, models tend to lose early constraints in the middle to late segments. For instance, if the early text requires “compass trajectories only leave traces where necessary,” the model might draw complete auxiliary circles later for visual effect. Such issues require constraints through structured step tables and state machines.
2. Code-Based Modeling of Geometric Relationships
Natural language concepts like “perpendicular bisector,” “diagonal as radius,” and “marked line passes through the perpendicular bisector” need to be converted into coordinate calculations and conditional checks. If the model only makes visual approximations without establishing geometric constraints, the final animation may “look right” but actually be “incorrect.”
3. Coupling of Animation Timing and Drawing Logic
Animation is not simply displaying the final figure frame by frame, but advancing according to the construction sequence. It is recommended to abstract each construction step as a state node, for example:
const steps = [{ id: 'square', render: drawSquare }, // Draw the square{ id: 'midline', render: drawBottomMidline }, // Draw the perpendicular bisector of the bottom edge{ id: 'circle', render: drawCircleFromCorner }, // Draw the circle from the corner{ id: 'rulerMove', render: animateRulerUntilCondition }, // Animate the ruler until the condition is met{ id: 'heptagon', render: drawHeptagon } // Draw the heptagon];
Each node is only responsible for the drawing and state updating of the current step, preventing the model from mixing all logic into one massive function.
4. Engineering Loop for GIF Export
GIF export usually involves frame capture, encoding, and downloading. The model needs to understand the difference between “animation playback” and “frame sequence export.” A maintainable implementation should decouple the rendering loop from the export workflow: the rendering layer is responsible for generating each frame, and the export layer is responsible for collecting and encoding frames. This way, even if the model is not perfect in encoding details, the overall structure remains clear.
Engineering Insights: Turning Complex Prompts into Measurable, Practical Tasks
For developers and enterprise users, it is recommended to use lightweight flagship models from the following perspectives:
- Write prompts as step-by-step checklists: Break complex tasks into numbered steps and require the model to annotate the corresponding steps in code comments, making it easier to check process consistency;
- Require intermediate state outputs: For example, outputting key coordinates, conditional checks, and animation frame counts to reduce the risk of “surface correctness”;
- Establish automated checks: For geometric tasks, check the number of vertices, side length errors, and the timing of auxiliary line appearances;
- Accept reasonable inference latency: Lightweight models may require longer thinking times for complex tasks; user experience should be improved through asynchronous tasks, progress indicators, and timeout retries;
- Prioritize process-observable implementations: Clear code structure and traceable steps offer more engineering value than simply pursuing generation speed.
Conclusion
The value of lightweight flagship models should not be measured solely by single-turn response speed. In tasks like complex HTML geometric animation generation, models must simultaneously handle long instructions, geometric constraints, animation timing, and export workflows. Evaluations should focus on result correctness, process consistency, and engineering completeness. For developers, reasonably decomposing tasks, requiring intermediate states, and establishing automated checks are essential to reliably applying lightweight flagship models in scenarios like instructional demonstrations, visualization tools, and complex front-end generation.
