Evaluating LLM Coding Ability and a Practical Guide to Shipping Coding Agents
How to judge whether a large language model can ship mergeable changes, how to build evaluation sets from real engineering work, which metrics matter beyond pass rate, and how to run agents as constrained systems before moving from pilots to daily use.
1. Judge coding ability by whether it can deliver mergeable change
Code completion, error explanation, and standalone function generation all save developer time. In a real project, even a simple-looking fix usually requires understanding existing conventions, finding the right place to edit, and confirming the change does not break other callers. Adding duplicate-record handling to a batch import, for example, is not just writing a dedup function. You still need to know which fields define a duplicate, whether the same rules apply within a batch and across batches, and how to report results when a partial write fails.
Evaluate coding ability at three layers. First, code generation: can the model produce a correct, readable implementation from a clear spec. Second, engineering reasoning: when requirements are scattered across docs, tests, and history, can it recover constraints and explain trade-offs. Third, agent execution: with appropriate permissions, can the system read the repo, edit files, run checks, and revise the plan from the results.
These layers are related but cannot be collapsed into one score. A correct single-turn generation does not mean the model can find the right entry point in a large codebase. An agent that eventually passes checks may have spent many search and retry rounds. For a team, the useful question is not whether the code “looks good,” but whether the task can be delivered at acceptable cost under given permissions, time, and review standards.
2. Build evaluation sets from real engineering tasks
Sample from requirements and defects the team has already solved. Start from a pre-fix snapshot, keep the context needed to solve the problem, and hold later commits and postmortems as reference—do not give them to the model. A reference implementation should not be the only accepted answer: any candidate that meets behavioral constraints, passes checks, and has acceptable maintenance cost should be allowed.
Group tasks by type:
- Local implementation: input validation, data transforms, or state checks. Focus on nulls, boundaries, invalid input, and whether the change follows the module’s interface conventions.
- Fault localization: failure symptoms, a minimal repro, and necessary logs. Distinguish fixing the root cause from making the error disappear. Swallowing an exception can hide a surface failure and leave inconsistency for downstream systems.
- Cross-file change: public API updates, config default changes, or behavior-preserving refactors. Besides the new requirement, check that callers are updated, compatibility is kept, and unrelated edits are not introduced.
Stratify difficulty. A date-parse bug in one file and a multi-module config-precedence issue are both defect fixes, but they differ in evidence gathering and regression risk. A suite that is almost all local tasks cannot prove the system is fit for cross-module work, no matter how high the overall pass rate.
Define acceptance before evaluation starts. Combine tests, static checks, and human review. Independent tests used for acceptance must not be modified by the candidate change. Human review covers what automation misses: whether error messages help diagnosis, whether the edit scope is reasonable, and whether the implementation raises future maintenance cost.
3. Compare inference configurations, not only final pass rate
If the deployment offers different inference settings, run the same tasks at lower cost and at a higher reasoning budget. Candidates should get the same snapshot, initial brief, tool permissions, and acceptance criteria. Before comparing, state which configs share the same time and retry caps (equal-budget comparison) and which follow their real deployment policy (whether the live workflow is worth it). Report those results separately.
For tasks with a clear interface and fast verification, a cheaper config may be enough. For unclear error sources, many compatibility constraints, or cross-file tracing, check whether a higher budget reduces misdiagnosis and rework. A longer analysis is not a benefit by itself; extra cost is justified only if it raises delivery success, cuts human intervention, or lowers regression risk.
Record at least:
| Metric | How to record | Question it answers |
|---|---|---|
| First-pass rate | Whether the first candidate passes acceptance | How often later correction is required |
| In-budget pass rate | Passes within time and retry limits | How many tasks complete under real constraints |
| Human intervention | Prompts, plan corrections, and patch rewrites, by degree | Whether automation actually reduces developer work |
| End-to-end time | From task receipt to a reviewable change, including checks and retries | How long developers wait |
| Cost per accepted delivery | Aggregate resource use including failed attempts, then divide by accepted deliveries | Resources needed to complete one successful task |
For tasks sensitive to randomness or close to the acceptance threshold, rerun and report variance. A config that occasionally solves a hard item but often times out on similar work is better as an optional assistant than as the default automation path.
4. Treat the agent as a constrained engineering execution system
An agent’s value is adjusting the next action from tool output: locate relevant code, make a minimal change, then verify the hypothesis with checks. It is not merely extra rounds of code generation. Score both outcome and process: were edits grounded in code and tests? After failure, did it narrow the problem, or keep expanding the diff until some check happened to pass?
A staged workflow works in practice. First, locate entry points, tests, and conventions in read-only mode; if the request has ambiguities that would change the design, ask for clarification. Second, allow edits in an isolated workspace on files related to the task; prefer cheap local checks, then run regression checks scaled to blast radius. Third, submit a change description with reasons, checks that passed, and behaviors not yet verified, so reviewers know what is evidence-backed.
Permission boundaries must be enforced by the runtime, not only by prompts. Limit write scope; do not expose production credentials by default. Dependency changes, outbound network access, and large cross-module edits should require risk-based approval. On check failure, keep logs and task state that explain the problem—do not manufacture success by deleting tests, loosening asserts, or skipping checks. At time or retry limits, stop expanding the change and hand off diagnostic clues.
5. From a controlled pilot to daily use
Offline evaluation screens approaches; a pilot tests whether they improve the current development process. Start with tasks that have clear acceptance, small blast radius, and easy rollback: extra boundary tests, mismatches between docs and implementation, or input checks on internal modules. Record both system time and developer time spent adding context, reviewing output, and fixing errors, and compare with fully manual work on similar tasks.
Build routing from that evidence. Prefer cheaper configs for local, well-specified work. After a first failure, diagnose the gap. Missing business constraints should come from the requester; missing deps or test conditions should be fixed in the environment; raise the reasoning budget only when evidence is sufficient and the problem truly needs cross-module analysis. For public API changes, irreversible data operations, or production impact, keep a human gate even if the system produced a usable patch.
Turn evaluation into executable task tiers: which work can auto-generate a change for review, which is diagnosis-only, and which needs approval before any edit. When the model or execution policy changes, rerun the same core tasks and add recent typical failures. That is how a team can tell whether a capability change actually cut delivery cost, or only made the output look more like a finished artifact.
