LLM Evaluation and Model Selection for AI Agents: A Practical Guide

    General-purpose leaderboards often fail to reflect how models perform in agentic workflows. This article explains why evaluation results must align with the target scenario, breaks agent capability into six measurable dimensions, defines consistent metrics for accuracy, latency, token usage, and cost, and outlines a practical evaluation loop based on a private test set, a sandbox execution environment, automated regression, and canary rollout.

    1. Why General Leaderboards Fall Short for Agents

    Over the past year, LLM applications have shifted from single-turn question answering to multi-step execution. A typical agent task involves intent recognition, task decomposition, tool selection, argument filling, result validation, failure retry, and final aggregation. Because of this chained nature, general evaluations centered on single-turn accuracy can hardly reflect how usable a model is in production.

    One notable observation from the source material: a new model version raised its overall score on a general Chinese benchmark only from 71.0% to 71.5%, moving from 18th to 16th place, which looks like almost no change. Yet on the scenario-specific benchmark emphasized by its official release, the improvement was significant. This is not a contradiction; it shows that the two evaluations measure fundamentally different things.

    The first thing engineering teams need to accept is this: evaluation conclusions must align with the target scenario. A score detached from the scenario has no value for model selection.

    2. Evaluation Dimensions: Breaking Down “Agent Capability” into Measurable Items

    To assess whether a model fits an agent workflow, cover at least the following six dimensions:

    1. Instruction following and complex instruction decomposition: whether the model can correctly break a natural-language request with multiple constraints into ordered subtasks without missing boundary conditions.
    2. Tool-calling correctness: tool selection accuracy, argument structure validity rate, missing required field rate, and out-of-range enum value rate.
    3. Long-chain stability: whether errors accumulate across multiple steps, and whether the model can self-correct after a single-step failure instead of continuing to drift.
    4. Persistence and scheduled tasks: whether context management and state consistency are reliable for tasks that must hold state over a long period and trigger on a schedule.
    5. Structured output compliance: parseability, field completeness, and schema consistency of structured results such as JSON.
    6. Throughput and latency profile: average response time, latency degradation under long context, and stability under concurrency.

    Items 3 and 4 are commonly missing from general leaderboards, and they are where real projects most often fail immediately after launch.

    3. Metric Definitions: Making Data Comparable and Reproducible

    Inconsistent metric definitions are the most common source of problems in evaluation. Fix the following definitions at the experiment design stage:

    • Accuracy: measured at task level (not step level); if any step in the chain fails, the task is marked as failed.
    • Average time cost: specify whether it is time to first token or end-to-end completion time; the two can differ by several times.
    • Token consumption: track input, output, and cache-hit portions separately.
    • Cost: do not look at unit price alone; convert it to “cost per thousand successful tasks”, as illustrated below.
    1. def cost_per_1k_success(avg_tokens, price_per_mtok, success_rate):
    2. # avg_tokens: average tokens per call
    3. # price_per_mtok: CNY per million tokens
    4. # success_rate: task-level success rate (0~1)
    5. per_call = avg_tokens / 1_000_000 * price_per_mtok
    6. return per_call * 1000 / max(success_rate, 1e-6)

    The value of this metric is that a model with a lower unit price but a clearly worse success rate may actually cost more in real business terms. Retry mechanisms can multiply the cost of failures several times over.

    4. Reading Results: Three Typical “Score Illusions”

    Illusion 1: A flat overall score means no progress. When a model is optimized for a specific scenario, a marginal change in the general overall score is expected. In the source material, language and instruction following improved 1.7% and reasoning and math improved 1.2%, while the Agent dimension improved only 0.3%, which confirms that the capability gains are concentrated in specific directions.

    Illusion 2: Choosing the higher score when scenario and general benchmarks conflict. The two benchmarks differ in sampling distribution, task length, and judging criteria. The right approach is to decide which one is closer to your real traffic distribution.

    Illusion 3: Ignoring the hidden cost of latency. A model with an average time cost of 52 seconds is nearly unusable in interactive products where humans wait, but perfectly acceptable in offline batch processing and background long-running tasks. The same model can have very different value across product forms.

    5. A Practical Evaluation Loop

    Build it in four steps:

    1. Build a private evaluation set: sample 500–2000 tasks from real logs, covering high-frequency, long-tail, and failure cases, with human-annotated expected behavior.
    2. Set up a sandbox execution environment: isolate tool calls with a container platform, handle asynchronous long tasks with a message queue, and collect full-chain traces with logging and monitoring/alerting systems.
    3. Automate regression: trigger a full regression on every model version change, producing a four-dimension comparison table of accuracy, latency, tokens, and cost.
    4. Canary and decision: use “cost per thousand successful tasks” as the primary metric, combined with latency percentiles (P50/P95), to ramp up canary traffic.

    6. Conclusion

    The essence of model selection is not finding the “strongest model”, but finding the model that best matches the target scenario distribution with the optimal total cost of ownership. Building a private evaluation set, unifying metric definitions, and making long-chain and persistence tasks mandatory test items are the three cornerstones for avoiding wrong decisions. As agents become the mainstream application form, the value of this methodology will keep growing.