Large Language Model Selection and Agent Engineering: A Practical Evaluation Guide
This article presents a controlled-variable methodology for selecting large language models for AI Agent applications. Instead of relying on benchmark scores or per-token pricing, it explains how to lock down the agent framework, memory, skills, and tools, then compare models across five capability levels: skill packaging, page generation, documents and presentations, knowledge base governance, and browser automation. It defines key metrics such as first-pass success rate, average steps, token amplification factor, high-risk action compliance, and recovery ability, helping teams build a repeatable evaluation pipeline for stable, long-running agents.
1. Background: The Agent Bottleneck Has Shifted from Answer Quality to Reliable Execution
Over the past two years, developers mainly evaluated a model by its question-answering quality. In an Agent architecture, however, the evaluation criteria have changed fundamentally. An Agent is not a one-off Q&A interaction; it is a closed loop of “perceive, plan, call tools, observe results, and re-plan.” This loop imposes three requirements on the model: stable instruction following, information retention in long contexts, and valid, repeatable tool-call parameters.
Many teams fall into two common traps during model selection. The first is looking only at benchmark scores. Benchmarks are typically single-turn, static, and tool-free evaluations, whereas an Agent runs for ten or more turns with side effects and cumulative failures. The correlation between the two is limited. The second trap is looking only at unit price. A model with a low unit price but high token consumption and high retry rates may have worse end-to-end costs, while a model with a higher unit price but a high first-pass rate may have a better total cost.
This article therefore advocates a “controlled variable” comparison method: fix the Agent framework, fix the memory and skill library, fix the system constraints, and fix the set of callable tools, then replace only the underlying inference model. Run the same batch of tasks multiple times and observe success rate, token consumption distribution, and types of abnormal behavior. Only this way can differences be attributed to the model itself rather than random fluctuations in the framework or prompts.
2. Design Principles for the Comparison: Separating Model Differences from Noise
2.1 Variable Control Checklist
Divide variables into three layers and lock them down layer by layer:
- Framework layer: keep the Agent main loop, maximum steps, timeout policy, and retry policy consistent.
- Capability layer: keep memory write and retrieval strategies, skill registration methods, tool descriptions, and parameter schemas consistent.
- Prompt layer: keep the system prompt, output format constraints, and self-check requirements word-for-word identical.
Only when all three layers are locked can the subsequent comparison be meaningful. The most common mistake in practice is “casually tweaking the prompt,” which makes results non-reproducible.
2.2 Task Tiering: A Five-Level Evaluation
Do not write a mechanical list like case1, case2. Instead, design “levels” by capability dimension, with each level focusing on one or two capabilities:
- Skill packaging level: turn a long prompt into a distributable, installable, self-checkable capability package.
- Page generation level: produce structurally complete static pages and styles from natural language requirements.
- Document and presentation level: generate structured outlines, formatted presentations, and accompanying copy.
- Knowledge base governance level: multi-document ingestion, chunking, retrieval, deduplication, and conflict handling.
- Automation level: long browser workflows, focusing on token efficiency and confirmation of high-risk actions.
2.3 Metric Definitions
- First-pass success rate: the proportion of tasks that meet acceptance criteria without human intervention.
- Average steps: the number of tool-call rounds required to complete a task.
- Token amplification factor: the token consumption of the same task relative to the baseline model.
- High-risk action compliance rate: the proportion of cases where the model proactively confirms delete, submit, or payment actions.
- Recovery ability: whether the model can self-correct after a tool error.
3. Level One: Packaging a Long Prompt into a Publishable Skill Package
This level looks like document organization, but it is actually about abstraction. The acceptance criterion is not “repeating the original text” but producing a capability package that others can install and use immediately. It should typically include: capability description, trigger conditions, input parameters, execution steps, output format, failure fallback, and a self-check list.
A practical directory example is as follows:
design-skill/├── SKILL.md # Name, description, trigger words, applicable scope├── prompts/ # Scenario-specific prompt snippets├── templates/ # Output templates└── checks.md # Self-check and common errors
There are three common model failure modes: first, only copy-pasting without parameters or trigger conditions; second, treating internal conventions as general knowledge, causing behavior drift after external installation; third, being perfunctory in the self-check section and only writing “no obvious issues.” During evaluation, focus on whether the model can proactively point out boundaries, such as a missing input file, missing template variables, or an output format that does not match the downstream parser.
4. Level Two and Level Three: Page Generation and Presentation Output
The page generation level tests “constraint following plus structural completeness.” Recommended acceptance items include: whether semantic tags are complete, whether responsive breakpoints are handled, whether styles are cohesive, whether there is meaningless placeholder content, and whether accessibility attributes are filled in. If the model proactively fills in empty states and error states, it has an engineering perspective rather than merely generating appearance.
The presentation and copy level tests “information density control.” Good output should have a clear hierarchy: conclusion first, one argument per slide, and charts with explanations rather than piled-up text. To evaluate, use the test “does removing any single slide affect the main thread” to judge whether the structure truly holds.
5. Level Four: Retrieval and Conflict Handling in Knowledge Base Governance
The focus of this level is not “can query” but “queries accurately and explainably.” Observe whether the model performs deduplication and version labeling before ingestion, whether it provides a basis for trade-offs when retrieval results conflict, and whether it returns cited snippets rather than vague summaries. In engineering terms, require the output to include source identifiers, confidence, and update time for later auditing.
6. Level Five: Browser Automation and Token Cost Attribution
Long workflows are the scenarios that most easily expose problems. Typical risks include: skill recognition failure causing the workflow to idle, loop retries amplifying token consumption, and lack of secondary confirmation for high-risk actions. During evaluation, record the input and output size of each step to locate whether token amplification comes from redundant page text, repeated screenshot returns, or ineffective retries.
For cost control, common practices include: tiered model scheduling (small models for simple steps, high-reasoning tiers for complex reasoning), context trimming and summarization, result caching, and step and timeout limits. Note that specific billing and quota rules should be based on the official documentation of the chosen cloud service and model service; this article does not cite any unconfirmed numbers.
7. Conclusion: Turning Selection into a Repeatable Engineering Process
Model selection should not be a one-time decision but a repeatable evaluation pipeline: fixed variables, tiered levels, quantitative metrics, and archived reviews. When the framework, memory, skills, and tools are all locked, differences between models become clear; combined with token attribution and high-risk action compliance, teams can choose a combination truly suitable for long-running, stable operation. For most teams, building this evaluation method first has more long-term value than chasing any single “strongest model.”
