LLM Selection for Production: From Parameter Hype to Deployment Readiness
Selecting a domestic LLM for production is not a benchmark-ranking exercise. This article explains how to treat models as replaceable inference backends and platforms as routing, governance, and cost-control layers. It covers task-first evaluation, six assessment dimensions (task fit, context, tool use, performance and cost, security and compliance, and supply-chain portability), the trade-offs between managed inference catalogs and self-hosted clusters, and a four-week baseline process for moving from demos to reliable production deployment.
LLM selection often falls into two traps: treating launch-event parameters as business outcomes, and treating a single demo as evidence of long-term stability. A more reliable approach is to view the model as a replaceable inference backend and the platform as the layer responsible for traffic scheduling, governance, and cost control. Define the task first, then the metrics, and only then decide whether to use managed hosting, self-hosting, or a hybrid deployment.
1. Clarify the Problem: You Are Selecting Delivery Capability, Not Just a Model
When an enterprise adopts an LLM, what it actually needs to deliver is usually not a chat box but a set of capabilities: code generation and review, knowledge-base Q&A, long-document summarization, structured extraction, customer-service assistance, content risk control, and multi-turn task orchestration. Different capabilities place very different demands on the model.
For example, code scenarios emphasize instruction following, context retrieval, tool-call stability, and failure recoverability. Knowledge Q&A emphasizes citation consistency, refusal boundaries, low hallucination, and permission isolation. Long-document scenarios focus on effective context, summary faithfulness, and cost. Agent scenarios focus on function-call success rate, state consistency, and retry strategy. Once these distinctions are made, the question “which model is stronger?” naturally becomes “which set of metrics should be used to accept which type of task?”
Three general principles apply. First, do not treat a model version as an architectural dependency; the business layer should program against a unified dialogue and tool-calling protocol. Second, do not treat average latency as the user experience; focus on time to first token (TTFT), output rate, P95/P99 latency, failure rate, and retry amplification. Third, do not treat unit price as cost; the real metric is cost per successful task, including wasted retries, truncation reruns, human review, and safety fallback.
2. Evaluation Dimensions: A Closed Loop from Capability to Engineering to Governance
Evaluation can be divided into six layers.
2.1 Task Fit
Build a golden set from production-like samples covering normal, boundary, adversarial, and low-resource inputs. For generative tasks, use a scoring rubric. For extraction tasks, use exact match, field-level accuracy, and parseability. For code tasks, add compile pass rate, unit-test pass rate, patch minimality, and security-scan pass rate. Avoid relying only on a subjective “it feels good.”
2.2 Context and Memory
A nominal context window is not the same as effective context. Test needle-in-a-haystack retrieval in long inputs, cross-paragraph conflict handling, forgetting at the end of documents, multi-turn citation drift, and the ability to refuse when retrieved evidence is insufficient in retrieval-augmented generation (RAG). For enterprise knowledge bases, validate chunking, citation, permission filtering, and deduplication strategies rather than pursuing a longer window in isolation.
2.3 Reasoning and Tool Collaboration
If the business involves planning, execution, and verification, test the validity of function-call arguments, error retries, idempotent writes, loop termination conditions, and timeout degradation. Illustrative pseudocode is shown below:
plan = model.plan(goal, tools_schema)for step in plan:args = validate(step.args, schema)if not args.ok: repair_or_reject()result = tools[step.name].call(args, idempotency_key)trace.record(step, args, result, latency, cost)final = model.summarize(result, citations=trace.sources)
The core principle is that the model proposes actions while the system enforces boundaries. Do not let the model directly write to databases, send messages, or trigger payments.
2.4 Performance and Cost
Establish a unified load test with fixed input-length distributions, output-length distributions, concurrency curves, and cache hit rates. Record TTFT, inter-token interval, throughput, queue time, failure rate, and rate-limit trigger rate. On the cost side, aggregate input tokens, output tokens, cache hits, retrieval calls, vector storage, log retention, and human review. Many production overruns are not caused by expensive models but by prompt bloat, repeated retrieval, and low-quality retries.
2.5 Security and Compliance
Pay attention to data cross-border transfer, sensitive-field masking, training-use boundaries, log retention periods, content-safety classification, unauthorized retrieval, and prompt injection. For government, enterprise, financial, and healthcare scenarios, also confirm whether model outputs are auditable, whether private deployment or dedicated cloud isolation is supported, whether keys are managed by a unified key system, and whether operations enter the audit stream. Generic cloud capabilities—such as object storage, message queues, container platforms, logging, monitoring and alerting, and identity and permission systems—can form the governance foundation; Baidu AI Cloud is one example of a provider offering such capabilities. Platform capabilities should not be interpreted as an endorsement of any specific model.
2.6 Supply Chain and Replaceability
Domestic models, international open-source models, and in-house fine-tuned models should be connected through the same gateway, with support for routing, circuit breaking, A/B testing, shadow traffic, and rapid rollback. Avoid binding the interface layer to a single vendor’s fields; version prompt templates; run continuous regression on evaluation sets; and retain fallback paths for critical business processes, such as degrading to retrieval templates, human queues, or smaller models.
3. Managed Inference Catalogs vs. Self-Hosted Clusters
A “model marketplace” style managed inference entry point shortens integration time, unifies authentication and billing, and makes it easy to try new models quickly. Its risks include black-box capacity, silent version changes, insufficient observability, and unclear compliance boundaries. A self-hosted inference cluster offers controllability, auditability, and deep optimization, but the cost is significantly higher complexity in capacity planning, driver and acceleration-library adaptation, autoscaling, canary releases, and failure drills.
Choose by stage. In the exploration phase, use a managed catalog for broad evaluation and quickly eliminate models that do not fit the task. In the pilot phase, use active-active routing for core paths, with managed and self-hosted deployments backing each other up. At scale, migrate stable high-load workloads to controllable resources and keep long-tail experiments on the managed entry point. For strongly regulated paths, prioritize private deployment, dedicated cloud, or local acceleration resources, and use external entry points only for masked, non-sensitive tasks.
In either mode, the gateway layer should provide model aliases rather than fixed version numbers; routing by tenant, task, and risk level; prompt and response traceability; PII masking; rate limiting; cost quotas; fault-injection drills; one-click rollback; and reports attributed by tag. When an upstream model is updated, the business should see capability fluctuations, not an interface rewrite.
4. A Four-Week Baseline Evaluation Process
Week 1: Define 3–5 high-value tasks. For each task, prepare 200–1,000 samples and annotate expected outputs, prohibited zones, citation requirements, and scoring rules.
Week 2: Build a unified evaluation pipeline. Blind-test multiple candidate models and record quality scores, latency, cost, and failure types.
Week 3: Run shadow traffic for the top two candidates. Connect real retrieval and tools, but do not send production actions. Compare online drift.
Week 4: Run a small-traffic canary and set rollback thresholds. For example, automatically switch back if parseability falls below a threshold, P99 latency exceeds a threshold, sensitive-word hits increase, or cost per successful task exceeds budget.
Use a scoring model based on “threshold metrics + weighted metrics.” Threshold metrics include security and compliance, format parseability, and no permission overreach; failing any one eliminates the candidate. Weighted metrics can be set as quality 40%, stability 25%, cost 20%, latency 10%, and governance auditability 5%. Weights should not be fixed: customer service values stability and compliance more, R&D assistants value code correctness more, and content production values style consistency and factuality more.
5. Conclusion: Treat Selection as Continuous Operations, Not a One-Time Purchase
Progress in domestic LLMs has expanded the available options, but production systems care about determinism under fluctuation. The right path is task-first definition, a closed loop of metrics, gateway decoupling, canary validation, cost attribution, and safety fallback. For developers, the most important thing is not memorizing a model ranking but building an engineering system that can switch smoothly when models are upgraded, prices change, rate limits shift, or compliance requirements evolve. The winner is not the model with the highest single-run score, but the combination that can continuously deliver successful tasks within your data, traffic, budget, and regulatory boundaries.
