LLM Evaluation in Practice: A Methodology from Real Task Testing to Deployment Decisions
This article describes a practical methodology for evaluating large language models against real business tasks. It covers how to break down task requirements, build evaluation datasets from production logs, combine automated metrics with human review, test edge cases and adversarial inputs, and weigh inference cost and latency. A worked example shows how a team tested a model replacement and adjusted its business workflow to meet a cost target. Readers also get guidance on running evaluations continuously after deployment.
1. Introduction: Evaluation Returns to Real Use
Open-source models and commercial APIs are now widely available. For technical teams, the core challenge is no longer whether a usable model exists. The challenge is how to choose, from many options, the one that fits their business scenario. Many teams focus on public leaderboard scores when selecting a model. After integrating the model into real business workflows, however, they often face declining output quality, response times above target, and costs that grow out of control.
This gap reflects a widely overlooked fact: leaderboard scores measure performance on general knowledge question answering, while production environments require stable output within specific task flows. Therefore, an evaluation methodology built around real usage scenarios matters far more than chasing any single benchmark score.
2. Returning to Fundamentals: Defining Evaluation Dimensions from Business Scenarios
2.1 Breaking Down Tasks at the Right Granularity
Before evaluating any large language model, the first step is not running a test set. The first step is breaking the business requirement into task units that are fine-grained enough to measure. Take a common customer service scenario. It includes at least the following subtasks:
- Intent recognition: Determine whether the user’s question is a consultation, a complaint, or a request for operational guidance.
- Information extraction: Pull structured fields, such as order numbers, addresses, and times, from the user’s message.
- Multi-turn dialogue management: Maintain coherent reference resolution and topic switching within the context window.
- Answer generation: Produce logically consistent, appropriately toned replies based on the company’s knowledge base.
Each subtask places different demands on the model. Intent recognition depends most on accurate semantic understanding. Information extraction tests how well the model follows format constraints. Answer generation requires faithfulness to the source content and fluent expression. Only by breaking the business down to the task level can you design an evaluation sample set that distinguishes between models.
2.2 Building the Evaluation Set
A high-quality evaluation set should come from real production logs, not from artificially constructed examples. In practice, stratified sampling works well:
- Randomly sample historical conversations across all intent types, so that long-tail scenarios are not missed.
- Annotate each sample manually, defining the reference answer and the acceptable equivalent expressions.
- Weight samples by business impact. For example, an error in a payment conversation should carry much more weight than an error in small talk.
This approach requires more upfront effort. It ensures that evaluation results reflect the real production distribution and avoids the common problem of strong lab scores paired with poor production performance.
3. Running the Evaluation: Cross-Validation Across Multiple Dimensions
3.1 Combining Objective Metrics with Subjective Judgment
The evaluation should combine automated metrics with human review. Automated metrics catch obvious failures, including:
- Format compliance rate: Whether the output matches the required JSON or Markdown template.
- Key field accuracy: How closely extracted entities match the reference answers.
- Latency percentiles: Whether P95 response time meets the SLA.
Human review focuses on subjective quality, including how useful, harmless, and logically coherent the answers are. We recommend independent scoring by two evaluators, with disputed samples settled by a third reviewer. This process reduces the effect of individual bias on the decision.
3.2 Boundary Conditions and Adversarial Testing
Production inputs are rarely as clean as evaluation sets. A complete evaluation system must include stress testing and adversarial testing:
- Fill the context window with very long texts and long multi-turn histories, then check whether the model forgets information or loses its logic.
- Build inputs with typos, colloquial phrasing, and mixed Chinese and English, then test robustness.
- Use prompt injection samples to verify the model’s defenses at the safety alignment level.
Problems exposed by these boundary tests often determine whether a model can reliably support core business workflows.
4. Weighing the Trade-offs: Beyond Quality to Cost
4.1 The Hidden Costs of Inference
Evaluation reports tend to focus on model quality metrics. Deployment cost deserves equal attention. The cost of inference is not just the per-call unit price. It also includes:
- Context caching overhead: In long conversations, repeatedly recomputing the prefix adds latency and cost.
- Output length variation: Some models tend to produce lengthy answers, which sharply increases token consumption per call.
- Retry costs: Occasional format errors trigger retries in the generation pipeline, which multiplies overall spending.
For this reason, we recommend tracking “the total cost of completing one business task” during evaluation. Measure it using real business requests, rather than comparing only the listed price per million tokens.
4.2 The Trade-off Between Latency and Experience
Model parameter count and response latency are generally positively correlated. However, business scenarios differ in how much latency they tolerate. For interactive applications that users notice directly, P95 latency must stay within a few seconds. For offline batch tasks, a larger model can be used to gain higher accuracy.
A common optimization is a tiered routing strategy. Deploy a lightweight intent classifier at the entry point. Send simple requests to faster models, and reserve large models for complex reasoning. This design can improve overall experience at lower cost than sending all traffic to a single model without distinction.
5. Case Study: A Complete Model Replacement Decision
To show how the evaluation process works in practice, this section walks through a model upgrade for a knowledge base Q&A system.
Business background: The system originally used a general-purpose API model. A recent supplier policy change required switching to a different base model. The team’s core requirement was to determine whether the new model could reduce the cost per question-answer by 30% while maintaining answer quality.
Evaluation design:
- Stratified sampling of 800 records from the past three months of Q&A logs, covering three categories: product consultation, technical support, and after-sales policy.
- An automated script to measure the format compliance rate and the accuracy of key entities.
- Five key business team members performed blind scoring on the expertise and readability of the answers.
Results: The new model reached a 98.7% format compliance rate, on par with the old model. On samples that required context memory across multiple turns, however, its accuracy dropped by about 12% compared with the old model. Further analysis showed that the problem concentrated in long conversations beyond five turns, where the model showed some early-information forgetting.
Decision: The team did not reject the new model outright. Instead, it adjusted the business-side policy. It limited multi-turn context to four turns and handed longer conversations to a human agent. This compromise avoided the model’s weakness without changing the model itself, and the team met its cost target.
6. Continuous Evaluation and Iteration
Model evaluation should not be a one-time step during selection. It should become a routine part of the product lifecycle. Business data keeps changing, and user phrasing shifts over time. A model that performed well earlier may gradually lose effectiveness as the data distribution changes.
We recommend a quarterly evaluation process:
- Each quarter, sample new records from production logs and add them to the evaluation set.
- Track how scores on the evaluation set change over time for each model, rather than focusing only on absolute values.
- When a core business metric fluctuates abnormally, trace the cause quickly. Determine whether it comes from a change in prompt strategy or from behavior drift in the model.
Only by treating evaluation as an ongoing process can teams keep their underlying models aligned with business needs.
7. Conclusion
Choosing and deploying a large language model is essentially an optimization problem under three constraints: quality, cost, and user experience. Public leaderboards provide a rough reference point. Sound decisions, however, depend on fine-grained evaluation within your own business scenarios. Building an evaluation framework that fits your business needs, and running it systematically over time, is the core capability technical teams should develop. This is more reliable than betting on any single “strongest model.”
