Hands-On Evaluation of AI Coding Models: A Lightweight Approach to Kinematic Solving

    This article shares a hands-on evaluation of AI coding models on a real engineering task: building a lightweight, pure-kinematics constraint solver for a worm-gear linkage inside an existing physics simulation codebase. It covers the evaluation setup, why vague "wish-style" prompts expose differences in exploration speed and coverage of implicit constraints, why outputs converge quickly once acceptance tests exist, and why cumulative context cost deserves more attention than final code quality. Readers will find practical guidance on splitting work between fast and strong-reasoning models, making implicit constraints explicit in prompts, and keeping context lean.

    1. Background and Problem Definition

    In the development of an in-house physics simulation engine, the core solver typically relies on impulse-based soft-constraint dynamics. This approach is robust for rigid-body collisions, stacking, and joint actuation. However, it is not cost-effective for purely kinematic linkages: we do not need mass, inertia, friction, or restitution coefficients. We only need to solve for the end-effector pose given the drive inputs.

    This creates a typical “non-core but valuable” requirement: adding a lightweight, pure-kinematics constraint-solving capability to the testing and model-authoring toolchain. Such requirements are low in priority but not suitable to postpone indefinitely, which makes them a good practical evaluation task for AI coding models. The task is realistic and has clear correctness criteria.

    This article does not compare specific products. Instead, it abstracts the practice into a general question: how to get an AI coding tool to deliver a design from scratch in an unfamiliar codebase.

    2. Evaluation Environment and Method

    2.1 Scenario Selection

    We chose a real engineering requirement rather than an algorithm contest problem for three reasons:

    • Large context scale: the model must understand the project structure, existing solver interfaces, and toolchain conventions.
    • Verifiable correctness: the end-effector pose can be cross-checked against an analytical solution or numerical iteration.
    • Clear boundaries: no changes to the core solver are involved, so the cost of trial and error is controlled.

    2.2 Variable Control

    To keep the conclusions usable, we fixed the following variables: the same codebase version, the same AI coding tool with the same system prompt, and the same upper limit on iteration turns. What was being evaluated was differences in model capability, not differences in toolchain.

    2.3 An Easily Overlooked Distractor

    By default, the coding tool injects a large amount of system-level skill descriptions and external tool-call instructions. In practice, this content inflated the initial prompt context to roughly 30,000 tokens, a significant portion of which was irrelevant to the current task. This means that before comparing model performance, context should be trimmed first; otherwise, what you measure is “whose context window can endure more.”

    3. Round One: Performance Under Wish-Style Prompts

    The first-round prompt was deliberately vague, in a “wish-style” form: a capability to solve the end-effector pose of a mechanism based on a worm gear. The purpose of such a fuzzy requirement was to observe whether the model would proactively ask about constraints or directly produce a solution.

    The results were similar across models: most pointed to “reusing the existing dynamics system and driving it through constraints,” showing that mainstream models have largely converged on domain common sense. The real differences appeared in two dimensions.

    The first is time. Because the model had to explore the project structure from scratch, it had to call retrieval and file reading multiple times. This fixed overhead significantly compressed the speed gap between model tiers; in practice, total elapsed time for each approach clustered in the five-to-nine-minute range.

    The second is chain-of-thought length and coverage of implicit constraints. Some models preferred shorter reasoning paths, responding quickly and starting implementation early. The cost was insufficient coverage of implicit constraints (coordinate-system conventions, units, singular configurations, numerical stability, testability), making them prone to “going off the rails” under wish-style requirements. Other models reasoned longer, were slower at the start, but produced more complete solutions.

    A fitting analogy: a short chain of thought is like a newly hired engineer, quick-minded and willing to act, but prone to missing items; a long chain of thought is like an engineer seasoned by projects, steady but slow in the early phase.

    4. Iteration Phase: Why Convergence Is Rapid

    Once normal iteration began, the outputs of each approach became highly similar and hard to rank. The reasons are worth expanding on:

    1. The requirement itself has strong constraints. The kinematic relationships of worm-gear transmission and the solution method for closed-loop linkages are mature engineering knowledge, so models have ample prior knowledge to reuse.
    2. Verifiability drives convergence. Once validation cases are provided, the model corrects around those cases, and differences are quickly erased.
    3. The toolchain amplifies commonality. The same retrieval and editing capabilities lead models to produce structurally similar implementations.

    The conclusion is therefore: on “routine engineering tasks with clear acceptance criteria,” the gap between models is far smaller than advertised; differentiation shows up more in exploration efficiency and the number of rework rounds.

    5. Token and Context Cost: A More Worthy Metric

    We did not run a strict statistical measurement, but we observed that after completing the same number of turns, some approaches had slightly lower cumulative context usage. This suggests the evaluation should introduce more engineering-oriented metrics:

    • First-draft usability rate: the proportion that can enter review without major manual changes.
    • Rework rounds: the number of interactions required to meet acceptance criteria.
    • Cumulative context: the accumulated consumption of input-side tokens, which directly affects cost and latency.
    • Irrelevant context ratio: the volume of system-injected content unrelated to the task.

    An illustrative evaluation record structure:

    1. {
    2. "task": "lightweight_kinematic_solver",
    3. "runs": [
    4. {"model_tier": "flash", "turns": 6, "first_draft_usable": false, "context_tokens": 128000},
    5. {"model_tier": "pro", "turns": 5, "first_draft_usable": true, "context_tokens": 121000}
    6. ]
    7. }

    6. Engineering Recommendations: Use Models in the Right Place

    • Use fast models for exploration and scaffolding. Retrieval, directory listing, and skeleton generation should prioritize throughput.
    • Use strong-reasoning models for solution design and review. When coordinate systems, singularities, and numerical stability are involved, spending more reasoning early is more worthwhile.
    • Prioritize prompt engineering over switching models. Making implicit constraints explicit can significantly reduce the chance of going off the rails:
    1. Goal: Solve the end-effector pose of a worm-gear mechanism without relying on the dynamics solver.
    2. Constraints: right-handed coordinate system; consistent length units; handle the transmission ratio and self-locking range;
    3. provide both analytical and numerical implementations, with cross-validation cases.
    4. Deliverables: interface definitions, implementation files, unit tests, and a brief design note.
    • Make context governance routine. Trimming system skill descriptions unrelated to the task and loading external tool instructions on demand are the most direct ways to cut cost and improve efficiency. When multi-model collaboration or large-scale batch processing is needed, you can combine object storage to save evaluation artifacts, message queues for task distribution, container platforms for parallel runs, and logging and monitoring services to observe elapsed time and consumption.

    7. Conclusion

    The core judgment from this practice is: on routine engineering tasks with clear acceptance criteria, the capability differences among mainstream AI coding models show up mainly in exploration efficiency, coverage of implicit constraints, and context cost, rather than final code quality. Model selection should not pursue a single “strongest” option, but should divide labor by phase: fast models handle breadth, strong-reasoning models set the direction, and explicit-constraint prompt design plus context trimming together deliver stable engineering returns in real projects.