LLM Selection in Practice: Beyond Specs to Repeatable Agent Evaluations
Choose large language models based on real task performance, not naming conventions or headline specifications. This guide covers specification checks, a four-step selection process, repeatable agent tests, and cost calculations that account for retries, reasoning tokens, and manual rework.
Specifications Are Only the Starting Point
Model suffixes such as Max, Flash, and Pro do not reliably indicate capability limits. The same suffix may represent different product tiers across versions. Start with the specific parameters in the official documentation rather than drawing conclusions from a model’s name.
One common source of confusion is the difference between the output budget and the length of the final answer. When reasoning mode is enabled, tokens used for chain-of-thought reasoning also count toward the generation allowance. A model with a 100K-token output limit may spend much of that budget on reasoning, leaving substantially less room for the visible answer.
Also check whether input and output share a context window. With a shared window, longer inputs leave less space for generation. For example, an input that already occupies 900,000 tokens may leave insufficient room for a 500,000-token report. Treat a shared window as a single resource pool and plan the allocation between input and output in advance.
Specification Checklist: Verify the Documentation First
Model specifications change frequently, so this article does not list model-specific figures. Before evaluating candidates, check each model’s official documentation and record the lookup date and documentation link.
| Field | What it means | How to verify |
|---|---|---|
| Input modalities | Supported input types, such as text, images, and video | Check the model capabilities page |
| Context window | Total capacity available for input and output | Check the window definition and record how tokens are counted |
| Maximum input | Input limit for a single request | Check the relevant limits in the documentation |
| Maximum output | Generation limit per request, including whether reasoning tokens count in reasoning mode | Review output parameter documentation and run a boundary test |
| Shared window | Whether input consumes capacity otherwise available for output | Test a request near the limit and check the remaining generation capacity |
| Documentation version and date | Specifications may change | Record the version, publication date, and link |
Providers may also define “K” and “M” differently. For example, 1K may mean 1,000 or 1,024. Confirm the convention before converting or comparing figures.
A Four-Step Model Selection Process
Step 1: Filter by Input Type
First, identify the input formats your task requires. For video tasks, verify whether each candidate supports native video input. If not, you will need to extract frames or split the video into segments beforehand, adding pipeline complexity and potential failure points.
For text-only or text-and-image tasks—including document parsing, structured OCR extraction, and chart question answering—filter for the modalities you actually need. There is usually no reason to prioritize the model with the broadest multimodal capabilities.
Step 2: Define Acceptance Criteria and Output Budgets
Write down acceptance criteria before starting the evaluation. Common metrics include:
- JSON Schema validation pass rate for structured output
- First-attempt compilation pass rate for generated code
- Factual consistency of long-document summaries, assessed through manual spot checks or automated metrics
Also estimate the maximum token requirement for each task. Add the expected final-answer tokens to the estimated reasoning tokens, then leave some headroom.
Short question-answering tasks and long reports have very different requirements. Budget for them separately rather than applying one token allowance to every task.
Step 3: Establish a Low-Cost Baseline
Start with the least expensive candidate that supports the required input modalities, and run it on real tasks.
This baseline shows what a lower-cost model can accomplish. Introduce a more expensive model or enable reasoning mode only if the baseline success rate falls short of your requirements. This avoids paying for capabilities the task does not need.
Step 4: Retest on the Same Tasks and Calculate Costs
This is the core of model selection. Test every candidate on the same set of real samples to make comparisons fair.
A practical starting point is 20–50 samples, including edge cases such as blank fields, unusually long documents, and ambiguous wording. Run each model at least three times to observe variability. Repeat the evaluation after each model version update or on a monthly schedule.
Record task success rate, JSON validation pass rate, compilation pass rate, average retry count, and cost per task. Use consistent definitions and measurement methods across models; otherwise, the comparison will not be meaningful.
Evaluating Models for Agent Workflows
For agent tasks, the critical measures are success across multiple tool calls and final task completion. A large context window alone does not demonstrate that a model can reliably complete an agent workflow.
Use the following three tests as a minimum evaluation set:
| Test | Procedure | Passing criterion | Suggested sample count |
|---|---|---|---|
| Multi-turn state retention | Design a sequence of at least five tool-call turns and introduce a constraint in turn two | The model still follows the constraint in turn five without losing critical state | 20 runs per model |
| Parameter correction | Have a tool return an error indicating malformed JSON in the submitted arguments | The model corrects the arguments and completes the tool call within two turns | 20 runs per model |
| Long-context retrieval | Place key facts at the beginning, middle, and end of documents close to the context-window limit | Measure the proportion of facts retrieved correctly, reported separately by position | 10 runs per position |
Record pass rates for each test rather than relying on a single successful run.
A Framework for Calculating Costs
Comparing token prices alone leaves out important expenses. Use consistent measurement rules for each cost category.
| Cost category | Main consideration | Measurement method |
|---|---|---|
| Input token cost | Bulk processing of long documents | Sum input tokens across all requests over one week and multiply by the model’s input rate |
| Output token cost | Reasoning and final-answer generation | Read the API usage fields and track reasoning tokens separately from final-answer tokens |
| Retry cost | Additional calls after an initial failure | Calculate failure rate as failed calls divided by total calls. Retries are generally billed again, so account for the full request |
| Human intervention cost | Rework caused by unacceptable output | Multiply rework hours by the hourly labor rate and factor in task completion rate |
If the provider supports context caching, repeated long-document inputs may qualify for lower pricing. Verify this separately rather than assuming every repeated input is billed at the full rate.
Worked Example: Batch Processing of Documents with Charts
Suppose you need to process 100,000 technical documents with charts each week, with an average input of 6,000 tokens per document. The success rates below are hypothetical and do not represent any actual model.
- Model A has a 90% first-attempt success rate for structured extraction, producing 90 valid results per 100 document calls.
- Model B has a 70% success rate. To obtain the same number of valid results, it requires approximately 128.6 calls—28.6 more calls than Model A. The calculation is:
100 × (0.9 / 0.7 − 1) ≈ 28.6.
If retries are billed as full requests, Model B uses approximately 128.6% as many input tokens as Model A to produce the same number of valid results.
If Model B’s input token price is only 60% of Model A’s, its input cost is approximately 77.2% of Model A’s, so it remains cheaper.
The break-even price ratio is approximately 77.8%, calculated as 100 / 128.6. Model B must cost less than that proportion of Model A’s input rate to remain cheaper. Above it, Model A has the lower input cost.
This calculation covers input tokens only. Output costs, manual rework, and cache discounts can all change the result. Use real samples to fill in those costs before making a production decision.
Practical Recommendations
Build a reusable evaluation set. Select 20–50 representative samples from real business tasks and keep them as a regression benchmark. Rerun the same set whenever the model or prompt changes.
Verify how interrupted streams are handled. Streaming output can disconnect during agent orchestration. First check whether the API supports resuming an interrupted stream. If it does not, cache the partial output locally and make retry handling idempotent. Otherwise, retries may cause duplicate writes or previously generated content may be lost.
Enable reasoning mode selectively. Reasoning mode can improve accuracy on complex reasoning and mathematical tasks, but it consumes output budget and increases latency. Enable it only for steps that need it rather than making it the default for every request.
Run old and new models in parallel during migration. Even if a new model performs well on the evaluation set, operate it alongside the existing model for a period before gradually shifting traffic. Keep a rollback plan available.
Conclusion: Let Real Task Results Drive the Decision
The strongest basis for model selection is success rate and total cost on the same real-world tasks—not specification-sheet figures or model names.
Make evaluation a repeatable process, retest regularly, and record the costs associated with each model switch. Those results provide a practical foundation for ongoing optimization.
