How to Evaluate LLM Code and Animation Generation: A Practical Methodology
This article presents a practical methodology for evaluating large language model code and animation generation, using a real test case that asks a model to produce an SVG animation of a pelican riding a bicycle. It explains how to control variables such as reasoning effort, run mode, and temperature; why the test case probes spatial orientation, contact constraints, occlusion, periodic motion, and structural plausibility; and what a self-review loop can and cannot catch. The article also compares two technical routes, turns subjective impressions into a layered L1/L2 acceptance checklist, and lists common pitfalls and tuning recommendations for reproducible evaluation.
1. The Starting Problem: Why “Try It on Day One” Is Unreliable
When a new model is released, many teams run a quick hands-on session. Such sessions usually suffer from three systematic biases: the test cases are too common, the pass/fail criteria are vague, and the variables are not fixed. As a result, the same person running the same test twice at different times can reach opposite conclusions. A more useful approach is not to ask “Is the new version actually better?” but to first build a stable evaluation framework and then let the model run inside it.
The material analyzed here comes from a real task: asking a model to generate a 2D animation drawn in SVG, with a pelican riding a bicycle as the subject. The case looks playful, but it is actually quite demanding, because it simultaneously tests spatial relationships, occlusion layers, periodic motion, and geometric constraints. That makes it a good probe for both multimodal generation and code generation.
One caveat up front: what follows is not a leaderboard and does not recommend any specific product. All judgments apply only to the results of this particular run, and readers should resample against their own workload distribution.
2. Variable Control: Turning “Feel” into Something Reproducible
The first step is to fix the variables. This run used the following settings:
- Reasoning effort: highest tier (max effort)
- Run mode: standard mode
- Input form: plain text instruction plus a self-check loop on the generated result
- Acceptance method: manual visual inspection plus frame-by-frame animation playback
A schematic call skeleton is shown below (pseudocode, only to express the idea of fixed variables):
config = {"effort": "max", # fixed reasoning budget"mode": "standard", # fixed run mode"tools": ["image_view"], # whether the model can look back at its own output"temperature": 0.2, # lower randomness for easier attribution}result = run(task="svg_pelican_bike", cfg=config)
Fixing variables matters because when the result changes, you know exactly which stage caused it, instead of mistaking random fluctuation for the model getting stronger or weaker.
3. Test Case Design: What One Animation Task Can Measure
“ A pelican riding a bicycle” works because it compresses several difficulties into a single canvas:
- Spatial orientation: which side the subject faces, and whether the handlebar is on the left or the right;
- Contact constraints: whether the hands (or wings) actually rest on the handlebar;
- Occlusion: which of the near-side and far-side legs is in front, and how the chain and spokes interleave;
- Periodic motion: the circular motion of the pedals must be in phase with the leg joint angles;
- Structural plausibility: the frame triangle, wheel diameter ratio, and center of gravity.
The first two points are coarse-grained errors visible at a glance; the last three are fine-grained errors that only show up under frame-by-frame inspection. Whether a model is reliable often comes down to how sensitive it is to fine-grained constraints.
4. Observed Results: The Limits of Self-Checking
The first generation had two kinds of problems. The coarse-grained problem was wrong subject orientation. The fine-grained problem was that the limbs did not actually touch the handlebar, leaving the contact point floating in the air.
I then introduced a “look back” loop: a tool read the image the model had generated and performed a structured self-check, producing a list of issues. The observed behavior was representative:
- The model could identify the “floating contact point” and propose a fix;
- The model missed the “wrong overall orientation,” even though that error was visually more obvious;
- Only after an explicit human hint to “pay attention to orientation” did the model complete the correction.
This suggests that the current self-check loop is better at handling local geometric relationships and weaker at global semantic consistency. The engineering response is to split acceptance into two layers:
L1 global semantic layer: what the subject is, its orientation, whether the scene holds togetherL2 local geometry layer: contact, occlusion, proportion, phase
Explicitly requiring the model in the prompt to output L1 and L2 check conclusions separately can significantly reduce the miss rate.
5. Cross-Comparison: Where Different Technical Routes Differ
To rule out the possibility that a single case was a fluke, I ran the same task with another technical route. The result looked more coherent overall: the subject was slightly thin, but the orientation was correct, the circular motion of the pedals and legs was in phase, and the occlusion was handled naturally.
The takeaway from this comparison is not “which one is stronger” but three transferable engineering conclusions:
- Global semantic correctness is the first gate; fixing local details on top of a wrong global result is inefficient;
- Phase consistency in periodic motion is what separates “can draw” from “can animate”;
- Style preferences (for example, whether the character looks appealing) should not count as hard acceptance criteria, or they will pollute attribution.
6. Turning the Experience into an Acceptance Checklist
Teams should turn this kind of subjective experience into a checkable list. Example:
- Subject orientation matches the scene description
- Key contact points have no floating gaps and no clipping
- Front/back occlusion order matches physical intuition
- Periodic motion is phase-consistent with no obvious frame skips
- Asset size is controlled and the file opens directly in a browser
- Code structure is readable and parameters are configurable
Combined with automation, “visual inspection” can be moved forward into “measurable”:
// Example: check that key elements exist and are animatableconst svg = document.querySelector('svg');const must = ['#wheel-front', '#wheel-back', '#crank', '#leg-near'];const missing = must.filter(s => !svg.querySelector(s));console.assert(missing.length === 0, 'missing:', missing);
7. Common Pitfalls and Tuning Advice
Pitfall 1: treating a single run as the conclusion. Generation tasks have high variance; sample at least three times per case and judge by the majority result.
Pitfall 2: only tuning the prompt without fixing the reasoning budget. Budget changes alter the model’s behavioral style and break attribution.
Pitfall 3: letting the model be both the player and the referee without giving it a structured output format. Require it to output in L1/L2 layers and to provide actionable fix points.
Pitfall 4: ignoring the effects of context length and tool calls. The longer the context and the more tools involved, the longer the chain, and the harder it is to locate where an error occurred, so verify in segments.
On the platform side, if you use Baidu AI Cloud model services, you can combine logging and monitoring alerts to record the input summary, parameters, and latency of each request, forming a traceable evaluation archive; model files and generated artifacts can be stored in object storage, and evaluation scripts can run on a container platform, which makes horizontal scaling and reproduction easier.
8. Conclusion
“Did the new version meet expectations” is a question that cannot be answered apart from a specific scenario. A more pragmatic path is: fix the variables, design cases with discriminating power, accept in layers, sample multiple times, and keep records for reproduction. Once this workflow is in place, changes brought by model iterations are quantified clearly, rather than staying at the vague impression of “seems a bit uneven.”
