How to Evaluate LLM Coding and Reasoning Capabilities: A Reproducible Methodology

    Relying on subjective impressions to judge a general-purpose LLM's coding and reasoning ability leads to conclusions that cannot be reproduced or compared across versions. This article breaks that vague "feel" into four measurable evaluation axes—intent purity of generated code, instruction-following stability, verifiable reasoning depth, and refusal boundaries with task sustainability—and then outlines a reproducible evaluation workflow covering task set construction, prompt freezing, automated judging, multi-round sampling, and regression comparison, along with common misjudgments to avoid.

    1. Background: Why “It Feels Good” Is Not an Evaluation Result

    In real engineering work, teams often judge a general-purpose LLM’s coding and reasoning level from a handful of subjective experiences. The problem is that those experience samples are heavily contaminated by irrelevant variables: prompt style, task difficulty, and the service load on a given day. The conclusions cannot be reproduced, and no regression comparison is possible after a version upgrade.

    A more sound approach is to decompose the “feel” into observable, scoreable dimensions. Several complaints surfaced in the original discussion map neatly onto four quantifiable evaluation axes: generated output carrying self-imposed constraints, results that look checked but still require multiple rounds of rework, usable-but-increasingly-refused reverse-analysis tasks, and quota consumption plus queueing that undermines sustainability. Each axis is defined below, with observation methods and scoring suggestions.

    2. Four Core Evaluation Dimensions

    2.1 Architectural Soundness (Intent Purity of Generated Code)

    This measures whether the model, without being asked, introduces extra abstraction layers, redundant configuration items, unnecessary design patterns, or defensive branches. Such “mysterious design” significantly increases code review cost and is a typical trait of non-expert thinking.

    Observation method: given an implementation task with clear boundaries, count the modules, abstraction layers, and configuration items in the output that the prompt did not cover, then compute the divergence from a human reference implementation.

    1. intent_purity = 1 - (unrequested_entities_added_by_model / total_entities_in_reference_implementation)

    Scoring suggestion: a purity below 0.6 indicates a clear tendency to set its own limits. Add an explicit constraint at the prompt layer such as “implement only what the requirements state,” then retest.

    2.2 Instruction-Following Stability (Self-Check Effectiveness and Rework Rounds)

    “Repeatedly looks like it is checking, yet still needs multiple rounds of rework” means the model’s self-verification step is formalistic: it restates the checking action but never actually locates the defect. Evaluation should not look at whether the model claims to have checked, but at the defect density of the first delivery and the convergence speed.

    Record three quantities: defects in the first round, rework rounds needed to reach zero defects, and new defects introduced per round (used to identify the “fix one, introduce two” oscillation pattern). A model whose convergence curve oscillates rather than decreases monotonically carries the highest risk in long-chain automated pipelines, because unattended it will keep consuming quota without converging.

    2.3 Complex Reasoning Depth (Usable Ceiling on Long-Chain Tasks)

    Use proposition proofs or difficult troubleshooting tasks that require multi-step derivation and have no ready-made answer as probes, and assess whether the model can maintain long-chain consistency. The key metric is the “verifiable output ratio”: the share of output confirmed correct by formal checks or unit tests, not text length or step count.

    It is worth stressing that a longer chain of thought does not mean stronger capability. Verbose reasoning tends to come with a higher probability of self-contradiction and slower convergence; a concise and verifiable reasoning chain is more controllable in engineering terms.

    2.4 Refusal Boundaries and Task Sustainability

    Refusal rate must be counted per task type. In sensitive domains such as security research and vulnerability reproduction, a rising refusal rate directly shrinks the usable scenarios; in general business development, an overly low refusal rate may create compliance risk. The reasonable approach is to establish per-domain baselines and observe the magnitude of drift after each version iteration.

    Sustainability is also part of capability: quota consumed per task, queueing time at peak hours, and the extra overhead of failed retries all change the model’s practical usable boundary. An evaluation report should include two items—“time cost and resource cost per completed task”—otherwise the conclusions cannot guide procurement decisions.

    3. A Reproducible Evaluation Workflow

    1. Build the task set: prepare several problems in each of five categories—development implementation, code audit, reverse analysis, mathematical and formal reasoning, and structured long-document output. Every problem needs an objective way to be judged.
    2. Freeze the prompts: use exactly the same prompt and temperature settings for all systems under test on the same task, and no mid-run tuning, so that gains from prompt optimization are not misattributed to model capability.
    3. Prefer automated judging: anything that can be judged by compilation, unit tests, or a formal verifier must be judged automatically; subjective items (writing naturalness, code readability) use a blind average across multiple reviewers.
    4. Sample over multiple rounds: repeat each task several times to estimate variance. A single success does not prove capability, and excessive variance indicates insufficient stability.
    5. Run regression comparisons: after a version upgrade, rerun the same task set, output the per-dimension deltas, and build comparable historical curves.

    An illustrative score summary structure:

    1. {
    2. "task_id": "dev-017",
    3. "intent_purity": 0.72,
    4. "first_pass_defects": 3,
    5. "rounds_to_zero": 4,
    6. "verifiable_output_ratio": 0.65,
    7. "refusal": false,
    8. "cost_units": 0.02
    9. }

    4. Common Misjudgments and How to Avoid Them

    • Substituting cross-brand comparisons for capability assessment: products differ enormously in prompt sensitivity, context length, and rate-limiting policy, so comparison conclusions drawn outside a unified harness are essentially unusable.
    • Measuring reasoning quality by output length: length has no stable correlation with correctness.
    • Ignoring variance: a success case from a single run is the sample most easily misread.
    • Attributing quota and queueing problems to model capability: this belongs to service form and resource scheduling, should be recorded separately, and must not be mixed into the capability score.

    5. Practical Recommendations

    For enterprise users, the recommendation is to hard-code the four dimensions above into the selection checklist and the pre-release regression pipeline, and to combine them with common cloud capabilities such as logging services, monitoring and alerting, and container platforms, so that call-chain tracing, cost aggregation, and anomaly alerts are all in place. For individual developers, prefer automatically judged problems over subjective ones, and concentrate the limited manual review budget on dimensions that are hard to automate, such as writing quality and architectural soundness. Conclusions reached this way are reproducible and comparable, and they stay valid in an environment of rapid version iteration.