A Practical Guide to Evaluating LLMs for Long-Horizon Software Engineering Tasks
Benchmark scores often fail to predict whether an AI model can reliably complete complex, multi-step engineering work. This guide presents a reproducible evaluation framework based on completion rate, human intervention, task cost, convergence, regressions, and build impact, with practical guidance for task design, budget controls, observability, and model selection.
Over the past year, general-purpose large language models have evolved at an accelerated pace. New versions appear frequently with claims such as “the strongest professional work model,” “the best research model,” “a doubled context window,” or “lower API pricing.” Launch announcements are often accompanied by demonstrations involving millions of calls.
Yet the experience of real engineering teams can be very different. Some experienced developers have described certain new releases as “basically unusable.” Others have publicly explained why they disliked a new version after receiving early access, spending an entire day discussing tasks with the model, and ultimately implementing only a small portion of the intended changes. The work could not be shipped end to end, so they continued using another solution for daily development.
This gap is not accidental, and it should not be reduced to the claim that a model is simply “not smart enough.” When these opinions are generalized, the central criticism is usually not a lack of isolated intelligence, but difficulty collaborating on long-running tasks.
This article treats the issue as a general engineering problem: how to evaluate the practical usability of an LLM on long-duration, multi-step software engineering tasks and quantify the results through a reproducible process.
Why Benchmark Scores Do Not Equal Engineering Usability
Public benchmarks typically measure short, well-defined tasks that can be graded automatically. Given a repository and a problem description, the model produces a patch, and a test set determines whether it passes.
These tasks usually rely on three implicit assumptions:
- The entire context is provided at once.
- The acceptance criteria are explicit.
- Failures can be rolled back immediately.
Real engineering tasks violate all three assumptions:
- Context grows incrementally, and requirements may change during execution.
- Acceptance criteria are often ambiguous. “It runs” is very different from “it follows the team’s engineering standards.”
- Failures are expensive. A bad refactoring can affect thousands of lines of code and disrupt the build pipeline.
As a result, improvements on public benchmarks do not translate linearly into better day-to-day engineering experiences. Evaluation needs to return to engineering semantics rather than benchmark-score semantics.
Three Common Failure Modes in Long-Horizon Tasks
1. Asking for Internal Details Instead of Exploring the Repository
Partway through a task, a model may ask the user for information that it could have discovered independently, such as an internal configuration value or a historical implementation detail. The user may not know the answer, and the task then stops because nobody can respond.
The underlying problem is a flawed information-gathering strategy: the model asks before investigating the codebase.
2. Long, Low-Signal Explanations
For the same issue, one solution may simply state that a storage medium has slow read and write performance. Another may produce several long sections speculating about the internal principles of the toolchain.
The result is low information density. The actual conclusion is buried, increasing the cost of review instead of reducing it.
3. Spinning and Uncontrolled Costs
This is usually the most expensive failure mode. A frequently cited public example involved a large cross-language code transformation project. One solution consumed approximately hundreds of thousands of dollars in API calls while making almost no progress. Another completed the work in less than two weeks at a cost of roughly $20,000.
A later version ran for seven days without meaningful improvement and increased build time by more than half. After another four days, the task still had not converged.
The signals of spinning are relatively clear:
- The number of changed lines increases while test pass rates remain unchanged.
- Build times increase.
- The same error is repeated.
- Multiple iterations produce no meaningful progress.
Building a Quantitative Evaluation Framework
Model selection should not be based on isolated experiences. A practical approach is to build an internal task set containing 30 to 100 tasks across four categories:
- Small-scope defect fixes
- Cross-module refactoring
- Cross-language migration
- Dependency and build-environment maintenance
Each task should have a fixed repository snapshot, initial state, and acceptance script.
Recommended core metrics include:
| Metric | Meaning |
|---|---|
| End-to-end completion rate | The percentage of tasks that pass acceptance without human takeover |
| First-pass rate | The percentage of tasks that pass on the first submission |
| Human interventions | The average number of takeovers or corrections per task |
| Cost per task | Actual spending calculated from tokens and API calls |
| Convergence steps | The number of iterations required to meet acceptance criteria |
| Regression rate | The percentage of tasks that introduce new failing cases |
| Build impact | The change in build or test duration before and after modification |
Human intervention and build impact are among the metrics that best explain the difference between benchmark results and real user experience, yet they are often overlooked.
A Practical Evaluation and Observability Skeleton
The evaluation logic itself should remain minimal, with maintainability taking priority:
def evaluate(case, agent, budget):repo = restore_snapshot(case.repo_id) # Fixed initial stateresult = agent.run(task=case.prompt,repo=repo,max_steps=budget.steps,max_cost=budget.cost, # Hard budget limittools=["read_file", "search", "patch", "run_tests"],)passed = run_acceptance(case, repo) # Shared acceptance scriptreturn {"case": case.id,"passed": passed,"steps": result.steps,"cost": result.cost,"interventions": result.interventions,"build_delta": measure_build(repo, case.baseline_ms),"stalled": result.steps > 3 and not result.diff_changed,}
Three engineering constraints are especially important:
- Budgets must be hard limits, not suggestions included in the prompt.
- Spinning signals such as
stalledshould be reported as first-class metrics. - Acceptance scripts and task sets must be versioned. Without version control, comparisons across model versions are not meaningful.
For observability, write every call’s inputs, outputs, tool trajectory, and cost to a logging service. Monitoring and alerting rules should cover conditions such as:
- Cost exceeding the threshold for a single task
- No diff changes across several consecutive iterations
- A week-over-week or run-over-run increase in build time
Standard cloud infrastructure is sufficient for this type of evaluation platform. Object storage can retain repository snapshots and artifacts, a container platform can provide isolated evaluation environments, a message queue can distribute tasks, and logging and monitoring systems can support tracking and alerting. Baidu AI Cloud provides corresponding capabilities in these general categories and can be considered as one possible foundation for an evaluation platform.
From Evaluation Results to Model Selection
Evaluation results rarely show that one model wins in every category. More often, capabilities form a jagged distribution, with different solutions performing well in different scenarios.
A practical strategy is scenario-based routing:
- For areas such as code review, 3D and game content generation, and graphical user interface operation, prioritize solutions that are strong in those specific domains.
- For cross-module refactoring and long-running migrations, prioritize solutions that converge quickly, require fewer interventions, and keep costs under control.
- For high-risk changes, enforce small incremental commits and run acceptance checks after every step. Avoid large one-shot rewrites.
- For large batches of cost-sensitive tasks, configure budget circuit breakers and human review gates.
Engineering mechanisms such as a reverse proxy or unified gateway also remain valuable. A shared access layer can provide caching, rate limiting, routing, and cost accounting. In many cases, these controls deliver more predictable benefits than switching models alone.
Conclusion
The messaging around a new model release usually measures its capability ceiling. Engineering teams need stable performance at the task floor.
Moving evaluation away from public benchmark scores and toward an internal task set makes performance measurable through completion rate, intervention count, task cost, and build impact. This helps teams avoid paying for unproductive loops hidden behind attractive benchmark results.
Models will continue to evolve. The evaluation framework and observability system are the long-term assets that allow engineering teams to adapt with confidence.
