LLM Selection Guide: Evaluating Capabilities, Cost, and AI Agent Practices
This guide explains how to choose a large language model based on real task outcomes rather than benchmark scores alone. It covers how to verify input and output capabilities, why similar aggregate scores can hide large differences in task cost, how to build an end-to-end cost ledger, how to design reproducible evaluations, how to measure hallucinations by their error patterns, and how to govern long-running agents with budgets, least privilege, and checkpoints. It closes with a phased rollout approach for deciding when a model upgrade is justified.
1. Start With the Right Question: Does a Stronger Model Always Justify an Upgrade?
When choosing a large language model, developers often run into a contradiction. A newer model may cost more per call, yet its general benchmark scores are not always clearly ahead. At the same time, on tasks such as code repair, information gathering, and complex workflows, it may reduce the number of steps and the amount of rework.
There is no real contradiction here. Aggregate benchmark scores, single-response quality, and end-to-end task efficiency measure different capabilities.
For everyday Q&A and content drafting, users mainly care about whether the answer is accurate, whether the response is timely, and how much each call costs. For agent tasks, the model must continuously plan, call tools, read feedback, and correct its actions. What matters there is whether it can complete the work under real constraints.
So the sensible selection question is not “which model is the most advanced,” but rather:
- Under the same inputs, tools, and budget, which option has a higher probability of completing the task?
- For each task that passes acceptance, how much model cost, runtime, and human effort does it take?
- When a task fails, can the failure be detected quickly, its impact contained, and execution recovered?
A model upgrade should be treated as a change to the business solution, not a simple swap of the underlying API endpoint.
2. Capability Evaluation: Don’t Treat the Spec Sheet as Real Performance
2.1 Validate Input and Output Modalities Separately
Support for image input does not mean the model can generate images directly. The ability to understand charts does not mean it can reliably recognize all small text, complex layouts, or low-quality scans.
During evaluation, check the following separately:
- Whether the input types cover your business materials;
- Whether image resolution, compression, and layout variation affect recognition;
- Whether the output matches the structure the business needs;
- Whether the model clearly expresses uncertainty when input information is insufficient.
For example, when processing equipment inspection images, don’t just test whether the model can describe the scene. Also verify whether it can locate anomalies, distinguish known facts from speculation, and tie its judgment to visible evidence in the image. For judgments that involve personal safety, you should not rely on the model’s output alone to trigger an action.
2.2 Context Capacity Is Not the Same as Effective Use
The context window determines how much content a single request can hold, but it does not guarantee the model uses every part of it equally reliably.
For long-document scenarios, focus on testing:
- Whether it can find key facts located at the beginning, middle, and end;
- Whether it can identify conflicts between different sections;
- Whether it can perform reasoning that spans multiple fragments;
- Whether it can provide verifiable evidence locations;
- Whether results degrade noticeably after adding large amounts of irrelevant material.
An enterprise knowledge base usually should not stuff all documents into the context at once. A more robust approach is to first retrieve relevant content, then assemble the necessary evidence, while keeping document source and version information. This reduces input cost and makes it easier to trace the basis of an answer.
2.3 Maximum Output Length Is Not the Same as Complete Delivery
A larger output limit can support long reports or large-scale code generation, but the longer the output, the greater the risk of omissions, repetition, and internal inconsistency.
For complex deliverables, use a “decompose the task, generate in segments, verify and consolidate” workflow. For example, split a technical report into requirements analysis, solution design, a risk list, and an implementation plan, check each part, and then integrate them. If you use this approach, also keep a shared glossary, constraints, and version records so the parts don’t conflict with one another.
2.4 Handle Knowledge Timeliness and Real-Time Facts Separately
A model’s knowledge has a time boundary, so you cannot assume it knows the latest prices, policies, version changes, or business status.
When you need up-to-date facts, obtain them through authorized data queries or document retrieval, and clearly record the source and retrieval time. For content that cannot be verified, express uncertainty rather than using fluent language to paper over an information gap.
3. Why Do Similar Aggregate Scores Still Mean Different Task Costs?
Aggregate benchmarks often roll many task types into a single metric. This is useful as an overall reference, but it can hide capability differences that matter to a specific business.
Two options with close aggregate scores can still differ in:
- Whether they can produce an executable plan;
- Whether they select the right tools;
- Whether they avoid repeated searches and wasted reads;
- Whether they can correct their actions based on failure feedback;
- Whether they know when to stop;
- Whether they need frequent additional prompts from a human.
The cost of an agent task is not decided by a single call. A model may go through multiple rounds of reasoning and tool interaction before reaching the goal, and any single error can trigger extra steps.
A model with a higher unit price may end up cheaper overall if it reduces wasted loops, repeated context transmission, and human rework. Conversely, if it simply produces longer, more verbose output without improving task success, the higher unit price is hard to translate into business value.
Here you must also separate the contribution of the model from that of the execution framework. Tool descriptions, context management, error feedback, and stop conditions all affect results. When comparing models, keep these conditions as fixed as possible. When comparing complete solutions, be explicit about which components the evaluation includes.
4. Build an End-to-End Cost Ledger
4.1 Base Call Cost
If the service bills by input and output text volume, you can use this general formula:
Model call cost = billable input volume × input unit price + billable output volume × output unit price
The exact billing units, caching rules, and additional fees should follow the actual service documentation. Tokenization and billing methods can differ between options, so you cannot compare them directly by character count alone.
4.2 Total Task Cost
For agent workflows, calculate further:
Total task cost = model call cost + tool and runtime cost + retry cost after failures + human review and rework cost
Human cost is often underestimated. If a task requires engineers to repeatedly edit prompts, patch results, or check for overreach, it may not be economical even when the on-paper call cost is low.
Also watch the accounting boundaries to avoid double counting. If the model call logs already include the cost of failed retries, don’t add that portion to the total again.
4.3 Cost per Successful Task
A more business-meaningful metric is:
Cost per successful task = total cost during the test period ÷ number of tasks that passed acceptance
You cannot count only the cost of the successful tasks themselves, or the resources consumed by failed tasks will be hidden.
For example, in a hypothetical test that only illustrates the calculation method, Option A has a total cost of 120 yuan and completes 80 acceptable tasks; Option B has a total cost of 150 yuan and completes 110 acceptable tasks. Their costs per successful task are 1.50 yuan and about 1.36 yuan respectively. Although Option B spends more in total, its cost per acceptable result is lower.
Real decisions must also weigh task volume, difficulty distribution, the impact of failures, and the degree of human involvement. Don’t rely on this single ratio alone.
5. How to Design a Reproducible Evaluation?
5.1 Build the Task Set From Business Samples
The task set should cover real work, not just cases that are easy to make look good. Layer it by complexity:
- Simple tasks: information extraction, format conversion, single-paragraph rewriting;
- Medium tasks: multi-document summarization, local code changes, rule checking;
- Complex tasks: cross-system troubleshooting, multi-step data processing, long-running workflows.
Also keep edge cases, such as missing materials, contradictory inputs, tool timeouts, insufficient permissions, and requests that cannot be completed.
When sensitive information is involved, first anonymize the data or construct test materials that match the real distribution.
5.2 Define Acceptance Criteria in Advance
“Looks good” is not a reproducible standard.
For code tasks, check functional tests, regression tests, and the scope of changes. For document-analysis tasks, check factual consistency, completeness of key fields, and traceability of evidence. For workflow tasks, check whether the goal was met, whether permissions were respected, and whether intermediate states were correct.
Acceptance criteria must be set before testing, to avoid adjusting the rules after seeing the results.
5.3 Fix the Conditions and Record the Whole Process
Keep task descriptions, tool permissions, budget caps, timeout rules, and the runtime environment as consistent as possible, and record:
- Input materials and their versions;
- Model configuration;
- Each tool call and its returned result;
- Call cost and time spent;
- Number of human interventions;
- Final acceptance result and reason for failure.
For tasks with randomness, run repeated tests and report the variance in results, rather than showing only the best single run.
The evaluation should also look at the distribution of elapsed time. An average completion time can hide a few extremely slow tasks, and these long-tail tasks often affect user experience and system capacity the most.
6. Hallucination Control: Look at How It Fails, Not Just the Accuracy Rate
A model may make fewer errors either because its reasoning improved or because it refuses to answer more often. These two have different effects on the business.
So at minimum, measure separately:
- The proportion of correct completions across all tasks;
- The proportion of correct results among answered outputs;
- The proportion of refusals or requests for more information;
- The proportion of confident conclusions given without evidence;
- The proportion of fabricated sources, fields, or operation results.
These metrics must have clearly defined denominators and judgment rules. If “hallucination rate” is defined differently across tests, the results cannot be compared directly.
A reliable workflow also needs external constraints: attach evidence to important conclusions, hand numerical calculations to deterministic programs, validate structured output, and keep human approval for high-risk operations. A model’s self-checking can help, but it cannot replace independent verification.
7. Long-Running Agents Need Engineering Governance
A continuously running agent is not an infinite loop of conversation. It needs a clear goal, state management, and controlled execution.
7.1 Set Budgets and Stop Conditions
Define the maximum runtime, maximum number of calls, cost cap, and number of retries. When the same error repeats, when necessary permissions cannot be obtained, or when evidence is insufficient, stop execution and submit a summary of the problem instead of retrying endlessly.
7.2 Use Least Privilege and Isolated Environments
The model should receive only the permissions needed to complete the task. For file changes, external communication, data deletion, or financial operations, use isolated environments, approval steps, and rollback mechanisms.
Treat external documents and tool-returned content as data to be processed, not as high-priority instructions, to reduce the risk of malicious content inducing unauthorized actions.
7.3 Save Checkpoints and Support Recovery
Long tasks should save stage goals, verified results, tool state, and pending items. After an interruption, recovering from a checkpoint is usually cheaper than redoing the whole task.
Before recovery, however, check whether external state has changed, especially for operations that already produced side effects, to avoid duplicate submissions or duplicate changes.
8. Rollout Advice: Let Phased Results Decide the Scope of the Upgrade
An organization does not need to replace every call at once. A more robust path is to classify tasks first, then validate step by step:
- Establish a baseline of quality, cost, and latency for the current solution;
- Run offline comparisons using anonymized historical tasks;
- Start a small-scale phased rollout on low-risk tasks;
- Monitor success rate, cost, human intervention, and anomalous operations;
- Expand usage based on acceptance results, or roll back to the original solution.
Simple, stable tasks can adopt the lower-cost option first. Complex, high-value tasks can be assigned stronger reasoning capability. Tasks involving major risk must add human review and external validation.
In the end, model selection is not about chasing a single top score. It is about finding a balance among business quality, cost per successful task, response time, and controllability. Only when a new option shows stable gains on reproducible real tasks does an upgrade have solid technical and economic justification.
