Evaluating Lightweight Model Programming Capabilities: From Geometric Animation to Engineering Acceptance
Assessing the programming capabilities of lightweight AI models requires moving beyond superficial demonstrations. This article explores a systematic evaluation methodology using complex geometric animation tasks, such as constructing a regular heptagon with a marked ruler. It details how to decompose requirements into verifiable constraints, implement a three-layer architecture for calculation and rendering, and establish rigorous engineering acceptance criteria. By comparing models on dimensions like process correctness, functional usability, and end-to-end delivery cost, developers can accurately identify true capabilities and avoid the pitfalls of "pseudo-completion."
I. Evaluating Lightweight Models: Moving Beyond “Looking Strong”
In intelligent programming scenarios, lightweight models are generally expected to achieve two goals: reducing invocation and deployment costs, and balancing response efficiency with task quality. However, “lightweight” lacks a unified technical definition across vendors. It does not inherently mean faster generation, shallower reasoning, or weaker capabilities. Actual performance depends on model design, inference configuration, context length, tool invocation methods, and the runtime environment.
Therefore, determining whether a model can handle development tasks should not rely solely on whether a demo page looks good or whether a single output appears to outperform other models. More reliable questions to ask include:
- Can it accurately understand and consistently adhere to the hard constraints in the requirements?
- Can it translate text requirements into verifiable mathematical and programmatic logic?
- Can it manage relationships among multiple subsystems, such as animation, interaction, and file export?
- Under the same resource conditions, how do its success rate, time consumption, and manual repair cost compare?
Geometric animations with strict construction steps serve as an effective probe for observing these capabilities. They simultaneously involve mathematical reasoning, state management, graphics rendering, and functional completeness, making it easier to expose deep-seated issues than simply generating a static display page.
However, such tasks remain a localized capability probe and cannot replace a systematic evaluation covering real-world development scenarios.
II. Why Geometric Animation Exposes “Pseudo-Completion”
Consider a requirement: generate a webpage demonstrating the construction of a regular heptagon using a ruler with two scale marks. The process must include a square, a perpendicular bisector, a specified circle, ruler movement constraints, subsequent center determination, and animation file export.
The real difficulty of this task is not merely plotting the seven final vertices.
If the direct use of trigonometric functions were allowed, the program could easily generate a regular heptagon using the center, radius, and equal angles. The problem is that the user requires the drawing to be completed following a specific construction process. Directly calculating the final vertices and adding decorative auxiliary lines fails to meet the task requirements, even if the visual result is similar.
Here, we must distinguish three levels of correctness:
Result Correctness: Whether the final graphic approximates or satisfies the geometric properties of a regular heptagon.
Process Correctness: Whether each step is generated by allowed operations and satisfies the predefined constraints for points, lines, and circles.
Presentation Fidelity: Whether the operations presented in the animation are consistent with the program’s internal actual solving process.
These three are not interchangeable. A page might be correct at the result level but completely wrong in the construction process; or it might be internally calculated correctly but omit critical steps in the animation, preventing the reader from verifying it.
For enterprise development, this distinction is universally significant. Correct report numbers do not imply correct data logic; a successful API response does not mean business rules were fully executed; a clickable UI does not mean exception paths have been handled.
III. Verify Requirement Completeness Before Letting the Model Code
In complex tasks, the requirements themselves may contain ambiguities. A reliable model should not silently fill in all the blanks, nor should it disguise its own assumptions as conditions given in the prompt.
Taking the double-marked ruler as an example, the following must be clarified at minimum:
- What is the distance between the two scale marks, and what is their relationship to the square’s side length?
- Does “the ruler passes through a certain vertex” mean the infinitely extended line passes through that point, or does a specific position on the ruler coincide with that point?
- Which constraint corresponds to the first mark and which to the second?
- After the ruler moves to a position satisfying the conditions, which intersection point or ray is selected to continue the construction?
- What are the subsequent steps for determining the circumscribed circle and the remaining vertices?
- Is the goal an exact construction in the mathematical sense, or is a numerical demonstration with a given error tolerance acceptable?
There is also an important mathematical boundary: a regular heptagon cannot be constructed exactly using only an unmarked ruler and compass. Adding a marked tool changes the allowed operations, but this does not mean any double-mark operation automatically constitutes a valid heptagon construction.
Therefore, when key length relationships or derivation steps are missing, the reasonable approach is to list the conditions awaiting confirmation or explicitly state the supplementary assumptions adopted for the demonstration. One cannot claim to have completed a rigorous construction based solely on an incomplete description.
This is also a crucial standard for measuring model capability: knowing when to continue calculating and when to stop and ask for clarification.
IV. Translating Natural Language into Verifiable Constraints
A reliable implementation should first establish a geometric model, then develop the animation interface.
For example, the square’s side length can be normalized to 1, setting:
- Lower-left vertex D = (0, 0);
- Lower-right vertex E = (1, 0);
- The other two points as (0, 1) and (1, 1).
In this case, the perpendicular bisector of the base is x = 1/2. If the specified circle is centered at E with the square’s diagonal as the radius, its radius is √2.
Let the two scale points be P and Q, with their distance being a clearly defined constant s. The corresponding constraints can be written as:
- D, P, Q are collinear;
- P is located on the specified circle;
- Q is located on the perpendicular bisector of the base;
- The distance between P and Q equals s.
These constraints jointly define the solving problem but do not guarantee a unique solution. The actual implementation must also exclude branches that do not fit the problem’s intent, such as reversed scale order, intersections in the wrong half-plane, or ruler orientations inconsistent with expectations.
During numerical solving, the residual of each constraint should be checked individually, rather than just looking at whether the solver returns success. For example:
circle_residual = |distance(P, E) - sqrt(2)|bisector_residual = |Q.x - 0.5|mark_distance_residual = |distance(P, Q) - s|collinearity_residual = |2d_cross_product(P-D, Q-D)|
The units of these residuals are not entirely the same. When setting thresholds, they should be normalized according to the geometric scale, rather than indiscriminately using the same absolute tolerance.
The modeling above only serves to explain existing constraints and should not be mistaken for a proof that the heptagon construction is valid. Subsequent steps still require independent derivation and verification.
V. Separating Solving, Drawing, and Presentation into Three Layers
Writing all logic into a single drawing loop often leads to “it can be drawn, but cannot be proven why.” A more robust structure is a layered implementation.
1. Geometric Layer: Responsible for Calculation and Validity Checks
This layer stores points, lines, circles, intersections, and their dependencies. Each new object should record its source, such as “obtained from the intersection of two circles” or “obtained from the perpendicular bisector of a segment.”
The geometric layer is not responsible for colors, animation duration, or button states. It should be able to run tests headless (without a UI) to verify whether the calculation results are reliable.
2. Drawing Layer: Responsible for Recording Legal Operations
The drawing layer describes the sequence of operations, including setting the center, adjusting the radius, drawing arcs, taking intersections, and connecting points.
Here, it is especially important to distinguish between “auxiliary calculation” and “formal drawing.” The program can use numerical methods to determine the end state of an animation, but if the task requires demonstrating a specific construction, the corresponding operations must be faithfully presented. Hidden calculations cannot be disguised as completed ruler-and-compass steps.
3. Presentation Layer: Responsible for Animation and Interaction
The presentation layer reads the drawing records and displays the ruler, compass, auxiliary lines, and text explanations according to the timeline.
Pause, playback, and scrubbing the progress bar should all restore a deterministic geometric state, rather than relying on frames accumulated during continuous playback. Otherwise, when a user jumps to an intermediate step, auxiliary lines might be missing or tool positions might be incorrect.
This layered design also reduces manual review costs: math issues are checked in the geometric layer, missing steps in the drawing layer, and flickering or interaction anomalies in the presentation layer.
VI. Compass Trajectory Does Not Equal Full Circle Drawing
“Leaving only necessary traces when using a compass” may seem like a visual requirement, but it actually contains explicit state constraints.
At the very least, one should distinguish between:
- The current position of the compass;
- Temporary trajectories in the operation demonstration;
- Confirmed construction arcs to be retained;
- Shapes retained as the final result.
If a full circle is drawn at every step, it is easy to implement but may obscure key intersections and may not meet the requirements. The correct approach is to record the start angle, end angle, and drawing direction for each arc, displaying only the necessary range.
Additionally, the purpose of the arc should be explained: is it to find the intersection of two circles, or to determine a point on the perpendicular bisector? The value of animation is not just “moving,” but allowing the observer to understand why each action is necessary.
For teaching or technical demonstrations, it is recommended to provide two modes: “Show all auxiliary lines” and “Show current step only,” balancing verification and viewing experience.
VII. Animation Export Should Be Accepted as an Independent Feature
Adding an export button to a page does not mean it has a usable animation export capability. The complete workflow typically includes:
- Advancing the animation by fixed time steps;
- Generating a consistent frame at each time point;
- Collecting image frames and encoding them;
- Setting frame delay and looping behavior;
- Generating a downloadable file;
- Checking whether the file can be decoded and played completely.
The export should ideally use a deterministic timeline independent of real-time playback. If it directly relies on the screen refresh rate, changes in device load may cause dropped frames or inconsistent animation pacing.
Memory is also a critical issue. The uncompressed frame buffer size is approximately:
Width × Height × Bytes per Pixel × Number of Frames.
For example, the raw image data for an 800×600 pixel video at 4 bytes per pixel over 300 frames is about 576MB, not accounting for additional encoding overhead. This is just an estimate and does not represent the final file size, but it is sufficient to show that caching all frames without limit is unfeasible.
Therefore, engineering implementations should consider batch processing, lowering export resolution, limiting duration, and displaying export progress and failure messages. During acceptance, one should also check for transparent backgrounds, text clarity, loop boundaries, and whether the final step is fully included.
VIII. Establishing More Reliable Evaluation Methods Than “Looking at Screenshots”
To judge the true programming capability of lightweight models, acceptance can be broken down into the following dimensions:
| Dimension | Core Question | Recommended Verification Method |
|---|---|---|
| Requirement Adherence | Are key steps omitted or replaced? | Check item-by-item against the requirement list. |
| Mathematical Correctness | Are geometric constraints satisfied? | Check residuals, branches, and derivations. |
| Process Completeness | Are intermediate constructions traceable? | Review operation records and object dependencies. |
| Functional Usability | Do interaction, playback, and export work? | Actually run and test exception paths. |
| Engineering Quality | Is it maintainable and reproducible? | Check layering, tests, and error handling. |
| Delivery Efficiency | How many resources are needed for a qualified result? | Calculate total time and manual repair volume. |
For the regular heptagon, one can also check whether adjacent side lengths are consistent, whether vertices lie on the same circle, and whether adjacent central angles approximate 2π/7. However, this only verifies the final geometric properties and cannot prove the construction process meets the requirements.
When evaluating, one should not simply average all metrics. If the core requirement of the task is to adhere to the construction method, then “unauthorized use of alternative methods” should be listed as a critical failure item, which cannot be offset by a beautiful interface or smooth animation.
IX. How to Fairly Compare Different Model Configurations
A single success indicates the task might be solvable, but does not prove stability. A single failure is also insufficient to prove an entire class of models is unsuitable.
When comparing, try to unify the initial requirements, runtime environment, available tools, generation budget, and human intervention rules. If models are allowed to run tests and modify code themselves, all evaluated configurations should be given the same opportunity; if only comparing one-shot outputs, this limitation must be explicitly stated.
It is recommended to simultaneously record:
- Time to first runnable code output;
- Time to first passing of all key acceptance criteria;
- Number of automatic and manual fixes;
- Final success ratio;
- Resource consumption and fluctuations;
- Failure causes and types of requirement omissions.
Among these, “first generation completed” and “first qualified delivery” are different metrics. One model might output quickly but require extensive manual rewrites; another might generate slower but require fewer subsequent fixes. For development teams, the end-to-end cost corresponding to the latter should be compared, rather than just text generation speed.
Similarly, a long wait time cannot be directly interpreted as deeper reasoning. Prolonged lack of valid output might also stem from the runtime environment, tool waiting, or execution failures, which requires checking observable logs to determine.
X. Conclusion: Lightweight Model Advantages Must Be Proven by Deliverable Results
Complex geometric animations reveal a core issue in intelligent programming evaluation: models may mask incorrect processes by generating the correct appearance. Truly reliable output must not only display the final graphic but also be able to explain constraints, trace steps, handle interactions, and deliver verifiable export results.
Whether a lightweight model has practical advantages ultimately falls into three aspects: whether it can stably meet standards within a defined task scope, whether the total cost of obtaining a qualified result is reasonable, and whether the code and process are easy to review and maintain. These advantages must be proven through repeated testing under unified conditions, rather than being deduced from a single demo.
The most valuable practice for developers is to first break down requirements into verifiable constraints, then let the model implement them, and finally separately accept the mathematical, process, interface, and engineering functionalities. This approach not only identifies model capabilities more accurately but also transforms seemingly successful demos into genuinely usable software deliveries.
