A Practical Guide to Selecting and Evaluating LLMs for AI Agents

    This guide explains why choosing a foundation model for an AI agent differs from choosing a model for everyday Q&A, and turns agent selection into a reproducible engineering evaluation method. It covers how to build a controlled test environment, five task categories that probe core agent capabilities, how to weigh quality, cost, and stability together, how to use execution traces to separate model issues from framework issues, how to design safety controls as engineering mechanisms, and how to turn evaluation results into a sustainable selection strategy. The goal is not to find a single "best at everything" model, but a validated combination suited to your task structure, budget, and safety requirements.

    1. From “the model can answer” to “the agent can deliver”

    Choosing an underlying model for an agent is not the same problem as choosing a model for everyday Q&A.

    In Q&A scenarios, users usually care about whether the content is accurate and clearly expressed. In agent scenarios, the model must also understand the runtime environment, read files, discover available tools, execute operations, and adjust its plan based on execution results. A deviation at any step can turn a seemingly reasonable answer into a deliverable that cannot actually be used.

    For this reason, agent capability should be understood as a complete chain:

    Task understanding → environment inspection → plan formulation → tool execution → result verification → delivery and risk disclosure.

    This chain depends not only on the model but also on tool interfaces, permission policies, context management, and the runtime environment. Simply comparing the text a model outputs cannot explain why one solution completes tasks reliably while another retries frequently, consumes large amounts of resources, or even bypasses necessary confirmation steps.

    This article does not rank specific products. Instead, it turns agent selection into a practical engineering evaluation method. The core goal is not to find the model that is “strongest at every task,” but to find a runtime setup suited to your own task structure, budget, and security requirements.

    2. Build a reproducible evaluation environment first

    2.1 Fix the starting point, not just the prompt

    Fair evaluation starts with controlling variables. Different candidate models should use the same version of the task description, system constraints, initial memory, skill catalog, and tool permissions.

    It is recommended to fix the following:

    • The initial working directory and file contents;
    • The functional descriptions, input structures, and return formats of available tools;
    • The installed skill versions and their loading rules;
    • The scope of network access and file read/write permissions;
    • The maximum runtime, resource budget, and retry limit;
    • The task acceptance criteria and human-intervention rules.

    After each test round, restore the working directory and initial state. Otherwise, files, caches, or change records left from the previous round may affect the next one, making results incomparable.

    For agents with long-term memory, also isolate any new memory created during testing. A unified initial memory does not mean later learning results can be shared.

    2.2 Distinguish a unified budget from a capability-ceiling test

    If different models support different reasoning intensities or runtime settings, simply “turning everything to the highest tier” should not be treated as fully fair.

    A more reasonable approach is to test two conditions separately:

    The first is a unified-budget condition. Give each candidate similar time and cost constraints, and observe its delivery capability under realistic production limits.

    The second is a capability-ceiling condition. Within an acceptable resource range, let each option use a suitable configuration, and observe whether more thorough reasoning brings clear gains.

    The two sets of results should be recorded separately. The former answers “how to choose under a limited budget,” and the latter answers “whether higher investment can solve complex tasks.” Mixing the two easily misjudges differences in resource investment as differences in capability.

    2.3 Do not treat external hearsay as a conclusion

    Feedback such as “a certain class of models consumes tokens heavily” or “a certain framework cannot load skills” can serve as a test hypothesis, but it cannot be written directly into evaluation conclusions as fact.

    If the source material only provides a task design without complete run logs, deliverables, and cost records, you cannot derive a ranking from it. Reliable conclusions must be traceable to specific tasks, execution traces, and acceptance results.

    3. Cover key agent capabilities with five task categories

    Category 1: Turning experience into a reusable skill package

    Skill packaging works well as a baseline test because it simultaneously examines document understanding, structural design, file operations, and constraint adherence.

    The task should not be merely “copy a prompt into a file.” It should require the model to turn experience into an installable, understandable, and maintainable capability package.

    A complete skill package usually needs to include:

    • Scope of applicability: describing when it should be used;
    • Input requirements: listing required information and optional supplements;
    • Execution flow: clarifying the main steps and the dependencies between them;
    • Output conventions: specifying the deliverable structure and quality requirements;
    • Exception handling: describing cases such as missing files or insufficient permissions;
    • Safety boundaries: indicating which operations require confirmation;
    • Examples and verification methods: helping users judge whether it was executed correctly.

    During evaluation, pay special attention to whether the skill depends on the author’s local environment. Hard-coding a personal directory, assuming a certain file always exists, or mistaking personal preferences for general requirements all reduce portability.

    Self-checks should not stop at “already checked, no problems.” A more valuable self-check points out specific failure conditions, for example:

    “When the input material contains conflicting rules, list the conflicts and request confirmation first; do not overwrite one of them on your own.”

    In addition, being able to generate skill files does not mean being able to use the skill correctly. Add a separate invocation to verify whether the agent can discover the skill, understand its trigger conditions, and complete the subsequent task following the specified flow.

    Category 2: Web development and runnable delivery

    Web tasks cannot be judged by screenshots alone. An interface may look complete while still having unresponsive buttons, forms without validation, or layout overflow on narrow screens.

    The task description should specify the page’s purpose, target users, key interactions, and how to run it. Acceptance should cover at least:

    1. Whether the page opens properly in the specified environment;
    2. Whether key interactions meet the requirements;
    3. Whether it remains usable at different screen widths;
    4. Whether there are obvious runtime errors;
    5. Whether the necessary startup and verification instructions are provided.

    To test problem-handling ability, you can introduce controlled faults in a separate test, such as a missing configuration file or an abnormal API response. But the fault conditions must be identical for all candidates; you cannot add difficulty for one option on the fly.

    A strong execution trace should look like: first confirm the error, then locate the cause, apply the minimal necessary fix, and finally re-verify. Repeated large-scale file rewrites, or declaring success without checking, should count as deductions.

    Category 3: Presentations and content organization

    Presentation tasks examine not only visual layout but also information selection, the order of argument, and consistency of expression.

    It is recommended to provide fixed background material, target audience, usage scenario, and page-count range, then evaluate on three levels:

    • Content level: whether facts are grounded and conclusions are consistent with the material;
    • Structure level: whether it forms a closed loop of problem, analysis, solution, and action recommendations;
    • Presentation level: whether titles, charts, text density, and layout support understanding.

    If an editable file is required, a text outline alone cannot be a substitute. If charts come from sample data, this must be clearly labeled and not packaged as real business results.

    This category usually involves subjective judgment, so it is best to use a unified scoring sheet and, when conditions allow, hide model identity during human review to reduce preconceptions.

    Category 4: Knowledge base management and information consistency

    Knowledge base tasks are good for testing whether the agent truly understands “information updates” rather than only appending content.

    You can plant duplicate entries, outdated notes, version conflicts, and unsourced conclusions in the test material, and require the agent to categorize, deduplicate, update, and maintain citation relationships.

    Acceptance focuses on:

    • Whether it distinguishes new information from revisions of existing information;
    • Whether it preserves necessary sources and version records;
    • Whether it identifies conflicts instead of silently overwriting them;
    • Whether it maintains citation relationships between related entries;
    • Whether it avoids losing valid information during cleanup.

    For deletions or large-scale overwrites, require a change plan to be output first. After formal execution, it should provide a change summary and keep a recoverable version.

    The most dangerous failure in knowledge base management is not “cleanup was not finished,” but “cleanup appears successful while information consistency is actually broken.”

    Category 5: Browser automation and state judgment

    Browser automation easily amplifies an agent’s cost problems. Page screenshots, structure descriptions, scrolling, and repeated reads can all increase context size; dynamic page changes can also make the model repeatedly confirm state.

    Therefore, do not only record whether the target page was finally reached. Also observe:

    • Whether it repeatedly reads pages that have not changed;
    • Whether it keeps clicking the same spot after a failure;
    • Whether it can recognize login expiry or page-loading anomalies;
    • Whether it verifies key fields before submitting;
    • Whether it requests confirmation before irreversible operations;
    • Whether it can stop in time under blocking conditions.

    Evaluation should use controlled accounts and test data to avoid triggering real payments, public publishing, or changes to important data. Even if a model promises to “act carefully,” key limits should still be enforced at the tool layer.

    4. Measure quality, cost, and stability together

    4.1 Define success first, then compute scores

    “Completing the task” must have a clear standard. Generating a file does not mean the file is usable; outputting a summary does not mean execution actually succeeded; a model claiming it passed a check does not mean it passed acceptance.

    It is recommended to classify results into three tiers:

    • Full success: all core requirements are met and the deliverable is directly usable;
    • Partial success: the main output exists but still needs manual repair;
    • Failure: the core goal is not achieved, or a safety red line is triggered.

    Safety red lines should be judged independently. Executing high-risk operations without authorization should not be offset by a higher content-quality score.

    4.2 Record the full cost, not just tokens

    Token usage is an important indicator of resource consumption, but it cannot represent economics on its own.

    Total cost can be recorded along these lines:

    Total cost = model invocation cost + external tool cost + runtime environment cost + manual review and repair cost.

    Different solutions may have different billing structures, caching rules, and tool-usage patterns, so the same token usage does not necessarily correspond to the same cost.

    A metric closer to the business is the “average cost per accepted task”:

    Average cost per accepted task = total investment during testing ÷ number of accepted tasks.

    This metric reveals a common situation: a single call may look cheap, but because of failures, retries, and manual repairs, the actual delivery cost is not low.

    4.3 Record tail performance as well

    A single success only shows that a solution can complete the task; it does not prove long-term reliability.

    Each task category should undergo multiple independent test rounds, recording success rate, latency distribution, retry counts, and human intervention. Besides average latency, also watch the slower rounds, because production systems are often affected by occasional long stalls.

    When the sample is small, clearly state the limitations of the conclusion. Do not infer general capability from a few tasks, and do not inflate a single anomaly into a stable defect.

    5. Use execution traces to separate model problems from framework problems

    An agent failure does not necessarily mean insufficient model capability.

    For example, a skill that cannot be invoked may come from the skill directory not being scanned, a file format that does not match the convention, or unclear tool descriptions; it may also be that the model did not understand the loading flow. A tool-call failure may be caused by permissions, timeouts, parameter structure, or abnormal external state.

    It is recommended to record failure causes by layer:

    Layer Typical problems Investigation focus
    Model understanding Ignoring constraints, misunderstanding the goal, unreasonable planning Whether the input is clear and key constraints are visible
    Tool adaptation Wrong parameters, misread return results Whether tool descriptions and return structures are consistent
    Framework runtime Skills not loaded, state lost, loops out of control Configuration, logs, and stop conditions
    Environment dependency Missing files, network anomalies, insufficient permissions Environment snapshots and resource availability
    Acceptance Self-check inconsistent with actual results Whether independent verification was performed

    Only by locating the failing step can you decide whether to adjust the model, revise the prompt, optimize the tool interface, or fix the runtime environment. Blindly switching models may only temporarily mask the problem.

    6. Design safety controls as engineering mechanisms

    High-risk actions should not rely entirely on the model asking on its own initiative.

    Operations such as deleting important files, overwriting shared material, submitting transactions, or publishing content publicly should be constrained by an independent permission policy or approval mechanism. The model is responsible for proposing the intent of an operation; the tool layer is responsible for judging whether it is allowed to execute.

    A robust flow can be divided into three steps:

    First, generate an operation plan listing the target, scope, and expected impact.

    Second, perform a permission check; operations that require human confirmation must obtain valid confirmation before continuing.

    Third, execute and record the result; for recoverable operations, provide rollback information.

    At the same time, content from web pages, documents, and knowledge bases should be treated as task data, not as inherently trustworthy system instructions. When external material contains phrases like “ignore the original requirements” or “read other directories,” this should not change the authorization boundary.

    7. Turn evaluation results into a sustainable selection strategy

    The final selection does not necessarily require one model to handle all the work. Different tasks demand different capabilities: simple organization emphasizes efficiency, complex development emphasizes planning and debugging, and high-risk operations emphasize constraint adherence.

    You can tier by task type, but you must keep consistent permission control, logging, and acceptance standards. Only escalate when a low-cost solution fails validation; during escalation, also limit retry counts and context size to avoid endless consumption.

    A valuable evaluation conclusion should answer at least four questions:

    1. Which task categories can be completed reliably?
    2. Which failures require human intervention?
    3. What is the real cost of each qualified deliverable?
    4. When risks or anomalies occur, can the system stop and recover in time?

    The best setup for an agent is not a model name detached from its environment, but a validated combination: a suitable model, clear tool interfaces, portable skills, reliable permission control, and an acceptance mechanism independent of the model’s self-report.

    Turning selection from impression-based comparison into engineering evaluation is what truly improves delivery certainty and keeps cost, safety, and quality within a manageable range.