LLM Selection and Scenario-Based Evaluation for AI Agents

    As AI agents move from answering questions to executing multi-step tasks, traditional benchmark rankings lose relevance. This guide presents a scenario-based evaluation methodology for selecting large language models in the agent era. Learn how to control variables, design layered tasks across five key capabilities, and measure both resource consumption and context stability to find the best fit for your framework.

    1. The Shift: Why Agentic AI Changes Model Selection from Answer Quality to Execution Capability

    In the past, evaluating a large language model usually meant checking its position on public leaderboards or testing it with a few reasoning and coding problems. Once a model is placed inside an AI agent framework, however, the evaluation criteria change fundamentally. The model no longer just answers questions; it operates in a continuous multi-turn loop where it must understand the goal, break down steps, call tools, read returned results, correct deviations, and continue until the task is genuinely complete.

    This shift has three direct consequences.

    First, the quality of a single response is no longer decisive; consistency across multiple turns is what matters. A model may perform well in turn 1, but if it starts forgetting the initial constraints by turn 8 or loses a critical file path in a long context, the overall task still fails.

    Second, the discipline of tool calling becomes more important than eloquence. Whether an agent can correctly identify locally available skills, fill in valid paths as parameters, and pause to ask before a high-risk action is a matter of “framework coordination,” not pure model intelligence.

    Third, the cost structure changes from “pay per call” to “pay per task.” For the same task, one model may converge in 3 turns while another needs 12 turns of trial and error. Even with a lower unit price, the total cost can be higher. How fast a model “burns through quota” is therefore a metric that needs to be quantified.

    Recently, several vendors have released new-generation models in quick succession, and top leaderboard positions change frequently. Many developers only try one or two of them in conversational scenarios before locking in a selection decision. This is precisely the main source of selection bias: conversational scenarios cannot expose the stability issues that appear in agentic scenarios.

    2. Methodology: Running a Credible Comparison on a Limited Budget

    2.1 Controlling Variables Is the Only Prerequisite

    For evaluation results to hold, you must “change only the model and keep everything else fixed.” Actionable fixed items include:

    • The same agent framework version and the same system prompt;
    • The same memory mechanism and memory content, so no model gains an advantage from more complete memory;
    • The same set of available skills, with identical skill descriptions and trigger conditions;
    • The same list of callable tools, permission scope, and timeout settings;
    • The same input materials, expected output format, and acceptance criteria for tasks.

    A representative evaluation configuration can be abstracted as:

    1. agent:
    2. framework_version: fixed
    3. system_prompt: fixed
    4. memory: {type: shared, content: fixed}
    5. skills: [skill_pack, page_builder, doc_writer, kb_manager, browser_op]
    6. tools:
    7. - {name: file_read, timeout: 10s}
    8. - {name: file_write, timeout: 10s}
    9. - {name: http_get, timeout: 20s}
    10. loop:
    11. max_turns: 30
    12. ask_before_high_risk: true
    13. model_candidates: [candidate_a, candidate_b, candidate_c, candidate_d]
    14. reasoning_effort: high # enable high reasoning whenever available

    2.2 Layer Tasks Instead of Listing Test Cases

    Writing an evaluation as a list of case1, case2, case3 is tedious to read and easy to miss key capability dimensions. A better approach is to design tasks as a series of “levels,” where each level maps to a capability that recurs in real work, with increasing difficulty and dependencies between levels.

    This article uses a five-level design: skill packaging, page development, document and presentation generation, knowledge base management, and browser automation. The final level is intentionally designed to be time-consuming and resource-intensive, to observe how models behave under budget pressure.

    2.3 Make Cost Observable

    During evaluation, record three types of data: the number of turns per level, the consumption of input and output tokens, and whether the task passes on the first attempt. Only by putting “effectiveness” and “consumption” in the same table can you draw transferable conclusions rather than impressionistic preferences.

    3. Five-Level Task Design and Observation Focus

    Level 1: Package a Prompt into a Publishable Skill

    This level requires the model to read a local text file, organize the design prompts within it into an install-and-use capability package for others, and perform a self-check after output, pointing out where the skill might fail.

    There are three observation points: first, whether file location is accurate—path information must not be rewritten or fabricated; second, whether the output structure is complete, typically including a skill description, trigger conditions, input/output conventions, examples, and known limitations; third, whether the self-check is honest, identifying boundary conditions and failure modes rather than listing strengths.

    This level is the foundation for all subsequent levels. If a model cannot even stably “turn experience into reusable capability,” there is no need to test the more complex tasks that follow.

    Level 2: Page Development

    Given a product introduction and a structural sketch, the model must produce directly runnable page code with responsive layout, basic interactions, and accessibility support.

    The focus is on whether it confirms constraints before starting; whether the generated code is clearly structured and consistently named; whether it proactively handles accessibility details such as keyboard reachability, semantic tags, and contrast; and whether it maintains design consistency across multiple rounds of revisions instead of starting over each time.

    Level 3: Document and Presentation Generation

    The model must compress a longer technical document into a structured presentation outline and script, controlling page count and information density while preserving key data and conclusions.

    The focus is on information selection: whether it can distinguish the main thread from side details, rewrite long sentences into speakable short ones, and maintain logical closure within a limited length. This level places high demands on Chinese expression accuracy and can also reveal whether a model tends to pile up clichés.

    Level 4: Knowledge Base Management

    Given a batch of messy documents, the model must complete deduplication, classification, index and tagging system creation, and output rules for subsequent incremental updates.

    The focus is on engineering rigor: whether it considers naming conflicts, whether it provides a rollback plan, and whether it runs small-sample validation before bulk writes. The value of knowledge base tasks lies not in getting it right once, but in whether the rules can be maintained long term.

    Level 5: Browser Automation

    The model must complete a multi-step web operation task involving pagination, filtering, information extraction, and result aggregation. This level takes the longest, consumes the most, and is the most likely to trigger failures.

    The focus is on failure recovery: when facing timeouts, missing elements, or page structure changes, does the model retry the same action or change strategy; and before high-risk actions such as submission, deletion, or payment, does it stop and ask a human for confirmation as agreed.

    4. Evaluation Metrics: Turning Subjective Feelings into Comparable Dimensions

    Score the following six dimensions, recorded independently for each level:

    1. Task completion: whether the output meets acceptance criteria and can be put into use directly.
    2. Context stability: whether constraints, paths, and naming stay consistent during long tasks.
    3. Tool-calling discipline: whether parameters are valid and whether the model reads real return values instead of assuming results.
    4. Instruction following and risk awareness: whether high-risk actions are confirmed first and whether permission boundaries are respected.
    5. Resource consumption: turns and token consumption, and whether there is meaningless repeated trial and error.
    6. Maintainability: whether the output is structured, clearly commented, and easy for others to take over.

    Items 2 and 5 are the most easily overlooked, yet they are directly related to whether an agent can run online reliably over the long term.

    5. Common Pitfalls and Engineering Recommendations

    Pitfall 1: Looking only at leaderboard rankings. Leaderboards measure single-turn capability, which has limited correlation with multi-turn execution.

    Pitfall 2: Replacing scenario testing with conversational experience. Fluent performance in conversation does not mean stability in a tool loop.

    Pitfall 3: Comparing only unit prices. Compare the “total cost of completing the same task,” including failed retries.

    Pitfall 4: Ignoring permissions and security. Once an agent can write files and send requests, a high-risk action confirmation mechanism must be designed upfront, not patched afterward.

    At the engineering level, the recommendation is to script the evaluation, fix the configuration, automatically record consumption, and unify acceptance criteria; to consolidate conclusions into an internal selection matrix with recommendations by task type; and to keep a human review step, especially in scenarios involving external write operations.

    6. Conclusion

    Agent frameworks amplify a model’s capabilities, and they also amplify its flaws. The key to selection is no longer “which model is smartest,” but “which model is the most stable, most economical, and most rule-abiding within this framework.” By running layered evaluations with controlled variables and quantifying both cost and stability, you can find the model that truly matches your agent within a limited budget. When putting this into practice, connecting the evaluation workflow with online operational data through general capabilities such as the container platform, log service, and monitoring and alerting offered by Baidu AI Cloud makes it easier to continuously recalibrate selection conclusions.