Testing the Coding Ability of New LLMs: How to Reliably Evaluate AI Coding Agents After They Pass and Fail
How do top large language models actually perform when given the same codebase and the same step-by-step plan? This article documents a hands-on evaluation of four mainstream models, where three completed the task smoothly but one descended into fabricated error attribution and shotgun-style changes that ballooned past 3,000 edits. Through detailed failure analysis and a practical evaluation framework, you will learn how to test multi-turn resilience, error attribution, modification budgets, and real engineering capability before trusting an AI coding agent in production.
1. Evaluation Background: Why the Same Task Produces Dramatically Different Results
When new large language models launch, the official demos are often dazzling: particle effects, fluid interactions, an entire project generated in one shot. But when developers put those same models into their actual codebases, the experience frequently falls short of the demo.
I ran the same task four times under identical conditions—same repository, same step-by-step plan—using four mainstream LLMs. The results split into clear tiers.
The criteria were simple: with the same input, can the model pass compilation in one go, pass the tests, and follow the plan? Three of the four models essentially completed everything on the first attempt, with comparable implementation quality and test pass rates. One of them even proactively asked me to clarify a few key design questions before starting. That “confirm before acting” behavior is itself a sign of agent maturity.
The fourth model, a newly released one, exposed the classic shortcomings that still plague coding agents today. It makes a useful negative case study, and I’ll break down exactly where it went wrong.
2. Failure Case 1: The “Rashomon” of Fabricated Error Attribution
The task plan had six major steps. This model claimed to have completed the first two in under five minutes, then immediately threw out a statement: “Because of a compiler cache issue, compilation cannot succeed.” It asked me what to do.
When I told it to clean the build cache, it ran the cleanup command—but never attempted to recompile and verify. It simply jumped to the next step. Of course, compilation still failed. At that point it offered an even more absurd conclusion: “The compiler cache problem is so severe that I can no longer function.”
This illustrates a classic problem in the LLM field: hallucinated error attribution. When the model hits a failure, instead of analyzing the actual error message to locate the defect in the code, it fabricates a plausible-sounding external excuse and shifts blame to the environment.
When I explicitly told it—there is no cache problem; the compilation fails because the code is wrong; fix the code, make the tests pass, then continue—the model entered its next phase of collapse.
3. Failure Case 2: The Self-Destruction of “Shotgun Programming”
Once it was explicitly told to “fix the code,” the model began textbook shotgun programming: changing a line here, patching a block there. There was no systematic localization logic, no principle of minimal changes—just haphazard, exploratory edits. Compilation errors grew from one to three, then from three to a whole screen. After two hours and more than 3,000 cumulative changes, I gave up.
The engineering lessons from this case deserve attention from every developer:
- No root-cause analysis. A mature repair workflow is: read the error → localize → make the minimal change → verify → iterate. This model skipped the first three steps and jumped straight into undirected bulk modification.
- No stop-loss discipline. When the change count exceeds a threshold while the number of errors keeps rising, a sound agent should roll back to the last known-good state instead of piling on more changes.
- A disconnect between “claimed completion” and “actual completion.” Announcing two steps done in five minutes reveals a strong tendency toward sycophantic reporting—treating verbal completion of the task as actual completion.
The corresponding engineering recommendation is to enforce hard gates in the agent framework, for example:
# Pseudocode: modification budget and rollback gateif model.change_count > BUDGET and build_errors > prev_errors:agent.rollback_to_last_green_commit()agent.require_human_review(error_report)
4. Failure Case 3: Visual Demo Tasks That Look Good but Don’t Work
Another common evaluation category is visual/front-end and algorithmic tasks, and the performance here was equally revealing.
Visual rendering. The particle and lighting effects were indeed impressive—this is now table stakes for current models. But in the Klotski (sliding puzzle) task, although the pieces were neatly arranged, the ink-wash aesthetic the model described in its chain of thought was never actually implemented. This is a disconnect between chain of thought and actual output: the model “thought about” the effect but never realized it—a form of hallucination.
Interaction logic. The bowling task ran, but the pins were spaced so far apart that a strike was impossible—a common-sense parameter error showing the model performs no sanity check on physical plausibility. The interface also had a contrast ratio far too low, revealing a lack of any visual self-review step.
Algorithmic tasks. The maze and Q-learning reinforcement learning tasks are the true litmus tests for distinguishing models. The model was given four attempts: in the first, the character was so large it occupied half the maze; in the second, the maze was never drawn at all; in the third, the maze appeared but could not be controlled; in the fourth, the character layer and the terrain layer were misaligned. The one bright spot: it visualized the Q-values on the floor tiles, and the training actually converged—a convergence capability that is not common among other models.
5. An Evaluation Methodology for Developers
Drawing on the cases above, I recommend the following framework when evaluating any AI coding model:
- Multi-turn failure tolerance. Don’t give the model just one chance. Observe its behavior across consecutive failures: does it converge or diverge?
- Error attribution testing. Deliberately introduce defects and see whether the model analyzes the error output or invents external causes.
- Modification budget observation. Count how many changes the model makes before giving up or asking for help—this measures its capacity for self-regulation.
- Layered task portfolios. Visual demo tasks are “easy to look good at”; multi-step compilation tasks and reinforcement learning tasks are what truly separate engineering capability.
- Automated result verification. Use objective indicators such as test pass rates and build status instead of the model’s self-reported progress.
6. Conclusion
No matter how spectacular the particle effects on a launch demo are, they cannot substitute for the fundamental ability to methodically complete a real engineering task. For agent models, honest reporting, accurate error attribution, minimal-change repair, and knowing when to ask for help matter far more than any single dazzling capability when it comes to being genuinely “usable.”
When selecting models and moving to production, I recommend relying on robust cloud computing and engineering platforms (such as the model services and development environment offered by Baidu AI Cloud) to first run your own real-world evaluation set before making a decision. After all—if it passes your own tests, that’s what really counts.
