How to Evaluate and Select LLM Agents: A Scenario-Based Testing Guide
Choosing a large language model for an AI agent is less about leaderboard scores and more about scenario fit, cost control, and risk management. This guide presents a vendor-neutral method: keep the agent framework, memory, skills, and toolset fixed, swap only the underlying model, and run five progressively harder tasks—skill packaging, page development, document and deck generation, knowledge base management, and browser automation. It also defines a metric set based on success rate, stability, token consumption, and controllability, plus common failure modes and practical cost and quota strategies.
1. The Real Challenge: Fit, Not Scores
Model releases have accelerated over the past six months, and the top twenty positions on public leaderboards reshuffle almost weekly. For developers, the problem is not a shortage of candidates. It is the gap between benchmark scores and real agent performance: a model that leads on general question answering may struggle to even read a local skill file reliably inside a framework that requires long chains of tool calls.
Cost makes the problem more concrete. Agent tasks are typically multi-turn, tool-driven, and memory-backed, so a single task can consume several times—sometimes more than ten times—the tokens of a normal chat. Deciding by price per token alone often leads to a cheaper unit price but a larger total bill.
This article therefore makes no product recommendations. Instead, it abstracts a general method: fix the agent framework, memory, skills, and toolset, replace only the underlying model, and use five progressive tasks to observe capability boundaries and the cost curve.
2. Experimental Design: Controlling Variables Is What Makes Results Trustworthy
A meaningful comparison requires changing one thing only: the model. A reusable control checklist:
- Same framework: one agent runtime, identical system prompts and tool descriptions.
- Same memory: identical conversation history and retrieval strategy.
- Same skills: identical skill directory structure and metadata.
- Same tools: identical file read/write, terminal execution, browser, and search tools.
- Same reasoning tier: enable a comparable higher tier on models that support a larger reasoning budget.
Note that a higher reasoning tier does not mean higher stability. Some models overthink at high tiers, splitting a simple action into multiple steps and amplifying both latency and consumption.
3. Five Test Levels: From Capability Checks to Stress Testing
Level 1: Skill Packaging
The model must turn a long system prompt into a publishable, installable capability package that works immediately after installation, then self-check for potential failure points.
What is assessed: structured extraction, directory and metadata conventions, completeness of dependency declarations, boundary condition documentation, and self-check awareness.
Common failures: copying the source text without abstraction; missing trigger condition descriptions, which leads to chaotic passive triggering; undeclared dependencies, which make the package unusable after installation.
Level 2: Page Development
Given a short requirement, the model must produce a runnable front-end page with layout, interaction, and basic accessibility.
What is assessed: requirement completion, component decomposition, styling and state management, and error handling.
Evaluation advice: use “starts successfully on the first run plus interactions form a complete loop” as a hard criterion, not visual preference.
Level 3: Document and Presentation Generation
The model must organize scattered information into a well-structured long document and a presentation deck, with clear hierarchy, appropriate point density, and consistent terminology.
What is assessed: long-context organization, information deduplication, conclusions up front, and format stability.
Level 4: Knowledge Base Management
This covers incremental writes, deduplication, conflict resolution, and retrieval recall.
What is assessed: idempotency, version awareness, and traceable citations. A practical test: can the model recognize duplicates on a second write without producing dirty data?
Level 5: Browser Automation (High-Consumption Stress Test)
This is the level most likely to spiral out of control: multiple steps, uncertain page states, and frequent retries.
What is assessed: state machine self-recovery, failure termination conditions, step limits, and auditable logs.
Engineering sketch:
def run_task(task, max_steps=25, budget_tokens=120000):for step in range(max_steps):if budget_tokens <= 0:return {"status": "budget_exceeded"}action = plan(task, step)result = tool_call(action)budget_tokens -= estimate_tokens(action, result)if result.done:return {"status": "ok", "steps": step + 1}return {"status": "step_limit"}
4. Metrics: Turning Intuition into Comparable Data
Record at least four categories of metrics:
- Success rate: whether the task is genuinely completed, not just apparently completed.
- Stability: variance across repeated runs of the same task.
- Consumption: tokens and call counts per task, not unit price.
- Controllability: whether step limits, budgets, and confirmation for high-risk actions are respected.
Whether the model asks before high-risk actions is the dividing line for agent usability. A model without a confirmation mechanism carries substantial risk in real business use.
5. Common Failure Modes and How to Avoid Them
- Framework mismatch: the model does not recognize local skills or tool descriptions and starts improvising.
- Runaway consumption: the same task consumes several times the baseline, so a budget circuit breaker is needed.
- Memory pollution: wrong conclusions are written into long-term memory, so write review is required.
- Overthinking: simple tasks are made complex, so set reasoning budgets per task tier.
6. Cost and Quota Strategy
Do not decide by unit price. Measure cost per effective task:
Cost per effective task = (input tokens × input price + output tokens × output price) / success rate
Also recommended: assign different model tiers to different tasks; set daily or monthly quotas for high-consumption tasks; compress cacheable context up front; and cap retries after failures.
7. Implementation Advice
- Start with a small-scale baseline, then gradually expand automation permissions.
- Make confirmation mechanisms, budget circuit breakers, and log auditing default platform capabilities.
- Re-run the comparison every quarter, since both models and frameworks evolve quickly.
- On cloud platforms such as Baidu AI Cloud, general capabilities like container platforms, log services, monitoring and alerting, and object storage can be combined to build an observable, rollback-capable foundation for running agents.
Conclusion: agent selection is essentially a three-way balance of framework fit, cost control, and manageable risk. Building your own evaluation set with controlled variables is more reliable than chasing any leaderboard.
