Large Language Model Selection: Evaluation Metrics, Scenario Fit, and Orchestration
This article presents a practical framework for choosing a large language model for real projects. It covers five evaluation dimensions and their measurement methods, selection priorities for academic research, software engineering, and RAG-based knowledge-base Q&A, routing and caching strategies, common pitfalls, and the shift from single-model selection to orchestration.
Introduction: Start with the Task, Then Compare Models
Large language models update quickly, with new versions appearing every few months. For developers and researchers, the more practical question is which model fits the constraints of the current task. Parameter scale and public leaderboards reveal part of a model’s capability, but inference efficiency, long-text processing, instruction following, output stability, price, and rate-limit rules all directly affect project outcomes. Model selection should therefore start from the task and rely on your own test data.
1. Five Evaluation Dimensions and Measurement Methods
A selection framework can be divided into five dimensions. Each dimension should have a clear measurement method and a pass line. The table below gives examples; teams should set specific values according to their business risk.
| Dimension | Measurement Method | Example Pass Line (Adjust to Business Risk) |
|---|---|---|
| Reasoning and coding ability | Prepare multi-step reasoning problems and coding tasks with unit tests; track first-pass rate | First-pass rate meets the team’s target, e.g., 70% |
| Long-context utilization | Place key information at the beginning, middle, and end of the text; test retrieval hit rate | Hit rate does not show a sharp drop across length ranges |
| Instruction following | Use a fixed prompt set to test JSON or Markdown output | Format error rate and missing-field rate below set thresholds |
| API stability and cost | Record latency percentiles, error rate, and rate-limit counts; estimate cost based on real call structure | P95 latency and error rate meet service-level requirements |
| Ecosystem maturity | Check availability and documentation quality of function calling, retrieval plugins, and fine-tuning tools | Key features can be used directly in the team’s stack |
Reasoning ability should not be judged only by leaderboard scores. Public benchmark questions may already be covered by training data, and many are short Q&A items. A more valuable approach is to prepare tasks with longer logic chains, such as multi-step mathematical proofs, complex algorithm implementation, and system design questions. Many models perform well on short Q&A but become internally inconsistent after a certain number of reasoning steps.
The key to long context is effective utilization, not the window number. Window length is only an upper bound. During testing, place the same fact in different positions in a document and compare retrieval and answer accuracy. If accuracy drops noticeably as length increases, control input length in the business workflow or use segmented retrieval.
Instruction following can be quantified. Fix a set of prompts, specify the output format for each one, and count the proportion of parse failures and missing fields. The larger the sample, the more reliable the conclusion. After each model upgrade, rerun the same sample set.
API cost should be calculated as total cost of ownership; unit price is only one part. Also consider input-output ratio, cache hit rate, batch-call discounts, retry count, and whether failed requests are billed. Estimating with one week of real request logs is more reliable than estimating from experience.
Ecosystem maturity affects later maintenance cost. If the team already has a mature Agent framework, vector database, or fine-tuning pipeline, the cost of integrating a new model will be significantly lower. Otherwise, the team may need to adapt interfaces and tools itself.
2. Selection Approaches for Three Typical Scenarios
Different scenarios place very different weights on the evaluation dimensions. Below are the priorities for academic research, software development, and knowledge-base Q&A.
Scenario 1: Academic Research and Paper Assistance
This scenario values rigor in reasoning and accuracy in technical terminology. When handling mathematical proofs, physics formula derivations, or medical literature, the model needs to keep the logic chain complete and use domain concepts correctly. For evaluation, select paper abstracts published in the past two years and ask the model to summarize methods, check formula derivations, and review experimental design. Domain experts then score each item. Expert scoring is more reliable than model self-evaluation.
If the research content includes charts or molecular structure diagrams, visual understanding must be validated separately. Passing text-only tests does not mean the model will pass multimodal tasks.
Scenario 2: Software Engineering and Code Development
Code generation is a relatively mature area for large language models, but quality varies greatly by technology stack. Python and JavaScript have abundant training data, and most models perform consistently. Code for Rust, Go, Julia, and specific frameworks often requires dedicated testing.
During evaluation, the first criterion should be “it runs and passes tests.” Build a code validation set with unit tests, covering four task types: algorithm implementation, API integration, exception handling, and performance optimization. Record first-pass rate and first-round repair success rate. Code that compiles is not necessarily logically correct.
If the team uses a particular IDE over the long term, prioritize services with official plugins or mature third-party integrations to reduce tool-switching costs.
Scenario 3: Knowledge-Base Q&A and RAG
Enterprise knowledge bases are one of the more common commercial deployment scenarios today. Such applications require the model to answer strictly based on retrieved materials and to provide citation sources.
There are three evaluation priorities. First, the accuracy of locating key information. Second, refusal quality. When the materials do not contain an answer, the model should clearly state that it cannot obtain the answer from the available materials rather than fabricate content. Third, update responsiveness. After new documents are added to the knowledge base, answers should reflect the changes in a timely manner. The third point is often overlooked, but it directly affects users’ trust in the system.
3. Routing and Caching: Choose Strategies by Condition
The effectiveness of a multi-model architecture depends on routing strategy and cache design. The table below lists common practices, applicable conditions, and main risks.
| Strategy | Applicable Conditions | Main Risk |
|---|---|---|
| Layered routing: use lightweight models for simple tasks | Tasks can be clearly classified, such as short-text classification or entity extraction | If the classifier misjudges, complex tasks may be downgraded |
| Escalate difficult tasks to stronger models | Reliable difficulty signals exist, such as input length or task-type tags | If the escalation ratio is too high, the cost advantage disappears |
| Context caching | The same document fragments are repeatedly referenced and hit rate can be measured | If the cache is not invalidated after document updates, old answers may be returned |
| Historical conversation summarization | In multi-turn dialogue, early information has limited impact on the current answer | Summaries may lose key constraints and cause answer drift |
Both routing and caching can reduce cost, but their effectiveness depends on the specific traffic structure. A feasible approach is to run a small-percentage gray release with real traffic, record cost, quality, and latency, and switch to full traffic only after confirming the benefit. Do not directly use publicly reported cost-reduction ratios from others as your own expectation.
4. Common Pitfalls
Pitfall 1: Overestimating Parameter Scale and Benchmark Scores
Parameter scale and benchmark scores reflect capability ceilings, but they do not necessarily represent real user experience. In many scenarios, a medium-sized model fine-tuned on business data may outperform a larger model called directly. During selection, build a custom test set and score from three dimensions: first-round answer quality, number of corrections, and edge-case performance.
Pitfall 2: Looking Only at Test-Period Experience
Some services respond quickly during testing, but after formal launch, concurrency increases and both latency and rate limiting may worsen. During selection, review the provider’s service-level commitments, historical availability records, and incident response process, and run stress tests under near-production concurrency.
Pitfall 3: Ignoring the Retrieval Stage
In a RAG system, generation quality is limited by retrieval recall. Chunk length, overlap ratio, and the match between embedding model and retrieval algorithm often have a greater impact than the generation model itself. Optimize the retrieval pipeline first, then compare differences between generation models. Otherwise, model comparison results may mainly reflect differences in retrieval quality.
Pitfall 4: Compatibility Issues Caused by Version Upgrades
After a provider upgrades a model, reasoning ability may improve, but output format or tone may also change, causing downstream parsers to fail. Production environments should establish version records and a regression testing mechanism. Before each upgrade, run a full regression with a fixed test set and keep a rollback plan. The regression checklist can include output-format parse success rate, key-field completeness rate, performance on refusal samples, and end-to-end test results for key business flows.
5. From Model Selection to Orchestration
The mindset of single-model selection is shifting toward multi-model orchestration. Methods such as mixture-of-experts architectures aim to bring together different areas of specialization, making the practical question broader than choosing one model: it becomes how to route, cache, and compose models under real task constraints.
