Large Language Model Selection and Scenario-Based Evaluation for AI Agents
As new model releases arrive almost weekly, developers often swap their default model without testing what actually matters for agents. This article reframes model selection around a fixed agent framework and a controlled evaluation design, then walks through a five-stage task suite covering skill packaging, web development, content generation, knowledge base governance, and browser automation. It also shows how to treat token cost as a first-class metric, how to avoid common failure modes, and how to build a repeatable evaluation pipeline with a tiered model strategy.
1. Why the “Best Model” Is Not the Best Agent Model
Model release cycles have accelerated noticeably, with new versions appearing almost every week. This constant churn pulls developers in different directions and often leads to a loop: swap in the new model as soon as it appears, use it for a few days, then move to the next one.
The problem is that most evaluations happen in a chat window. They measure single-turn fluency and breadth of knowledge, while the capabilities agents actually depend on—multi-step planning, reliable tool calls, adherence to local constraints, and cost control over long tasks—rarely surface in chat-style testing.
A common pattern illustrates the gap: a model that scores well on general conversation leaderboards may fail to recognize a locally registered Skill once it is connected to an agent framework, or may stop asking for confirmation before a high-risk action. In plain terms, the framework appears to “break.” This is not a matter of model intelligence; it is a misalignment in the contract between the model and the framework.
So the core selection question should be restated as: within a fixed agent framework, which model can reliably complete my real task chains at an acceptable cost?
2. Experimental Design: Controlled Variables Are the Basis of Trustworthy Evaluation
Conclusions only hold up with controlled variables. A reusable approach is to clone multiple identical agent instances: the same memory structure, the same Skill set, the same system prompt and constraints, and the same tool list and permission boundaries. The only variable is the underlying model.
Dimensions to fix or explicitly record include:
- Identical system prompts and role constraints;
- Identical Skill registration method, namespace, and trigger conditions;
- Identical tool sets and permission tiers, especially the confirmation policy for high-risk actions;
- Identical memory write and recall strategies, to avoid context differences contaminating results;
- A unified reasoning setting, with high reasoning enabled wherever possible and noted in the report.
Candidate selection also needs engineering rationale rather than emotional preference. For example, some models may excel at a single capability but carry high API costs and limited account quotas, making them unsuitable as the always-online main agent that cannot drop offline. They may be better suited to low-frequency use in interactive design scenarios. Such judgments are themselves part of the selection conclusion.
3. Five-Stage Task Design: Evaluation Close to Real Workflows
Mechanical “use case one, use case two” lists read like lab reports and are hard to reuse. A better approach organizes the evaluation into five stages, each mapped to a class of real engineering capability.
Stage 1: Skill Packaging
The model must turn a long system prompt document into a capability package that can be published online and installed by others, then self-check the output and point out potential failure points.
This stage tests three things: structured extraction (turning scattered rules into a list), engineering discipline (directory structure, metadata, version and dependency declarations), and self-review. If a model cannot reliably turn experience into a reusable asset, there is no need to test it on more complex tasks.
An illustrative Skill directory can look like this:
my-skill/├── skill.yaml # name, version, applicable scenarios, trigger conditions├── instructions.md # main constraints and step descriptions├── examples/ # positive and negative examples└── tests/ # self-check list and acceptance cases
Evaluation points: whether key constraints are missing, whether the prompt is simply copied rather than abstracted into a capability, and whether the self-check identifies real risks (such as permission overreach, unvalidated input, or missing rollback on failure).
Stage 2: Web Development
Given a product description, the model must generate a page with clear structure, adequate accessibility, good responsiveness, and the necessary state handling. The focus is code organization, semantic tags, separation of styling and logic, and error and empty-state handling—not visual flashiness.
Stage 3: Content Generation and Layout
The model must produce a presentation and accompanying copy, with constraints on information hierarchy, a cap on information density per slide, and terminology consistency. This tests the balance between generation and restraint: whether it piles on bullet points, keeps terminology consistent, and follows template constraints.
Stage 4: Knowledge Base Governance
Given a batch of mixed documents, the model must deduplicate, classify, chunk, complete metadata, and recommend a retrieval strategy. This stage most easily exposes forgetting and drift in long contexts, and shows whether the model proactively proposes indexing and update mechanisms.
Stage 5: Browser Automation and Cost Control
This is the most token-intensive stage, with long task chains, many page states, and frequent retries. Evaluation cannot look at success rate alone; it must also consider recovery strategy after failure, whether invalid operations are repeated, whether high-risk actions are confirmed, and the order of magnitude of resources consumed to complete the same task.
4. Cost Perspective: Treat Tokens as a First-Class Metric
The cost structure of agent scenarios differs completely from chat. Multi-turn tool calls, repeatedly carrying long contexts, and retries after failure can push actual consumption far above intuition. A practical way to account for it:
cost per task ≈ (input tokens × price_in + output tokens × price_out) × retry factorretry factor = actual number of turns / theoretical minimum turns
It is advisable to record three numbers for each stage: theoretical minimum turns, actual turns, and failed retries. Even without citing any vendor’s specific pricing rules, this allows a horizontal comparison of efficiency differences across models. In practice, some models may cost several times the baseline to complete the same task, and in long tasks this gap can grow to an unacceptable level.
Subscription plans may look predictable, but under heavy coding and automation workloads, quota consumption can far exceed expectations. Degradation strategies should be designed in advance: split long tasks into batches, offload non-critical steps to lighter models, and set budget thresholds and circuit breakers for high-consumption stages.
5. Common Failure Modes and How to Avoid Them
- Skill recognition failure: usually caused by incomplete registration metadata or vague trigger descriptions; write trigger conditions as decidable rules.
- High-risk actions without confirmation: enforce permission tiers at the framework level rather than relying on the model’s own judgment.
- Drift in long tasks: counter context forgetting with periodic self-checks and externalized state (written to files or external storage).
- Invalid retries: set a maximum number of turns and repeated-action detection, and roll back on timeout.
- Non-reproducible output: fix randomness parameters, fix the prompt version, and put prompts under version control.
6. Implementation Advice: Build a Sustainable Selection Mechanism
A one-off cross-evaluation has limited value; what is really needed is a repeatable evaluation pipeline. It is advisable to turn the five stages into scripts and acceptance cases, integrate them into continuous integration, and run them automatically whenever the model or framework changes, producing three reports: success rate, average turns, and cost per task. Combined with logging and monitoring alerts, thresholds can be set for abnormal turn counts and failure rates.
Architecturally, a tiered strategy of “main model + lightweight model + fallback model” can be adopted: the main model handles planning and complex reasoning, the lightweight model handles formatting and extraction, and the fallback model takes over when the budget circuit breaker trips, keeping long tasks online. If file and artifact management is involved, object storage can hold intermediate states, a message queue can decouple long tasks, and a container platform can host tool execution sandboxes.
The final conclusion is not mysterious: the model best suited to an agent is the one with the best combined stability and efficiency under your framework, your task distribution, and your budget constraints. It needs to be measured continuously, not decided by a leaderboard.
