How to Choose LLMs and Allocate Quota: A Reproducible Testing and Allocation Method
The most common question in model selection is: how much more expensive is the stronger model, how much better is it, and on which tasks is the price difference worth paying? This article presents a reproducible testing method. Readers can run it with their own business data to reach conclusions suited to their scenarios. All numbers in this article are illustrative examples showing how to compute metrics; they do not represent actual measured results of any model.
1. Unify the Cost Basis First
Most platforms bill by tokens and use a “quota consumption multiplier” to normalize the cost of different models onto the same scale. The higher the multiplier, the more quota each call consumes. Before testing, confirm three things:
- Whether input and output tokens use the same multiplier. Some platforms bill output tokens separately, so costs of tasks with long outputs can be underestimated.
- Whether cache hits count against quota, and whether a hit is completely free.
- Whether batch APIs offer discounts, and what latency requirements apply—for example, results must be returned within 24 hours.
The effective cost per task is computed as follows:
Effective cost = quota per call × (1 + average retry count) + quota equivalent of manual correction cost
Manual correction cost must be converted into quota units:
- Record the correction minutes per output and take the sample average.
- Manual correction cost (in currency) = average correction minutes ÷ 60 × labor rate (per hour).
- Quota equivalent = manual correction cost ÷ the currency value of one quota unit.
Example (all figures are hypothetical): labor rate is 100 per hour, and one quota unit is worth about 0.1. Then one minute of manual work equals about 16.67 quota units.
Suppose two models (not specific model versions) have platform multipliers of 0.08 and 0.01, a ratio of 8. The light model has a 20% retry rate; the advanced model 5%. Setting the light model’s per-call quota to 1 unit and ignoring labor costs, the light model’s effective cost is 1 × 1.2 = 1.2, and the advanced model’s is 8 × 1.05 = 8.4—about 7× apart.
If each output from the light model requires an average of 10 minutes of manual correction, while the advanced model requires only 2 minutes, then:
- Light model: 1.2 + 10 × 16.67 ≈ 167.9
- Advanced model: 8.4 + 2 × 16.67 ≈ 41.7
Now the advanced model is actually cheaper. Comparing unit prices alone is misleading; retries and manual corrections must be included.
2. Fix Materials, Prompts, and Samples
In a comparison experiment, the only variable should be the model itself. Fix the following five items:
- Input materials: the same batch of source documents or code requirements. Save file hashes to prevent mid-test replacement.
- Prompts: preserve the full system and user prompts; do not tune wording for any specific model.
- Inference parameters: record and unify temperature, max output length, and other parameters.
- Sample size: at least 30 independent samples per task, roughly evenly divided among simple, medium, and complex difficulty levels.
- Runs per sample: run each sample at least 3 times and record variance. A single run can easily turn a lucky result into a false conclusion about model capability.
Samples must be de-identified first. For samples containing personal information, customer data, or internal code, replace sensitive fields and confirm you are authorized to send the data to the chosen platform.
Record the following fields in every test. Platform models are updated over time, and results without version information cannot be reproduced.
| Field | Example Content |
|---|---|
| Model name and version | As shown on the platform page |
| Platform and date | Platform name, 2026-11-25 |
| Temperature and max output length | 0.2, 2048 |
| Sample hash and sample count | Hash per task, 30 samples |
| Runs and retries | 3 runs, average 0.2 retries |
| Manual correction minutes | Correction time per output |
3. Two Task Types and Scoring Tables
This method defines two task types. Task A is structured information extraction and summarization, suitable for routine scenarios such as document processing and report archiving. Task B is constrained code generation, requiring the model to follow business rules and handle exceptions and concurrency, suitable for scenarios involving logical reasoning.
The two task types use different scoring tables.
Table 1: Task A Scoring Table (100 points total)
| Dimension | Weight | Scoring Method | Suggested Pass Line |
|---|---|---|---|
| Field extraction accuracy | 40% | Compare against manual annotations: correct fields ÷ reference fields | ≥95% |
| Summary key-point coverage | 30% | Hit key points ÷ reference key points | ≥85% |
| Length and format compliance | 15% | Whether word limit and structure requirements are met | All satisfied |
| Manual correction volume | 15% | Characters or minutes modified | Within the set limit |
Table 2: Task B Scoring Table (100 points total)
| Dimension | Weight | Scoring Method | Suggested Pass Line |
|---|---|---|---|
| Constraint compliance | 30% | Check business rules one by one: satisfied rules ÷ total rules | ≥90% |
| Unit test pass rate | 30% | Run preset test cases in an isolated environment | ≥90% |
| Exception and edge handling | 20% | Handling of null values, timeouts, duplicate requests, etc. | ≥80% |
| Concurrency correctness | 20% | Whether stress tests show data corruption or duplicate writes | Zero errors |
Pass lines are suggestions only; adjust them to your business’s fault tolerance. High-risk scenarios such as finance and healthcare should use stricter lines—for example, field extraction accuracy no lower than 99%—with manual review of all outputs.
Weighted Total Score
First compute a completion rate between 0 and 1 for each dimension. The weighted total score is:
Weighted total score = Σ (dimension completion rate × dimension weight)
Since weights sum to 100, the result falls directly between 0 and 100. The completion rate for the manual correction dimension is:
Correction completion rate = max(0, 1 − average correction minutes ÷ allowed correction limit minutes)
The allowed limit is defined by the team in advance; this example uses 5 minutes.
Example 1 (Task A, hypothetical figures): field extraction accuracy 96%, key-point coverage 88%, format fully compliant, average correction 2 minutes.
- Field extraction: 0.96 × 40 = 38.4
- Key-point coverage: 0.88 × 30 = 26.4
- Format compliance: 1.00 × 15 = 15.0
- Manual correction: (1 − 2/5) × 15 = 9.0
- Weighted total: 88.8
Example 2 (Task B, hypothetical figures): constraints satisfied 9/10, unit test pass rate 92%, exception and edge handling 75%, zero errors under concurrency stress tests.
- Constraint compliance: 0.90 × 30 = 27.0
- Unit tests: 0.92 × 30 = 27.6
- Exception/edge handling: 0.75 × 20 = 15.0
- Concurrency correctness: 1.00 × 20 = 20.0
- Weighted total: 89.6
Example 2 scores nearly 90, but exception and edge handling is 75%, below the 80% pass line, so this model cannot be used for Task B. Total score and pass lines must be evaluated separately.
Judging the Quality Gap
When comparing two models, check pass lines first, then the score difference. The rules are:
- If any dimension misses its pass line, the model cannot be used for that task, regardless of total score.
- If both models pass all lines and the total score difference Δ is ≤ 3 points, there is no material gap—choose the light model.
- If the difference is between 3 and 8 points, it is a gray zone. Look at which dimension the gap concentrates in, and decide whether to upgrade based on that dimension’s business impact.
- If the difference is greater than 8 points, the gap is material—use the advanced model for that task type.
Statistical noise also matters. If the score difference is smaller than twice the standard deviation across the 3 runs, treat it as noise, add more samples, and re-evaluate.
Two more scoring notes. First, scorer consistency: have two people independently score the same outputs; if their results differ by more than 5%, jointly review the scoring criteria. Second, outlier exclusion: samples that fail for model-independent reasons (platform timeouts, network interruptions) should be recorded separately and excluded from the model score, with the exclusion reason documented.
4. Tiered Routing and Quota Allocation
After scoring, tasks of the same type can be split into two tiers. The light model handles simple tasks; the advanced model handles complex, high-risk, and concurrency-related tasks.
Routing rules can start as plain rules—no need to introduce a classifier model at the beginning, since classification itself consumes quota. Common rules include:
- Input exceeds a set length, or reasoning spans multiple documents → advanced model.
- Tasks involving amounts, permissions, concurrent writes, or transactions → advanced model.
- Extraction tasks with few fields and fixed formats → light model.
The fallback strategy: after the light model outputs, run self-checks first—for example, whether the JSON is valid, fields are complete, and length is within limits. If self-checks fail, escalate to the advanced model, at most once per sample, to avoid compounding costs through repeated retries.
Whether escalation pays off depends on the escalation rate. Let the light model’s per-call quota be c1, the advanced model’s be c2, and the escalation rate be p. The expected cost of tiered routing is c1 + p × c2. Routing is cheaper only when this value is below c2, i.e., when p < 1 − c1/c2. Using the earlier multiplier ratio, with c1 = 1 and c2 = 8, routing still saves quota when the escalation rate is below 87.5%. In practice the escalation rate should be far below this threshold; otherwise use the advanced model directly.
Quota allocation proceeds as follows:
- List all task types and estimate monthly call volume per type.
- Compute the effective cost and weighted total score of each task type under both models.
- For high-risk tasks, secure the advanced model’s share first, then allocate the remaining quota.
- For the remaining tasks, sort by score gain per quota unit and prioritize tasks with the highest gain.
The following decision table can be used directly for model selection:
| Scenario | Recommended Approach | Preconditions |
|---|---|---|
| Simple extraction, fixed format | Light model | Both models pass all lines, score gap ≤ 3 |
| Complex reasoning, concurrent writes | Advanced model | Light model misses a critical pass line |
| Uncertain difficulty | Tiered routing | Escalation rate below break-even, with self-check rules |
| High-risk business | Advanced model plus manual review | Pass lines set to high-risk standards |
5. Prompt Optimization, Caching, and Batch Processing
Prompt optimization must be done separately from model selection. Every prompt change counts as a new version and must be re-tested with the same sample set through the full procedure. Do not tweak and compare at the same time—otherwise you cannot attribute effects to a specific change. Three commonly effective changes: place business rules at the front of the prompt; constrain output format with explicit structure descriptions or a JSON schema; remove duplicate examples to reduce input tokens.
Caching applies when the same system prompt or specification document is sent repeatedly. Before using it, confirm two things: whether cache hits count against quota, and whether a hit is free. If cached content contains sensitive data, evaluate compliance requirements first; do not cache unauthorized data just to save quota.
Batch processing suits non-real-time tasks such as overnight archiving, bulk summarization, and historical data cleanup. Discounts usually come with longer return deadlines, so batch is unsuitable for scenarios where users wait online. Batch results should be compared against online results using the same scoring tables, to avoid misjudging quality because of interface differences.
6. Implementation Checklist and Conclusion
Execution steps:
- Unify the cost basis; confirm billing rules for multipliers, caching, and batch processing.
- Fix inputs, prompts, and parameters; prepare at least 30 samples per task type.
- Run each sample 3 times; record retry counts and manual correction minutes.
- Compute weighted total scores per the scoring tables; make decisions based on pass lines and the quality-gap rules.
- Design routing rules and fallback strategy; compute the escalation break-even point.
- Prioritize per the quota allocation steps; run a small-scale trial for one week.
- Re-run the full test after every model or prompt version change.
Common mistakes include:
- Comparing only unit prices, ignoring retries and manual corrections.
- Running each sample only once, mistaking a lucky result for capability.
- Tweaking prompts while comparing, making results unattributable.
- Missing version information, making conclusions irreproducible weeks later.
- Counting platform failures such as timeouts and network interruptions against the model.
- Applying ordinary-scenario pass lines to high-risk business.
The conclusion: the key to cost judgment is comparing effective cost and quality score in the same table. Use the light model only when it passes all pass lines with a small quality gap. Tiered routing saves quota provided the escalation rate is low enough. It is recommended to run the full process end to end on one task type first, confirm the method works, and then extend it to other tasks.
