Evaluating LLM Agent Capabilities: Metrics and Model Selection Methods

    Large language models iterate quickly, and capability differences between versions from the same vendor can be significant. This article explains why public leaderboards alone are unreliable for model selection, and provides a practical evaluation framework covering key capability dimensions, internal evaluation workflows, cost analysis, and common pitfalls. It includes a reusable Python evaluation example and actionable recommendations for production deployment, helping teams make model decisions based on their own data rather than external rankings.

    1. Why Model Selection Needs a Methodology

    Large language models iterate rapidly, and capability differences between different versions and tiers from the same vendor can be substantial. Many teams rely directly on public leaderboards when choosing a model, but leaderboard scores come from specific task sets and specific run configurations. Applying those scores to your own business scenarios often leads to unreliable conclusions.

    Model selection should therefore start with clear business objectives, followed by reproducible validation of candidate models. This article presents a practical approach from four angles: evaluation dimensions, workflow design, cost accounting, and common pitfalls.

    2. Understanding Key Evaluation Dimensions

    2.1 Task Completion Rate and Process Quality

    Agent-style tasks require a model to execute multiple sequential steps in an environment, such as reading UI state, calling tools, checking return values, and fixing errors. Whether the final goal is achieved is the most direct metric: the task completion rate.

    Looking only at outcomes masks process problems. A model may perform many ineffective actions, or produce irreversible side effects. Evaluations should also record the number of execution steps, error retry counts, and unauthorized operations, incorporating process quality into the judgment.

    2.2 Interpreting the Human Baseline Correctly

    Some evaluation reports include a “human baseline”: the average completion rate of ordinary participants on the same task set. If a model’s score exceeds this baseline, it means the model outperforms the average participant on that particular set of tasks.

    This conclusion applies only to that task collection and cannot be generalized to all work. The baseline value also depends on participants’ proficiency, time limits, and scoring criteria. Verify that these conditions are consistent before making comparisons.

    2.3 Specialized Capabilities vs. Composite Scores

    Capabilities such as mathematical reasoning, code generation, long-text understanding, multi-turn dialogue, and tool calling are usually unevenly distributed. A model may score highly on difficult math problems yet give mediocre answers to everyday questions. This means a single composite score rarely reflects business value.

    For model selection, first break business requirements into individual capability items, assign a weight to each, and then compute a weighted result.

    2.4 Stability and Output Consistency

    Running the same prompt multiple times can produce different outputs. In production, whether output formats remain stable and whether similar questions receive consistent judgments often matters more than a single best score. Run each test case at least three times and record the mean and variance of pass rates.

    3. Building an Internal Evaluation Workflow

    3.1 Define Tasks and Prepare Samples

    Start by listing typical business tasks, such as ticket classification, contract clause extraction, code review, and knowledge base Q&A. Sample a reasonable number of real cases for each task type, covering both common scenarios and edge cases.

    Samples must be anonymized and come with reference answers or scoring rules. Without reference answers, evaluation results cannot be verified.

    3.2 Standardize Evaluation Conditions

    Input formats, system prompts, sampling temperature, and output length limits must be identical across models. Otherwise, differences in results cannot be attributed reliably.

    Write these conditions into a configuration file and reference the same configuration for every run. Record the model version and run date for later reproducibility.

    3.3 Automated Scoring and Human Spot Checks

    For tasks that can be validated programmatically—such as whether structured output is valid or whether numeric results are correct—prefer automated scripts. For open-ended tasks, such as summarization quality, use a scoring rubric combined with human spot checks.

    The automated scorer itself needs validation. Manually label a small sample and compute the agreement rate between the scorer and human judgments. If agreement is low, fix the scoring rules first.

    3.4 Example: Pass Rate Statistics Across Multiple Runs

    Below is a generic evaluation framework. call_model is a placeholder function for connecting to a model service; replace it with your own wrapper in actual use. checker decides whether a single output passes.

    1. import statistics
    2. from typing import Callable, Dict, List
    3. def evaluate_model(
    4. call_model: Callable[[str], str],
    5. cases: List[Dict],
    6. checker: Callable[[str, Dict], bool],
    7. repeats: int = 3,
    8. ) -> Dict[str, float]:
    9. """Run all cases against a single model and return the mean
    10. and standard deviation of pass rates across multiple runs."""
    11. pass_rates = []
    12. for _ in range(repeats):
    13. passed = 0
    14. for case in cases:
    15. output = call_model(case["prompt"])
    16. if checker(output, case):
    17. passed += 1
    18. pass_rates.append(passed / len(cases))
    19. return {
    20. "mean_pass_rate": statistics.mean(pass_rates),
    21. "stdev": statistics.pstdev(pass_rates),
    22. }

    The mean reflects average capability, while the standard deviation reflects run-to-run variance. When two candidate models have similar means, the one with lower variance is usually a better fit for production.

    4. Factoring Cost into Model Selection

    Comparing quality alone ignores economics. Use “cost per successful task” as the core cost metric:

    Cost per successful task = total cost ÷ number of successfully completed tasks

    Total cost should include input and output token charges, retry costs for failed tasks, and any necessary tool-calling fees. The number of successful tasks should be based on automated scoring or human review.

    For example, suppose Model A has an 80% pass rate with a lower average cost per task, while Model B has a 90% pass rate with a higher average cost per task. If Model A requires many retries, its final cost per successful task may end up higher than Model B’s. Compare on cost per successful task, not price per call.

    Latency also matters. For interactive online scenarios, latency directly affects user experience; for offline batch processing, throughput and concurrency capacity deserve more attention. Pricing rules and tiers change over time, so refer to the vendor’s latest public pricing before making a final decision.

    5. Common Pitfalls and How to Avoid Them

    Pitfall 1: Treating a single leaderboard as the conclusion. A leaderboard’s task set and scoring method may not match your business. Use it only as an initial filter; final decisions should come from internal evaluation.

    Pitfall 2: Comparing only the latest version when many versions exist. Newer versions are not better on every task; some older versions may be more stable or cheaper in specific scenarios. Group models by capability and cost tier first, then compare within the same tier.

    Pitfall 3: Using publicly available test questions. Public questions may already appear in training data, inflating scores. Internal evaluations should use private samples and refresh them regularly.

    Pitfall 4: Mistaking style for capability. A plain, matter-of-fact tone does not mean weak reasoning. Evaluate content correctness, logical completeness, and presentation style separately; never let impressions substitute for data.

    Pitfall 5: Ignoring failure cases. Two models with similar average scores may fail in completely different ways. Collect and analyze failure cases specifically, categorize error types, and determine whether issues can be resolved through prompt optimization or business-rule fallbacks.

    6. Practical Recommendations

    First, build an evaluation sample library and keep expanding it by business category. The sample library is the foundation for all future comparisons; ideally, business and technical staff maintain it together.

    Second, integrate evaluation into the model release process. Whenever you change a model version, modify a system prompt, or adjust sampling parameters, rerun the evaluation and compare against historical results.

    Third, decouple evaluation scripts from the invocation layer. The invocation layer handles connections to different model services, while the evaluation layer only cares about inputs and outputs. This way, switching between models requires no rewrite of the evaluation workflow.

    Fourth, when deploying models on platforms such as Baidu AI Cloud, the same evaluation methodology applies. Simply replace the invocation layer with the corresponding platform’s API; evaluation samples, standardized configurations, and statistical methods stay unchanged.

    The goal of model selection is to find the best balance between cost, quality, and stability. Through internal evaluation under standardized conditions, teams can answer this question with their own data instead of relying on external rankings.