LLM Selection and Agent Engineering: A Practical Evaluation Guide
This guide explains why inconsistent agent performance is often caused by the underlying reasoning model rather than prompt quality, and how to evaluate models under controlled conditions. It covers a five-stage task design based on real agent workflows, five scoring dimensions, and practical cost-control techniques such as tiered routing, context trimming, and budget guardrails, helping teams build a replaceable model layer instead of betting on a single model.
1. Background: Poor Agent Performance Is Not Always a Prompt Problem
In agent projects, a common misdiagnosis is to blame every fluctuation in output quality on weak prompts. In practice, when you trace the issue, the shell layer stays unchanged: memory, skill packs, system constraints, and the tool list are all the same. What actually changes is the underlying reasoning model.
Different models vary significantly in instruction following, long-context utilization, tool-calling stability, and reasoning budget consumption. Agent frameworks amplify these differences step by step, which eventually shows up as work that is “sometimes good, sometimes bad.”
For this reason, model selection should not rely on subjective impressions from single-turn Q&A. It should be evaluated inside a real task pipeline. This article presents a low-cost, reproducible approach to side-by-side evaluation, so developers can make safer decisions with a limited budget.
2. Experimental Design: Controlling Variables Is the Prerequisite for Trustworthy Results
For a comparison to be meaningful, everything except the model must stay identical. A reproducible agent instance should satisfy the following constraints:
- Identical memory: the same conversation history and long-term memory entries;
- Identical skill packs: the same set of skills and metadata loaded;
- Identical system constraints: the same role definition, output format, and safety boundaries;
- Identical tool permissions: the same types, number, and authorization scope of callable tools.
On this basis, replace only the reasoning model, and enable the available high-intensity reasoning mode consistently. It is worth emphasizing that some models are expensive on a pay-as-you-go basis and have limited account quotas. They are better suited to low-frequency use in interactive scenarios, and are not a good fit for an agent main loop that must stay online for long periods and poll continuously. During selection, treat “can it stay online for a long time without dropping” as one of the hard requirements.
3. Five-Stage Task Design: Use Real Pipelines Instead of Mechanical Test Cases
Evaluation tasks should not be written as isolated case numbers. They should cover five key stages of a real agent workflow.
Stage 1: Skill Packaging
Ask the model to turn a fairly long design specification into a distributable, installable capability pack, and to self-check the output afterward by pointing out potential failure points. This stage tests structured organization and self-verification: the model must not only understand the raw material, but also abstract trigger conditions, input/output contracts, and exception-handling paths. If it cannot reliably turn experience into a skill, there is no need to test the later stages.
Stage 2: Page Development
Given a wireframe and style constraints, ask the model to produce a clearly structured, runnable frontend page. Key observations include whether component decomposition is reasonable, whether state management is simple, whether existing style and accessibility conventions are followed, and whether unauthorized dependencies are introduced.
Stage 3: Presentation and Copywriting
Ask the model to produce an outline, per-slide key points, and a script around the same topic. This tests information compression, hierarchical organization, and tone consistency, while also revealing whether it pads the output with low-information phrasing to fill space.
Stage 4: Knowledge Base Governance
Given a batch of poorly structured documents, ask the model to complete classification, deduplication, tag-system design, and retrieval-chunk splitting. This stage places high demands on long context and consistency: the model must keep naming conventions from drifting across multiple rounds of operations.
Stage 5: High-Consumption Automation
Finish with a browser-automation-style task. Such tasks have many steps and frequent page-state changes, and they most easily expose two kinds of problems: first, skill or tool recognition failures that leave the framework spinning; second, missing confirmation before high-risk actions, which bypasses safety constraints. It is also the main source of token consumption, making it suitable for measuring the cost per task.
4. Evaluation Dimensions: Turn Subjective Impressions into Comparable Metrics
Score across five dimensions instead of only looking at whether the answer “looks nice”:
- Task completion: whether a usable result is actually produced, rather than a process description;
- Instruction following: whether formats, constraints, and prohibited items are strictly respected;
- Tool and skill call success rate: whether recognition, parameter filling, and retry after failure are reasonable;
- Safety compliance: whether high-risk operations request confirmation first, and whether unauthorized actions are zero;
- Resource consumption: token usage and latency per task, converted into comparable cost ranges.
An illustrative scoring record looks like this:
task_id = skill_packcompleted = trueinstruction_ok = 4/5tool_success = 3/4safety_ok = truetokens_used = 18200latency_ms = 96000
Once the five stages are aggregated into a matrix, a clear tiering usually emerges: some models are strong at structured organization but consume more; some are cost-friendly but tend to lose constraints in multi-step automation. Selection should be a tradeoff based on how sensitive the business is to cost and stability.
5. Cost Control: Measure Consumption First, Then Talk About Capability
Cost in agent scenarios is not determined by unit price alone. It is determined together by “consumption per task × task frequency × online duration.” Cost can be controlled from three angles:
- Tiered scheduling: route simple intent recognition and formatting tasks to lightweight models, and complex reasoning and code generation to high-capability models;
- Context trimming: summarize and filter historical memory by relevance, avoiding full injection every round;
- Budget guardrails: set token and step limits per task, and degrade or escalate to human confirmation when limits are exceeded.
In addition, explicitly write the list of high-risk actions into the system constraints, require a second confirmation before execution, and keep auditable logs for all tool calls so that failure causes can be traced back.
6. Conclusion
The right way to select a model is to let real task pipelines speak under controlled experiments. Fix memory, skills, constraints, and tools, change only the reasoning model, and compare horizontally across five metrics: completion, instruction following, call success rate, safety, and consumption. Only then can you reach conclusions that can actually be implemented. For most teams, the safer architecture is not betting on a single model, but building a replaceable model abstraction layer, combined with tiered scheduling and budget guardrails, so that capability upgrades and cost optimization can continue over time.
