LLM Selection for AI Agents: A Scenario-Based Evaluation Methodology

    This article presents a practical methodology for selecting large language models for AI agents. It explains why chat-oriented benchmarks often fail to predict agent performance, then shows how to build a trustworthy baseline using controlled variables. The core of the approach is a five-stage evaluation covering skill packaging, web development, content production, knowledge base management, and browser automation. Key findings address engineering-grade prompt packaging, context and token budget management in long chains, and mandatory confirmation for high-risk actions. The article closes with a scenario matrix for model selection and a recommendation to keep a replaceable model abstraction layer.

    1. Background: Why Agent Projects Stall at Model Selection

    Over the past year, AI agents have moved from demos into production. Engineering teams keep running into the same problem: with the same agent framework, swapping only the underlying LLM can produce multiples of difference in task success rate, token consumption, and response stability. Many teams still make decisions based on traditional “chat Q&A” leaderboards, then discover after launch that the model regresses sharply in a real agent pipeline.

    The reason is that the two types of workloads have completely different load profiles. Chat is single-turn or a few turns, with short context and high fault tolerance. An agent workload involves long chains, multiple tool calls, persistent memory, and skill reuse, so any deviation at one step gets amplified along the chain. Model selection therefore has to go back to real agent workloads and use controlled experiments to answer three questions: can the task be completed, is the process stable, and is the unit cost acceptable.

    2. Experiment Design: Building a Trustworthy Baseline with Controlled Variables

    Credible conclusions come down to controlling variables. A reusable approach includes:

    • Clone several identical agent instances, keeping the memory store, skill packages, system constraints, and the set of callable tools the same;
    • Replace only the underlying model, and enable the available high-reasoning tier uniformly so that “configuration differences” do not contaminate the results;
    • Fix the task set and the pass criteria, and record success rate, number of reworks, token consumption, and how often high-risk actions are triggered;
    • For cost-sensitive scenarios, clearly separate subscription quotas from pay-as-you-go API billing, since the two cannot be compared directly.

    It is worth stressing that model capability is only one variable. Framework implementation, the quality of tool descriptions, and how context is organized all affect the outcome. An evaluation report should explicitly declare these invariants, otherwise the conclusions will not transfer.

    3. Task Tiers: A Five-Stage Evaluation of Key Agent Capabilities

    Rather than mechanically numbered test cases, designing “stages” around capability dimensions is closer to engineering reality. At a minimum, cover these five categories:

    1. Skill packaging stage: Turn a fairly long system prompt into a publishable, reusable capability package. This tests structured extraction, directory conventions, dependency declaration, and self-checking ability, not verbatim copying.
    2. Web development stage: Go from requirements to a runnable page, testing component decomposition, state management, and accessibility.
    3. Content production stage: Slide decks and copy generation, testing layout consistency, information hierarchy, and adherence to style constraints.
    4. Knowledge base management stage: Document ingestion, chunking, retrieval, and updates, testing recall quality and idempotent writes.
    5. Browser automation stage: Long-chain operations and token consumption stress testing, testing step planning and failure recovery.

    An illustrative task instruction could be written as:

    1. Turn a local system prompt file into a publishable skill package:
    2. 1) Extract the role, constraints, and input/output contract;
    3. 2) Generate a standard directory structure and documentation;
    4. 3) Self-check and list scenarios that could fail.

    4. Key Finding 1: Engineering-Grade Packaging from Prompt to Skill Package

    The first stage looks simple, but it is the dividing line for agent maintainability. A proper package should include metadata, trigger conditions, input/output contracts, error handling, and examples. If the model only moves text around, the output will drift in real invocation because constraints are missing.

    The engineering recommendation is to split the prompt into three layers: the stable role and boundaries, configurable parameters, and replaceable examples. After packaging, a self-check is mandatory and should explicitly list the points that could go wrong, such as conflicting trigger conditions, unavailable external paths, or insufficient permissions. This habit of “self-check on output” can significantly reduce later maintenance costs.

    5. Key Finding 2: Context and Token Budget Decide Long-Chain Success

    Browser automation and knowledge base tasks are where token problems surface most easily. In a long chain, historical messages, tool returns, and intermediate results keep accumulating; without trimming, cost rises non-linearly. Workable strategies include:

    • Produce structured summaries of tool returns, keeping only the fields needed for decisions;
    • Submit tasks in segments and compress the context after each stage completes;
    • Set count and length limits on retrieval results;
    • Monitor token consumption per task and set baseline alerts.

    When a model consumes significantly more than the baseline on the same task, investigate context organization first rather than concluding that the model is weak.

    6. Key Finding 3: High-Risk Actions Must Require Explicit Confirmation

    Once an agent is connected to real tools, actions such as deletion, publishing, and payment become irreversible. If the evaluation shows “high-risk operations executed without asking,” the framework’s permission gate has failed, and this is a launch blocker. The recommendation is to introduce action tiers: read-only, reversible writes, and irreversible writes; force human confirmation or a second check for the latter two, and keep a complete audit log. No matter how strong the model is, it cannot replace permission boundaries.

    7. Selection Advice: Move from Leaderboard Thinking to a Scenario Matrix

    Overall, selection should be built as a scenario matrix: task types on the horizontal axis, and success rate, stability, token cost, and recovery ability on the vertical axis. For long-chain automation, prioritize stability and cost control; for content production, prioritize constraint adherence and style consistency; for skill packaging, prioritize structure and self-checking. Also keep a replaceable model abstraction layer to avoid being deeply coupled to a single capability.

    8. Conclusion

    Model selection in the agent era is essentially an engineering experiment. Build a baseline with controlled variables, cover real workloads with tiered tasks, and constrain risk with the two red lines of tokens and permissions. Only then can you find the capability foundation that truly fits your own agent framework. In related practice at Baidu AI Cloud, it is also advisable to build an observable evaluation loop using a general container platform, logging services, and monitoring alerts, so that selection conclusions can be reproduced continuously.