A Practical Methodology for Selecting LLMs for Software Engineering
Leaderboard totals are a weak signal for coding models. This article explains how to profile real engineering workloads, evaluate models on correctness, repo-scale edits, tool use, latency, safety, and cost, and land them in pipelines with routing, sandboxes, and observability.
Why coding model selection cannot rest on a single score
LLM use in software engineering has moved beyond writing a function. Teams now need requirement clarification, repository-scale edits, test completion, code review, scripts for 3D and graphics, and multi-step agent orchestration. Those jobs do not share the same requirements: some need one-shot reasoning quality, others stable tool calling, others consistency in long context, others cost-efficiency under low latency and high concurrency.
Treating public leaderboard totals as a buying decision therefore creates two kinds of error. First, averages hide weaknesses: a high overall score can still be unstable on repo-level repair, front-end interaction, or long tool chains. Second, eval setups diverge from production: demos and arena-style comparisons favor short tasks and visible text, while real engineering cares about reproducibility, rollback, and auditability.
A more robust approach splits selection into three layers: task profile, capability dimensions, and runtime constraints. Define the team’s true high-frequency workload, validate against those dimensions, then filter by latency, quotas, cost, and security policy. When you deploy on cloud infrastructure, fold model calls into an observable system with object storage, containers, logging, and alerting—not a chat window.
Profile the work: turn “coding ability” into testable scenarios
Programming demand usually falls into several scenario types. Each needs its own acceptance criteria, not one shared prompt score.
Local code generation. Given a signature, API contract, or algorithm description, produce a compilable, testable implementation. Judge correctness, edge cases, error handling, and style consistency.
Repository-scale change. Locate defects in an existing project, follow the call graph, and make the smallest necessary edit. Judge whether unrelated modules were touched, whether existing tests broke, and whether the diff is reviewable.
Front-end and interaction. Go from a requirement to a runnable page or component. Judge more than visual similarity: state management, accessibility, performance, and project structure.
Agents and tool orchestration. The model must plan steps, retrieve, run commands, read logs, and retry on failure. Judge protocol compliance, loop termination, and honest handling of uncertain results.
Cross-modal engineering assistance. For example, generate scripts and checks from 3D structure, graphics assets, or design constraints. Judge whether geometric constraints were understood and whether output is consumable by the rest of the toolchain.
Teams should weight the last month of real tickets by these categories. If 70% of demand is repo-level repair, contest-style single-problem scores should not dominate the decision.
Capability dimensions: define a “good model” in engineering terms
Evaluate at least the following dimensions, each with a repeatable test set.
Correctness and testability. Output should be able to enter a test pipeline with little extra work. Freeze cases and timeouts; record one-shot pass rate, multi-sample pass rate, and the share of answers that look right but fail tests. The last metric often exposes more than prose quality.
Repo understanding and minimal change. With limited context or retrieval results, watch whether the model widens the blast radius. Engineering prefers small, precise patches: cheaper review, safer rollback.
Reliable tool use. In agent settings, one bad call format or ignored return code can kill the chain. Track legal-call rate, parameter-type errors, recovery attempts after failure, and whether the model invents paths or APIs when information is missing.
Long-context consistency. When specs, APIs, history, and code all sit in context, does the model still honor the earliest contract? Insert conflicting constraints mid-run and see which rule it follows and whether it flags the conflict.
Latency and throughput. Interactive assistants are sensitive to time-to-first-token and end-to-end latency; batch review cares more about throughput. Evaluate “faster” and “stronger” models separately; do not apply one SLA to both loads.
Controllability and safety boundaries. Refuse dangerous actions, do not leak secrets, do not change production config without authorization. In a sandbox, plant decoy files and fake credentials and watch for over-read or exfiltration. This matters as much as raw skill.
Cost structure. Unit price is not enough. Include retries, multi-round tool use, and very long context. A cheap, unstable call can cost more after rework.
None of these dimensions depends on a vendor name; every candidate can run through the same scripts. Version the test set, store it in object storage, write results to logs, and watch regressions with alerts.
How to read public evals: signals, not verdicts
Public benchmarks still help if you treat them as signals.
General intelligence or reasoning boards show whether a model can follow instructions and reason, not whether it should be your coding assistant. Web-implementation or interactive-demo evals inform front-end work, but note whether multi-round edits and browser-level feedback are allowed. Benchmarks closer to real-time or continuous work are nearer to engineering cadence; study failure modes, not only means. Software-engineering agent evals are usually closer to repo repair, but language stack, build system, and permission model may still differ from yours.
Use public scores to shrink the candidate set. Final decisions must come from an internal suite: real defects from your repos, your style rules, your build-system error logs, and some deliberately incomplete requirements to test overconfidence.
Runtime shapes: select quality-first and speed-first paths separately
Many teams need two shapes. One is quality-first: hard refactors, architecture discussion, stubborn bugs. One is speed-first: completion, small edits, instant pair-programming feedback. Context windows, sampling, and concurrency quotas often differ; do not share one timeout and retry policy.
In practice, route: simple completion on a low-latency path; escalate when you detect multi-file dependencies, failing tests, or a tool loop. Routing must be observable so every request does not hit the most expensive path. On a container platform, give each path its own rate limits; alert separately on success rate, latency percentiles, and cost per task.
Land in the engineering pipeline, not only in chat
After selection, value comes from how you integrate.
Treat model output as a patch candidate, not a write to production. Require tests, static checks, and human review. Give agents least privilege: read-only retrieval, restricted execution, no unconfirmed external send. Version prompts and tool descriptions like API docs so they do not work in chat and fail in CI.
Code and logs often contain secrets. Redact, enforce repo-level access control, and audit. Send traffic through a gateway for quotas, key rotation, and tracing. A message queue can decouple long jobs so interactive UX is not blocked on synchronous waits.
On cloud resources, prefer a generic stack: object storage for eval sets and artifacts, containers for sandboxed execution, logs for prompts and tool traces (redacted), alerts for failure rate and cost spikes. These are common industry practices, not a single-vendor story.
A decision process you can run
- Count four weeks of real work and weight the five scenario types above.
- Prepare at least 50 internal cases covering success and failure paths; freeze random seeds and eval scripts.
- For each candidate record: test pass rate, average diff size, tool error rate, P95 latency, cost per task, safety overreach count.
- Score with weights and set vetoes—for example, unauthorized reads or invented internal APIs mean elimination.
- Canary on a small share of real tickets for two weeks, then expand.
- Re-run the same cases each quarter to catch eval-set overfitting or silent degradation after model updates.
A schematic eval loop:
for case in dataset:plan = model.plan(case)patch = model.apply(plan, repo_view)result = sandbox.test(patch)log.metrics(pass=result.ok, latency, cost, tool_errors)
The script is not the point. Every comparison must use the same sandbox and the same data version.
Common mistakes
Treating demo fluency as productivity: a smooth explanation is not a mergeable patch.
Testing only greenfield projects: legacy constraints are the hard part.
Ignoring recovery: much of an agent’s value is whether the second and third attempts get smarter.
Comparing all models with one temperature and prompt: tune each, then report both the ceiling and default-config behavior.
Skipping cost: without cost per task you cannot trade quality and budget over time.
Closing
Selecting models for coding and agents is an engineering decision: match the task mix, verify with reproducible experiments, then close with latency, cost, and safety. Public information can point, it cannot replace an internal scenario set. Design eval, routing, sandbox, and observability together so the conclusion survives version changes. For teams on cloud, productizing experiments with object storage, containers, logs, and monitoring is more durable than chasing a single release.
