Selecting LLMs: From Inference Services to Production Evaluation
Choosing the right large language model (LLM) goes beyond simply comparing answer quality. This article breaks down the model selection process into three critical layers: model capability, inference services, and business systems. It explores why public leaderboards cannot replace business validation, how to build a capability evaluation matrix tailored to specific tasks, and how to establish an actionable selection process to ensure reliable, cost-effective, and verifiable production deployments.
1. Clarify What You Are Selecting
With the continuous iteration of LLMs, the challenge for developers is no longer “is there a model available?” but “which combination of model and service is best suited for the current business?”
On the surface, model selection seems like comparing answer quality. In actual production, you must also consider access methods, execution environments, data boundaries, service stability, and operational costs. The same model deployed through different solutions can yield significantly different end-user experiences.
Therefore, the selection process should be broken down into at least three layers:
The first layer is model capability. It determines whether the model can understand requirements, follow constraints, generate code, process long documents, and perform complex reasoning.
The second layer is the inference service. It dictates how the model is called, how much load it can handle, and how it executes authentication, rate limiting, monitoring, and failure recovery.
The third layer is the business system. It determines how model outputs are validated, how knowledge bases are integrated, how external capabilities are invoked, and who takes over in case of errors.
Comparing only the first layer often leads to choosing a solution that “looks good in a demo but cannot be reliably deployed.” A reliable selection process must revolve around the complete chain.
2. What Inference Services Actually Solve
A trained model is not equivalent to a service ready for production. Running a model typically requires weight loading, compute resource scheduling, request queuing, inference execution, and result returning.
The role of an inference service is to organize these execution steps and provide a relatively stable calling interface to the outside world.
The complete process can be understood as:
Business Request -> Authentication and Traffic Control -> Request Queuing and Resource Scheduling -> Model Inference -> Result Processing and Security Checks -> Return to Business System.
Here, streaming output allows the business side to progressively receive generated content, reducing the user’s wait time facing a blank page. Request scheduling impacts resource utilization under high concurrency, while monitoring and logging help teams locate timeouts, failures, and quality fluctuations.
It is important to note that different inference services possess different capabilities. Just because a service provides a model calling interface does not mean it inherently has complete elastic scaling, version management, auditing, or high availability. These must be confirmed one by one through documentation, testing, and service agreements.
3. API Accessibility Does Not Mean Production Readiness
Seeing that a model can be accessed via an API makes it easy to conclude that “it can be directly integrated into the business.” However, API availability only proves that the calling chain works at a specific point in time.
Before going live, the following issues should be confirmed:
Is the open state clear?
Differences may exist between trial, preview, and official services regarding stability, usage scope, and support. Do not infer long-term availability based on short-term successful access.Is the callable version identifiable?
Changes in model versions can affect output style, format adherence, and task success rate. If you cannot pin a version or receive change notifications, business regression testing becomes even more critical.Are service limitations clear?
Verify input/output length limits, request frequency limits, concurrency constraints, timeout policies, and error return methods to avoid normal behavior in the test environment but frequent failures under live traffic.Do data processing rules meet requirements?
Understand how input content, generated results, and execution logs are stored, for how long, who can access them, and whether there are additional data usage arrangements.Is the exit path viable?
If the service is adjusted or discontinued, whether the team can migrate the calling chain, evaluation data, and business configurations is also part of the selection process.
4. Do Not Treat Public Leaderboards as Business Conclusions
Leaderboards can help narrow down candidate pools, but they cannot replace business validation.
Different evaluations focus on different capabilities. Some focus on code generation, some on mathematical reasoning, some emphasize conversational preferences, and others focus on specific page generation formats or tool calling. A model excelling in one category does not mean it fits all applications.
For example, generating a visually complete web page and maintaining an existing large system are two different tasks. The former may focus more on layout and interactive rendering, while the latter requires understanding existing structures, adhering to interface constraints, controlling the scope of modifications, and passing existing tests.
Similarly, answering knowledge questions and processing enterprise documents are not entirely the same. Enterprise scenarios often require answers to be traceable to the source material; when evidence is insufficient, the model must clearly express uncertainty rather than fabricating seemingly plausible content.
Therefore, public evaluations are better used as candidate filtering signals. The final decision should come from repeatable tests on real tasks.
5. Build a Capability Evaluation Matrix Around Business Tasks
Rather than looking for an abstract “most powerful model,” it is better to define tasks first and then choose evaluation metrics.
- Knowledge Q&A and Document Retrieval
Focus on whether the answer is supported by the given materials, whether it correctly identifies time, subjects, and applicable conditions, and whether it refuses to jump to conclusions when materials are insufficient.
If the business uses a Retrieval-Augmented Generation (RAG) solution, evaluate “whether the right materials were retrieved” and “whether the answer is faithful to the materials” separately. Retrieval failures and generation failures cannot be lumped together, or it will be difficult to locate the problem.
- Code Generation and Maintenance
Do not score solely based on whether the code looks complete. More reliable criteria include: can it run, can it pass tests, does it comply with conventions, does it introduce security risks, and does it cause irrelevant modifications.
For bug fixing tasks, keep the original code, defect description, and test conditions, and let candidate models complete the modifications in the same environment. Generated explanations can serve as a reference, but the final judgment should be based on verification results.
- Long Document Processing
Large input capacity does not equal the ability to stably utilize all information. You should place key evidence at the beginning, middle, and end of the document to test whether the model misses details, confuses subjects, or incorrectly stitches conditions from different chapters.
Also, check information retention after multiple rounds of interaction, especially whether the model can correctly update conclusions after the user supplements or modifies constraints.
- Structured Information Extraction
For scenarios like invoices, contracts, and work orders, focus on field accuracy, missing field handling, type consistency, and format compliance.
“Output can be parsed” is only the first step. A correctly formatted result with wrong amounts or dates still cannot enter the subsequent process.
- External Capability Invocation
If the model needs to query business data or initiate operations, check whether it can select the right capability, generate valid parameters, and correctly handle execution failures.
For high-risk actions involving payments, deletions, or permission changes, do not execute directly based solely on the model’s judgment. The business system should implement permission verification, rule checking, and necessary manual confirmation.
6. Performance Evaluation Must Cover the Full Request Lifecycle
Response speed is not a single number. At least distinguish the following metrics:
Time to First Content: The time from initiating the request to receiving the first chunk of valid output, affecting the interactive experience.
Total Task Duration: The time from request initiation to the generation of a business-ready result, including necessary validation, retries, and external operations.
Output Generation Speed: The speed at which the model continuously generates content, but it cannot represent end-to-end efficiency alone.
Success Rate: The proportion of requests that yield results meeting business requirements within a predetermined time.
Tail Latency: The duration of a small fraction of slow requests. Online businesses cannot just look at averages, or they will easily ignore the degradation of experience during peak hours.
When testing, cover different input lengths, output lengths, and concurrency scales. Test results from a single short question cannot be directly extrapolated to long document, high concurrency scenarios.
Furthermore, longer answers are not necessarily more valuable. For field extraction or state determination tasks, the model should be required to output only necessary content, avoiding invalid generation that increases time and costs.
7. Calculate Costs Based on “Effective Task Completion”
Comparing only the unit price per call easily underestimates actual expenditure. A more reasonable approach is:
Unit Effective Task Cost = Total Cost of Completing the Batch of Tasks ÷ Number of Tasks Passing Business Acceptance.
Here, the total cost includes not only model calls or compute resources but may also involve retrieval, storage, logging, network transmission, failure retries, manual review, and operation maintenance.
For example, a solution with cheaper per-request costs but frequent format errors requiring multiple retries and manual corrections may not have a low effective task cost. Another solution with higher call costs but a better first-pass success rate might be more economical overall.
In self-deployment scenarios, you cannot just account for compute resource procurement. Resource idling, peak redundancy, upgrade verification, failure handling, and specialized personnel investment should all be factored into the cost model.
For tasks with different risk levels, a tiered processing strategy can be adopted: routine tasks go through lower-cost paths, complex tasks enter more capable processing chains, and high-risk results are handed over for manual review. However, the routing rules themselves must be validated; you cannot assume the model can accurately judge its own capability boundaries.
8. Hosted APIs vs. Self-Deployment: How to Choose
Hosted APIs are usually convenient for quick validation, reducing underlying deployment and resource maintenance, suitable for teams that need to verify business value as soon as possible. However, data processing rules, service limitations, version changes, and portability should be carefully evaluated.
Self-deployment provides more direct control over the execution environment, suitable for scenarios with clear data boundaries, network isolation, or custom execution requirements. But the premise is that model licenses and deployment conditions permit it, and the team possesses the corresponding engineering capabilities.
Self-deployment does not inherently mean lower costs or absolute data security. Insufficient access control, improper log management, and backup leaks can also cause risks.
For hybrid deployments, clarify which data can enter which processing chain. Sensitive content identification, desensitization, routing, and auditing must form a closed loop, rather than relying on users’ own judgment.
9. Establish an Actionable Selection Process
Step 1: Define Business Goals and Hard Constraints.
Clarify task types, quality baselines, response requirements, budget ranges, data boundaries, and manual takeover conditions. Solutions that fail to meet hard constraints should be excluded first, not offset by other high scores.
Step 2: Build a Representative Test Set.
Samples should cover common requests, complex requests, abnormal inputs, and historical failure cases, and undergo necessary authorization and desensitization. Do not select only samples that easily showcase effects.
Step 3: Unify Test Conditions.
Fix the scope of materials, prompt requirements, output rules, and external capability permissions, and record model versions, service configurations, and test times. Complete a fair baseline comparison first, then perform reasonable optimizations separately.
Step 4: Implement Automated Validation and Manual Blind Evaluation.
Verifiable tasks should be checked using rules, tests, or standard answers first; open-ended tasks are scored by reviewers based on unified standards. Important conclusions should retain samples and judgment basis.
Step 5: Conduct Stability and Security Testing.
Verify behavior under high concurrency, timeouts, service interruptions, abnormal returns, and malicious inputs. For instructions in untrusted materials, test whether the system mistakenly treats the material content as operational requests.
Step 6: Launch with Small Traffic and Continuously Regress.
Apply the new solution to a controlled scope, monitoring quality, cost, and failures. When involving real operations, avoid repeatedly executing actions with side effects during the validation process. After changes to the model, prompt requirements, or retrieval process, key tests should be re-run.
10. Conclusion: Select a Verifiable System, Not Just a Name
The core of LLM selection is not chasing temporary hype, but finding a combination of capabilities and services that meets business constraints.
Model capability determines the task ceiling, inference services affect execution efficiency, and business engineering guarantees determine whether the system can be reliably delivered. All three must be evaluated together.
For developers, the safest approach is: use public information to form a candidate pool, use real tasks to validate capabilities, use the complete chain to measure costs, and use continuous monitoring to constrain launch risks.
When the basis for selection shifts from “who ranks higher” to “who can stably complete tasks within clear boundaries,” technical decisions become easier to reproduce, audit, and maintain over the long term.
