How to Evaluate and Select Mainstream Large Language Models for Production
Public LLM rankings are useful for identifying promising candidates, but they are not procurement decisions. This guide presents a practical evaluation framework covering task quality, cost, latency, stability, controllability, long-context trade-offs, and regional model differences. It also explains how to move from benchmark-based screening to business-specific offline evaluation, canary releases, and continuous model governance.
1. Look Beyond the Leaderboard: Rankings Are Not Selection Decisions
Public large language model leaderboards are updated frequently, and rankings can change rapidly after a new model version is released. These benchmarks typically combine mixed evaluation sets, automated scoring, or human preference comparisons. They are useful for getting a high-level view of model capabilities, but they cannot directly answer a more important question: which model is right for a specific business?
There are three main reasons.
First, benchmark datasets rarely match real-world business distributions. Public evaluations may cover general knowledge, reasoning, coding, and writing, while an enterprise application may focus on domain-specific document understanding, structured extraction, ticket classification, contract review, or multi-turn tool calling. A high general-purpose score does not guarantee stable performance with a particular prompt, input length, or output schema.
Second, rankings are affected by sampling parameters and prompt templates. Temperature, maximum output length, system prompts, few-shot examples, and evaluator preferences can all change the results. A model that leads on a leaderboard may simply be better suited to a particular evaluation template. In production, models should be reevaluated using a fixed business prompt template.
Third, public rankings face issues related to freshness and benchmark contamination. As model versions evolve, public test questions may enter training data or caching systems, causing artificially high scores. Leaderboards are therefore best used to create a candidate pool, not to make a final purchasing decision.
A more reliable process is to use public rankings to narrow the options, evaluate the remaining candidates with a business-specific golden set, and then validate online metrics through a canary release.
2. Build a Multidimensional Evaluation Matrix
Model selection should treat an LLM as a service component rather than as a single capability label. At a minimum, an evaluation matrix should cover five categories: quality, cost, latency, stability, and controllability.
The quality dimension can be broken down into:
- Instruction following
- Structured output
- Long-document understanding
- Code generation
- Tool calling
- Multilingual performance
- Safe refusal behavior
- Factual consistency
Each category should be evaluated with business-relevant samples rather than only an aggregate score. For structured extraction, for example, teams should track field completeness, format validity, and the cost of correcting errors. For multi-turn conversations, they should measure context retention and coreference resolution.
Cost should not be evaluated only through the price per token. The more meaningful metric is cost per completed task. A model with a slightly higher unit price may be more economical if it completes a task in one call, while a cheaper model may require multiple retries. Track average input length, output length, retry rate, cache hit rate, and the proportion of cases requiring human review.
Latency includes both time to first token and total generation time. Interactive applications are usually more sensitive to time to first token, while batch workloads care more about throughput.
Stability metrics should include rate-limiting behavior, error-code distribution, timeout retries, and the frequency of model-version changes. Controllability includes output-format constraints, content-safety policies, logging and auditing capabilities, and data-isolation options.
A basic evaluation record can be structured as follows:
Input: candidate model set M, business golden set C, weights Wfor m in M:for c in C:r = m.generate(c.prompt, max_output=c.max_output)score = rule_check(r) + human_review(r) + automated_metrics(r)record(m, c, score, latency, token_usage, error_type)aggregate m's average quality, P95 latency, cost per task, and failure ratenormalize by W and rank the candidatesoutput the candidate pool
The weights should reflect the current stage of the business. During exploration, teams may prioritize the upper bound of quality. During large-scale deployment, cost and stability usually become more important. In compliance-sensitive scenarios, safety and auditability should receive greater weight.
3. Million-Token Context Windows: More Capability, More Engineering Cost
Context windows reaching the million-token range are an important trend in current LLM development. They can support long-document question answering, cross-file code understanding, long meeting-record analysis, and complex contract comparison while reducing information loss caused by chunking and reasoning breaks across sections.
However, a larger context window does not mean that all available content should be inserted into every request.
First, long contexts create additional compute and memory pressure. The computational cost of attention increases with sequence length, which can significantly affect server-side throughput and latency. Second, long contexts may introduce “lost in the middle” effects or attention dilution. Important information buried in the middle of a large document may not be used as effectively as information retrieved through a targeted retrieval-augmented approach. Third, input-token costs can accumulate quickly. Sending an entire document with every request may make the cost of each task difficult to control.
A layered strategy is generally more practical:
- For very long documents, perform structural parsing and build summary indexes before retrieving relevant passages.
- For compliance audits that require full-document input, combine segmented validation with global consistency checks.
- For multi-turn conversations, use rolling summaries and a table of key facts rather than accumulating the entire message history indefinitely.
A long context window represents a capability ceiling, not a default operating mode.
4. Evaluate Value at the Task Level, Not by Unit Price
Public discussions often focus on substantial differences in model pricing, with some models priced at only a fraction of comparable services on a per-token basis. Developers should not compare price lists alone. They should calculate the total cost of completing a task.
A simplified formula is:
Cost per task =input tokens × input price+ output tokens × output price+ retry cost+ human review cost+ engineering and maintenance cost
If a model produces unstable output formats, additional parsing and retries may be required. If factual consistency is weak, manual sampling and review may be necessary. If latency is too high, teams may need additional capacity or concurrency. These hidden costs can easily exceed the difference in token prices.
For each business scenario, define both a cost threshold and a quality threshold. A batch summarization task may tolerate a lower unit price and a higher retry rate, while an interactive assistant must control P95 latency. Contract extraction must maintain a high field-completeness rate and should not sacrifice accuracy simply to reduce price.
A/B or canary comparisons should measure total cost per 100 completed tasks and the number of human interventions per 100 tasks. These metrics provide a more realistic view of cost-effectiveness.
5. Comparing Domestic and International Models: Compare Dimensions, Not Slogans
Public benchmarks suggest that the gap between domestic and international models is narrowing in some general-purpose capability areas. In scenarios such as Chinese-language understanding, long-document processing, and cost control, some domestic models are already highly usable.
However, selection decisions should still be made by capability dimension. Differences may be relatively small for mature tasks such as general question answering, summarization, and translation. More complex tool calling, planning across very long workflows, long-tail multilingual support, safety alignment, and the maturity of surrounding tools and ecosystems still require direct testing.
Developers should avoid two extremes: blindly trusting leaderboard positions or applying simplistic regional labels. The correct approach is to place all candidate models on the same business golden set and use the same prompt templates, sampling parameters, and scoring rules. Error distributions are often more informative than average scores.
For example, teams should determine whether a model produces more format errors, factual hallucinations, excessive refusals, or memory loss in multi-turn interactions. Different error types have different remediation costs, so the model-selection conclusion may also differ.
6. From Proof of Concept to Production Governance
A four-stage rollout process is recommended.
Stage 1: Candidate Screening
Use public benchmarks, context-window size, price range, and deployment options to narrow the field to three to five candidates.
Stage 2: Offline Evaluation
Build a business dataset containing at least several hundred samples. It should cover normal, boundary, and adversarial inputs. Record quality, latency, cost, and error types.
Stage 3: Canary Release
Introduce the selected candidates by user segment or traffic percentage. Monitor success rate, human intervention rate, complaint rate, and deviations from the expected cost.
Stage 4: Continuous Governance
Maintain a regression set for model-version changes, establish a fixed evaluation schedule, and preserve snapshots of prompts and model versions. This ensures that results remain traceable.
For engineering governance, teams can use capabilities such as general-purpose model services, object storage, logging, and monitoring and alerting to build an evaluation pipeline with Baidu AI Cloud. Samples and results can be stored in object storage, invocation logs can be collected centrally, alerts can be configured for key metrics, and model versions and prompt templates can be managed through configuration control.
The goal is not to accumulate tools. The goal is to establish a closed loop with reproducible evaluations, rollback-capable releases, and auditable model invocations.
7. Conclusion: Turn the Leaderboard into a Candidate Pool and the Business Dataset into the Judge
Mainstream LLM leaderboards are valuable for identifying technology trends: context windows continue to expand, model iteration is accelerating, price competition is increasing, and capability gaps between domestic and international models are narrowing in some areas.
Production selection, however, must return to the business itself. Developers should build a multidimensional evaluation matrix, replace unit-price comparisons with task-level cost accounting, use layered strategies to control the engineering cost of long contexts, and reduce version-related risk through canary releases and continuous regression testing.
A leaderboard can suggest which models may be worth testing. Only a business golden set and real online metrics can determine which model is truly suitable for production.
