Choosing Large Language Models: How to Evaluate Agent and Coding Capabilities

    Model evaluation is moving beyond parameter counts and pretraining data toward post-training quality and real-world performance in agent and coding tasks. This article presents practical evaluation methods for tool use, error recovery, long-horizon planning, coding reliability, long-context utilization, security, and cost, helping teams make model decisions based on reproducible evidence from their own workflows.

    Large language model evaluation is increasingly shifting away from parameter count and pretraining data volume. The focus is now on post-training quality and how models perform in real-world agent and coding tasks.

    Public benchmark scores provide useful signals, but they rarely reflect how a model performs with your codebase, toolchain, and business processes. This article outlines the key capability areas to evaluate, describes reproducible testing methods, and highlights risks to check during model selection.

    1. Agent Capabilities: Evaluate Tool Use and Error Recovery

    Agent tasks usually involve multi-step reasoning, tool calls, and responses to environmental feedback. Three areas deserve particular attention.

    Tool-Calling Accuracy

    Can the model call the right tool at the right time? Are the parameter types and fields correct? Can it correctly parse the returned results?

    Prepare a fixed set of tasks and track the proportion of runs that contain:

    • Tool-call failures
    • Invalid parameters
    • Unnecessary or incorrect tool calls

    Error Recovery

    When a terminal command fails, a test breaks, or an API request times out, can the model understand the error, adjust its strategy, and continue?

    Record two metrics:

    1. The percentage of errors that the model successfully recovers from
    2. The number of turns required to recover

    If the model repeatedly executes the same failing command, record the task as a failure.

    Long-Horizon Planning Stability

    For tasks that require more than a dozen steps, check whether the model:

    • Misses subgoals
    • Repeats steps that have already been completed
    • Produces an output that meets the acceptance criteria

    Post-training methods, such as reinforcement learning with tool-use data or training on error-recovery trajectories, may improve these capabilities. However, the impact depends on the specific model, data mixture, and evaluation tasks. Results should not be generalized automatically to other models.

    To determine whether one model version is actually stronger than another, compare them using the same tasks, prompts, and retry limits. Do not rely solely on claims in release notes.

    2. Coding Capabilities: Stability Matters More Than One-Off Generation

    Generating a runnable code snippet is very different from contributing reliably to a large software project. In a real codebase, a model must understand dependencies, follow team conventions, and avoid unrelated changes.

    The following checklist can help evaluate coding performance.

    Evaluation area How to test it Key metric
    Cross-file dependency tracking Change an interface and check whether all callers are updated Number of missed call sites
    Change-scope control Ask the model to modify only a specific function and inspect diffs in other files Number of out-of-scope changed lines
    Convention compliance Provide the team’s coding standards and check naming, formatting, and dependency choices Number of violations
    Bug localization Provide a reproducible bug and record how many turns are needed to identify the correct location Turns required to converge
    Regression safety Run the full test suite after the change Number of newly failing tests

    For complex logic bugs, many models still struggle to identify the root cause accurately on the first attempt and require several rounds of exploration. This should be tracked as an independent metric rather than being replaced by the success rate on simple tasks.

    Because model outputs are probabilistic, run each task at least three times and report consistency alongside the results.

    3. Long Context: Verify That the Larger Window Is Actually Useful

    A larger context window does not automatically mean that a model can use all of the supplied information effectively. Long context usually provides two benefits:

    1. Loading an entire codebase in one interaction
    2. Preserving earlier actions and intermediate results during a long-running task

    The following tests can help verify whether those benefits are real.

    Targeted Information Retrieval

    Place a verifiable fact at different positions in a long document. Measure retrieval accuracy by both the fact’s position and the total text length.

    If the model can reliably find information near the beginning and end but performs poorly on content in the middle, its use of the middle portion of the context may be limited.

    Cross-File Dependency Questions

    Provide several related files together and ask questions such as:

    • Which modules call a particular function?
    • Which components will be affected if that function is modified?

    Compare the answers line by line with manually labeled dependency relationships.

    Long context also has clear limitations. Longer inputs generally increase cost and latency. When too much information is provided, the model may overlook important constraints.

    Auxiliary approaches such as chunked retrieval may also perform worse when information is distributed across many locations and requires global reasoning. In practical engineering work, run both full-context and on-demand retrieval approaches before deciding which one to adopt.

    4. Tool Permissions and Security Risks

    Agent models can execute commands, modify files, and call external services. These capabilities introduce clear operational risks.

    • Apply least-privilege access: Grant the model access only to the tools and directories required for the current task. Do not allow it to access production credentials or delete unrelated data.
    • Add human approval points: Require confirmation before irreversible actions such as deleting files, deploying releases, or changing permissions.
    • Run regression tests: Code generated by the model should pass tests and code review before it is merged into the main branch.
    • Manage secrets securely: Inject API keys and database passwords through environment variables or a secrets management service. Do not place them in prompts or source code.
    • Set cost limits: Model calls can accumulate quickly. Without a limit, an error-recovery loop may generate a large number of ineffective calls. Set a maximum number of turns and a budget limit for each task.

    5. Model Selection Checklist

    A practical selection process can follow these steps:

    1. Build a sample set of 30 to 50 real tasks from the team’s work, covering simple changes, cross-file changes, and complex bugs.
    2. Run each sample multiple times under the same conditions. Record success rate, average turns, out-of-scope changes, and test pass rate.
    3. Track tool use, error recovery, and long-context results separately instead of combining them into a single overall score.
    4. Define acceptable thresholds based on cost, latency, and permission requirements before comparing candidate models.
    5. Start with a low-risk project, observe one or two development cycles, and expand usage only after the results are satisfactory.

    6. Conclusion

    Agent and coding capabilities are two important dimensions for evaluating modern large language models. Post-training optimization may improve tool calling and error recovery, but those improvements must be validated against your own tasks.

    For development teams, a data table containing success rate, turn count, change scope, test results, and cost is more useful than a broad claim that a model has become “more capable.” With this evidence, model selection becomes a repeatable and auditable decision rather than a judgment based primarily on experience or marketing statements.