How to Choose a Large Language Model: Evaluating Three Core Capabilities
Selecting a large language model requires more than copying leaderboard rankings. This guide explains how to read benchmark results, defines three core capability areas—hallucination control and agentic planning, code generation and agentic coding, and mathematical reasoning—and outlines a practical evaluation workflow using private test sets, multi-dimensional scoring, canary releases, and regression baselines. It also covers cost control and architecture practices such as tiered routing, caching, context trimming, and observability.
1. How to Read Benchmarks: Understand the Methodology First
The composite score from any benchmark is a weighted result across multiple sub-tasks. Change the weights, and the ranking can reshuffle, so copying rankings directly for technology selection is risky. Before reading any leaderboard, confirm three things:
- Evaluation scope: Is it general knowledge Q&A, agentic task planning, or coding in a terminal environment? Different scopes measure different capabilities.
- Version and time window: Results from different versions of the same model family, or from different points in time, cannot be mixed. Cross-month comparisons are often meaningless.
- Cost dimension: Cost per question, cost per million tokens, and the extra consumption from retries and tool calls are usually as important as the score.
A practical rule: use the composite score for initial screening and the sub-dimensions for final calibration. What truly determines production performance is how a model performs on your own business data.
2. The Three Core Capability Areas
2.1 Hallucination Control and Agentic Task Planning
Hallucination refers to content that a model generates which looks plausible but does not match the facts. Common mitigation approaches in the industry include retrieval-augmented generation (RAG), citation tracing, structured output constraints, and refusal mechanisms. When evaluating, do not look only at the answer accuracy rate; also check whether the model refuses when it should refuse and whether it provides verifiable sources.
Agentic task planning focuses on whether a model can break a goal into ordered steps, retry or switch paths when a tool call fails, and maintain consistent state across multiple turns. It is recommended to measure three metrics together: task completion rate, average number of steps, and tool call success rate. Looking at completion rate alone tends to reward a “try randomly and succeed by luck” strategy.
2.2 Code Generation and Agentic Coding
Coding capability should be separated into three levels: function-level completion, repository-level understanding, and end-to-end delivery in a terminal environment. The third level is the hardest, involving reading and writing files, executing commands, and iteratively fixing issues based on errors. Evaluation should include real dependencies, real tests, and real failure paths, rather than only running isolated algorithm problems.
# Skeleton for automated coding capability evaluationdef evaluate(candidate, task):repo = prepare_repo(task) # Set up the real dependency environmentpatch = candidate.solve(task) # Model produces the changerepo.apply(patch)result = run_tests(repo) # Run unit/integration testsreturn {"pass": result.success,"steps": candidate.steps, # Number of iterations"tool_fail_rate": candidate.tool_fail_rate,"cost": candidate.token_cost}
2.3 Mathematical Reasoning and Scientific Computing
These capabilities place extremely high demands on the coherence of multi-step derivations, and errors amplify along the chain. In addition to final answer accuracy, focus on the verifiability of intermediate steps, consistency of units and dimensions, and how the model handles out-of-scope conditions. In engineering, “step-by-step verification plus result back-substitution” can be introduced to reduce silent errors.
3. A Practical Selection Workflow
- Scenario segmentation: Divide business requests into five categories: casual Q&A, knowledge retrieval, structured extraction, coding tasks, and numerical computation.
- Build a private evaluation set: 100–300 real samples per category, annotated with standard answers and acceptable ranges. Avoid using public question banks.
- Multi-dimensional scoring: Accuracy, refusal appropriateness, average latency, unit cost, and failure recoverability.
- Canary release: Validate with 5%–10% of traffic and observe online metrics rather than offline scores.
- Establish a regression baseline: Re-run the evaluation set after a model version upgrade to prevent capability regression.
An illustrative score aggregation logic:
score = (0.35 * accuracy+ 0.20 * refusal_appropriateness+ 0.15 * (1 - normalized_latency)+ 0.15 * (1 - normalized_cost)+ 0.15 * recoverability)
Weights need to be adjusted by business type: increase the weights for refusal and cost in customer service scenarios, and increase the weights for code and recoverability in R&D scenarios.
4. Cost Control and Architecture Recommendations
- Tiered routing: Send simple requests to lightweight models and escalate complex reasoning and coding tasks to higher-capability models. This can significantly reduce average cost.
- Caching and reuse: Apply semantic caching to high-frequency repeated questions, and pay attention to setting expiration policies.
- Context trimming: Inject only the necessary retrieval snippets and control prompt length.
- Observability: Integrate logging services, monitoring and alerting, and distributed tracing. Record the input summary, elapsed time, and failure reason for each call, making it easier to determine whether the issue is a model problem or a retrieval problem.
If you adopt a cloud-based approach, you can use a container platform to host inference services, object storage to save evaluation sets and artifacts, and a message queue for asynchronous task peak shaving. These are all general capability categories and do not point to any specific vendor.
5. Common Pitfalls
- Looking only at the composite score while ignoring sub-dimensions and differences in your own scenario;
- Using public question banks instead of a private evaluation set, causing online performance to diverge from offline conclusions;
- Ignoring the hidden costs of retries and tool calls;
- Not running regression after a model upgrade, allowing capability to quietly regress;
- Mistaking a prompt issue for insufficient model capability.
Conclusion
The value of model capability evaluation lies not in providing a permanent ranking, but in offering a reusable judgment framework. Build private evaluation sets around the three main lines—hallucination control and planning, code delivery, and numerical reasoning—and combine them with tiered routing and full-chain monitoring. Only then can you keep selection decisions robust and costs under control in an environment of rapid version iteration.
