LLM Selection Guide: Using a Private Evaluation Set to Find the Right Model
This guide explains how to choose a large language model for a specific business use case. It covers defining tasks and weighting criteria, building a private evaluation set with statistical checks, routing requests by cost tier, rolling out the chosen model in stages with stop conditions, and running compliance checks before the final decision.
1. Define Tasks and Weights
Before evaluating models, write down what each model must do. Describe each task in one sentence that covers its input, its output, and the criteria for judging success. For example: “Generate classification labels from the body of a support ticket. Labels must come from a fixed list, and the model must not invent new labels.”
Score each model on four dimensions: task quality, cost, engineering usability, and compliance. The table below shows example weights. Base the weights on business value and the cost of failure, not on equal shares. Tasks where errors are costly should carry higher weight.
| Check item | Specific metrics | Example weight |
|---|---|---|
| Task quality | Pass rate, factual accuracy, output format correctness | 40 |
| Cost per successful task | Average spend per task that passes | 20 |
| Engineering usability | P95 latency, concurrency limit, context length, streaming output | 20 |
| Compliance and data security | Data region, audit logging, private deployment capability, contract terms | 20 |
Compliance items are not weighted. If any compliance item fails, the model is eliminated.
Checklist:
- Each core task has clear pass criteria
- Each task is labeled with a business value level (high, medium, or low)
- Each task is labeled with the cost of failure (retryable, requires manual review, or unacceptable)
- Weights sum to 100 and have been approved by the business owner
2. Build a Private Evaluation Set
The private evaluation set answers one question: For my tasks, which model performs best, and what does it cost?
2.1 Sample Sources and Volume
- Sample from real business logs, stratified by task type, channel, and difficulty.
- Cover long-tail inputs, including multilingual text, malformed inputs, and very long text.
- Prepare at least 200 samples per task type as a starting point. More samples narrow the confidence interval.
2.2 Anonymization and Access
Anonymize samples before they enter the evaluation set. Remove fields such as names, phone numbers, national ID numbers, and customer contract numbers. Do not copy raw data into development environments or personal devices. People who access the evaluation set need separate authorization, and every read and write is recorded in an audit log.
2.3 Annotation Process
- Write the annotation guidelines as a document that includes pass criteria and counterexamples.
- Have two annotators score each sample independently. A third person resolves disagreements.
- Calculate inter-annotator agreement using Cohen’s kappa. If kappa is below 0.6, revise the guidelines before continuing annotation.
2.4 Baseline and Control Design
- Use the current production model as the baseline. If no model is in production, choose a general-purpose model with moderate cost.
- Run all candidate models on the same samples, with the same prompt and the same decoding parameters, such as a fixed temperature.
- Record input tokens, output tokens, and latency for every call. This data feeds the cost calculation later.
2.5 Metrics, Confidence Intervals, and Significance
- Pass rate = number of passing samples ÷ total number of samples
- Compute 95% confidence intervals with the Wilson method. For example, with 200 samples and an 80% pass rate, the interval is about ±5.5 percentage points.
- To compare two models, run a paired test on the same samples. For pass/fail outcomes, use McNemar’s test.
- If the gap between two models falls within the confidence interval, or the test is not significant, you cannot conclude which model is better.
2.6 Retest Public Benchmark Questions to Check for Contamination
High benchmark scores may mean the model was trained on public questions. To check this:
- Prepare at least 100 questions. Use rewritten versions of benchmark questions, or new questions published around the same time.
- Use the same scoring criteria and scorers for both sets.
- Compare pass rates on the original and rewritten questions. If the drop is clear and the paired test is significant, the original score may be contaminated. Reduce its weight in the decision.
- If the drop is not clear, the difference may come from random variation. Increase the sample size before deciding.
3. Use Billing Data for Cost-Tiered Routing
3.1 Cost Formula
Average cost per request = average input tokens × input price + average output tokens × output price
Cost per successful task = average cost per request × average number of calls ÷ task pass rate
Use the provider’s current published prices. When you check billing terms, confirm whether cached-hit tokens are priced separately, whether tiered pricing applies, and whether there is a minimum spend.
3.2 Billing Fields to Collect
- Call time, API name, model name, and model version
- Input and output token counts
- Cached token count (if the provider reports it)
- Request scenario tag (billing usually does not include this field, so add it at the gateway layer)
- Retry count and failure reasons
- Total monthly spend
Without scenario tags, you cannot tell which calls justify a stronger model. Add tags at the gateway layer before you build tiers.
3.3 Tiered Routing Rules
- Group traffic by scenario. Calculate call volume and total spend for each group.
- Use the highest-quality model for high-value, low-frequency scenarios.
- Use a lower-cost lightweight model for high-frequency scenarios with clear rules.
- When a lightweight model’s output fails format or factual validation, escalate the request to the next tier up.
- Set a maximum token limit and a timeout for each tier, so that no single request can exhaust the budget.
| Tier | Applicable scenarios | Model selection basis | Fallback rule |
|---|---|---|---|
| Tier 1 | High value, low tolerance for error | Model with the highest evaluation pass rate | Send to manual review after failure |
| Tier 2 | Moderate complexity | Model with the lowest cost per successful task that meets the pass rate target | Escalate to Tier 1 after validation failure |
| Tier 3 | High frequency, fixed format | Lightweight model that meets the pass rate baseline | Escalate to Tier 2 after validation failure |
4. Small-Traffic Rollout and Stop Conditions
4.1 Rollout Stages
The table below is a starting template that you can adjust. The business owner should set observation windows and tolerances based on business volume.
| Stage | Traffic share | Observation window | Condition to advance |
|---|---|---|---|
| 1 | 1% | 3 business days | Error rate no higher than baseline, with no serious incidents |
| 2 | 5% | 1 week | Task pass rate no lower than baseline minus the preset tolerance |
| 3 | 20% | 1 week | Cost per successful task and latency are within budget |
| 4 | 50% | 1 week | User complaint rate no higher than baseline |
| 5 | 100% | Continuous monitoring | Original solution kept available for rollback |
During each stage, compare the new solution with the baseline over the same time period. This prevents you from mistaking normal peak-hour fluctuations for model problems.
4.2 Stop Conditions
If any of the following conditions triggers, stop the rollout immediately and route traffic back to the original solution:
- Task pass rate falls below the baseline by more than the preset tolerance
- P95 latency exceeds the business limit
- Cost per successful task exceeds budget
- A data leak or compliance incident occurs
- Error rate exceeds the preset threshold for consecutive periods
After a pause, record the trigger, complete a review, and then decide whether to resume the rollout.
4.3 Rollback Preparation
- Before launch, rehearse switching back to the original model at least once, and record the switch time.
- Keep routing configuration in a hot-reloadable config, so switching does not require a new release.
- Keep call permissions and quota for the old model until the new solution has run stably at full traffic for a period.
5. Compliance Review and Conclusion
5.1 Compliance Checklist
- Data storage region meets company and regulatory requirements
- Vendor contract states that customer data is not used for model training (if the business requires this)
- Data retention period and deletion process are defined
- Audit logs are supported and record the caller, time, and model version
- Private deployment or dedicated instances are supported (if the business requires this)
- Vendor provides a list of sub-processors
- Input redaction or sensitive-information filtering is supported
- Access permissions follow the principle of least privilege
5.2 Data Usage Requirements
Anonymize all data used in evaluation, rollout, and log analysis. Prompts and model outputs in logs may also contain personal information, so set access permissions and retention periods for them.
5.3 Final Decision Table
Fill in one row per candidate model. Any model that fails compliance is eliminated and is not compared further.
| Model | Task pass rate (confidence interval) | Cost per successful task | P95 latency |
|—-|—-|—-|—-|
