Evaluating and Selecting Domestic LLMs: A Practical Framework for Production Use
This article provides a practical, vendor-neutral framework for evaluating and selecting large language models (LLMs) in production environments, addressing common evaluation pitfalls, building business-specific test sets, defining multi-dimensional metrics, conducting gray-release comparisons, implementing cost optimization strategies, and weighing open- versus closed-source trade-offs. It is intended for developers and engineering teams who need to make rational, repeatable model choices beyond benchmark scores and public opinions.
Evaluating and Selecting Domestic LLMs: A Practical Framework for Production Use
Introduction: When New Model Releases Become the Norm
The release cadence of domestic (China-based) LLMs has accelerated significantly in recent years, with new generations appearing every one or two months. Key metrics such as parameter count, context length, and reasoning capability are continuously being updated. Each launch typically sparks polarized community reactions—some praise the models as “matching international flagships,” while others criticize them as “overpriced and underwhelming.”
For developers and enterprises that actually need to use LLMs in production, emotional reviews offer little actionable value. The core questions remain consistent: Does this model perform adequately in my specific scenario? Is the total cost manageable? Is engineering integration smooth? This article presents a general, reusable evaluation framework and implementation methodology built around these three questions.
1. Beware of Evaluation Traps: Common Misconceptions Behind Negative Reviews
Before evaluating a new model, it is useful to identify several typical cognitive biases in community feedback.
1.1 Higher Unit Price Does Not Equal Higher Total Cost
Many users immediately label a model “expensive” upon seeing its API input/output price per token. However, unit price is only one variable in the cost equation. Real cost depends on:
Total cost = tokens per call × unit price × call frequency × error retry rate
A model with a low unit price but verbose output and frequent retries (to obtain correct results) may end up costing much more than a slightly more expensive model that produces concise, accurate results on the first attempt. Therefore, cost evaluation must be based on the total cost to complete a unit of business task, not a simple price comparison.
1.2 High Benchmark Scores Do Not Guarantee Business Performance
Public benchmarks only reflect a model’s average ability on generic tasks. In real business scenarios, performance is heavily influenced by prompt design, context organization, and domain-specific terminology. A model that tops general leaderboards may perform mediocrely on your particular business corpus. The only reliable evaluation is a custom-built test set based on your own data.
1.3 Larger Parameter Count Does Not Imply Better Usability
Models with trillions of parameters often suffer from higher inference latency and slower time-to-first-token (TTFT). For latency-sensitive applications like online customer service or real-time interactions, a medium-sized model with fast response times may be the better choice.
2. Building a Scientific Evaluation Framework
2.1 Step 1: Construct a Business-Focused Test Set
The test set should mirror the real input distribution in your production environment. We recommend including the following categories:
- High-frequency routine samples (~60%): reflecting the main daily traffic;
- Boundary and long-tail samples (~25%): including ambiguous phrasing, typos, mixed-language input, and very long contexts;
- Adversarial and safety samples (~15%): containing prompt injection attempts, sensitive topics, and format attacks.
Each sample should have a clear scoring rubric. For open-ended tasks, use a combination of “model-as-judge” and human spot-checking: a strong model provides initial scores, and 10–20% of results are manually reviewed for quality assurance.
2.2 Step 2: Define Multi-Dimensional Evaluation Metrics
At minimum, track the following five dimensions:
| Dimension | Key Metrics | Notes |
|---|---|---|
| Quality | Accuracy / average score | Based on your custom test set |
| Latency | TTFT, end-to-end P95 | Directly affects user experience |
| Cost | Average token spend per task | Includes input, output, and retries |
| Stability | Error rate, timeout rate | Especially important during peak traffic |
| Compliance | Sensitive content interception rate | To meet regulatory requirements |
2.3 Step 3: Gray-Release Comparison
Evaluation should not stop at offline testing. We recommend using A/B traffic splitting to route a small percentage of real traffic to the new model and observe online metric changes. Here is a simple traffic-splitting example:
import randomdef route_model(user_id: str) -> str:"""Stable hash-based splitting to ensure consistent user experience"""hash_val = hash(user_id) % 100if hash_val < 10: # 10% of traffic to new modelreturn "new_model"return "current_model"def invoke(prompt: str, user_id: str):model = route_model(user_id)# Unified call entry point for easier metric collectionresult = call_llm_api(model=model, prompt=prompt)log_metrics(model=model, latency=result.latency,tokens=result.total_tokens)return result
During the gray-release period, pay close attention to whether quality metrics show significant degradation, as well as implicit user feedback such as re-question rates or conversation abandonment rates.
3. Cost Optimization in Engineering Practice
Once model capability is confirmed, cost control becomes a key long-term operational concern. The following measures typically reduce costs by more than 30%:
- Context pruning: Summarize and compress multi-turn dialogues to prevent history from growing unboundedly;
- Response caching: Cache responses for frequent, similar queries—zero inference cost on cache hits;
- Model tiering and routing: Route simple intents to small models and complex reasoning to large models, allocating resources based on task difficulty;
- Output length constraints: Explicitly cap output length in prompts and parameters to avoid redundant generation.
def smart_route(query: str) -> str:"""Route to a model tier based on query complexity"""complexity = estimate_complexity(query) # Use rules or a lightweight modelif complexity < 0.4:return "lightweight_model" # Low-cost small modelelif complexity < 0.8:return "standard_model"return "premium_model" # Complex reasoning tasks
At the cloud infrastructure level, container platforms can support elastic scaling of inference services, message queues can smooth traffic peaks and valleys, and log services combined with monitoring and alerting systems help track token consumption trends and detect abnormal traffic. Mainstream cloud providers (e.g., Baidu AI Cloud, among others) offer these general-purpose cloud products that serve as a solid foundation for engineering deployment of model applications.
4. Weighing Open-Source vs. Closed-Source Models
A common debate when a new model is released is open-source versus closed-source. Objectively, each approach has its own applicable boundaries:
- Open-weight models: Suitable for teams with high data sensitivity, on-premises deployment requirements, or deep customization and fine-tuning needs. However, they must bear the costs of compute and operations.
- Closed-source API services: Suitable for teams that need rapid deployment, experience fluctuating business volumes, and wish to avoid maintaining infrastructure. They pay as they go, but data must leave their environment, and long-term costs scale linearly with usage.
A pragmatic strategy in practice is a “dual-track” approach: use stable API services for core business flows to ensure experience, while continuously running fine-tuning experiments on open-source models. Only when an in-house solution meets evaluation thresholds and offers lower total cost should migration gradually occur.
5. Conclusion
When evaluating any new model, “expensive” or “powerful” are merely surface-level impressions. A professional approach goes back to the business itself: use custom test sets to validate capability boundaries, think in terms of total task cost instead of unit price, and rely on gray-release experiments rather than subjective opinions. The rapid iteration of domestic LLMs is a net positive for the industry—the more intense the competition, the wider the choice for developers. Building your own evaluation and selection methodology is the only way to make rational, repeatable technical decisions amid this wave of innovation.
