LLM A/B Evaluation: Methodology Pitfalls and a Practical Guide
Comparing two versions of a large language model is easy to get wrong. This article breaks down why a two-version benchmark can produce misleading results, then rebuilds the evaluation as an engineering process: difficulty-stratified question banks, independent question authoring, statistically sufficient sampling, double-blind subjective scoring, cost-weighted decisions, and reproducible pipelines. Readers will find concrete structures for L1–L4 question tiers, a sample-size formula for repeats, scoring aggregation with weights, and a checklist of common mistakes. The takeaway: most "which model is stronger" debates turn into a more useful question about which version to pick under a given difficulty range and cost constraint, and whether routing or fallback is needed.
1. A Failed Evaluation: Symptoms and Root Causes
A developer compared two versions of a large language model on the same chat platform using the same prompts. The two versions were positioned differently: one targets frontier capability, the other targets high-frequency everyday calls, with roughly a 4x price gap. The setup was 20 questions × 2 versions × 2 repeats = 80 calls, covering six dimensions: reasoning and math, Chinese writing, hallucination honesty, instruction following, code, and information extraction. Objective questions were scored automatically by script; subjective questions were compared manually. The expectation was “the frontier version wins across the board.” The actual result was “almost a tie on whether the answer is correct; the gap shows up in detail and depth.”
The problem was not the models but the evaluation design. The retrospective exposed at least four root causes:
- Question author and test subject shared the same lineage: the questions were generated by one of the models under comparison, so they lacked discriminative power by construction and may carry same-lineage bias.
- Skewed difficulty distribution: the questions were mostly easy, and a ceiling effect pushed both versions near full marks, compressing the difference.
- Too few repeats: 2 samples cannot estimate variance, so a single fluctuation was reported as a stable conclusion.
- Mixed scoring standards: automatic scoring of objective questions and human preference on subjective questions were merged into one narrative, with no shared scale or weighting.
2. Rebuilding the Evaluation Framework: Six Elements You Must Add
2.1 Question Bank Tiering and Difficulty Anchoring
Sort questions by pass rate and make sure every tier has enough samples. A recommended structure:
L1 Basic correctness (expected pass rate > 90%): smoke testing only, not for selectionL2 Discriminative tier (40%~80%): the main battleground for selection, at least 50% of the bankL3 Hard tier (< 40%): probes the ceiling and failure modesL4 Adversarial tier: induces hallucination, overreach, and instruction conflicts
The key action is difficulty calibration: first use a neutral model that is not part of the comparison, or human annotation, to estimate difficulty, and drop questions where everyone scores full marks or everyone scores zero.
2.2 Authoring Independence
The authoring side must be decoupled from the side being tested. Practical options include: human-led authoring; generation by a third-party model that is not part of the evaluation, followed by human review; or adapting question types from public general-capability benchmarks. During authoring, record for each question what it tests, the expected answer shape, and the scoring rule.
2.3 Sampling and Statistical Significance
The number of repeats must be enough to estimate variance. A common engineering rule of thumb:
import mathdef required_repeats(p, margin=0.1, z=1.96):# Sample size approximation for a proportion; p is the expected pass ratereturn math.ceil(z * z * p * (1 - p) / (margin * margin))print(required_repeats(0.5)) # Most conservative when the pass rate is near 0.5
When reporting results, give the mean and a confidence interval, not a single win or loss. If the confidence intervals of the two versions overlap, the correct conclusion is “cannot be distinguished on this question bank,” not “tied.”
2.4 Scoring: Objective First, Double-Blind for Subjective
- Objective questions: script validation, reporting exact match, unit test pass rate, and numeric error bounds.
- Subjective questions: at least two reviewers score blind, report an agreement metric (such as simple agreement rate or a Kappa-style measure), and arbitrate divergent samples.
- Hallucination honesty dimension: design “unanswerable questions” and measure whether the model admits it does not know, rather than whether it fabricates.
Illustrative score aggregation:
weights = {"math": 0.2, "code": 0.25, "zh_writing": 0.15,"faithfulness": 0.2, "instruction": 0.15, "extraction": 0.05}score = sum(weights[k] * metric[k] for k in weights)
2.5 Cost-Weighted Decisions
Evaluation conclusions have to land on cost. Put per-call cost, average output length, and retry rate in the same table:
effective cost = unit price × (1 + retry rate) × average token consumptionvalue for money = overall quality score / effective cost
In many scenarios the everyday version is already sufficient at the L1/L2 tiers, and the frontier version adds gains only at the L3 hard tier. A more sensible architecture is therefore tiered routing: simple requests go to the low-cost version, complex requests escalate to the higher-capability version.
2.6 Reproducibility and Observability
Fix randomness-related parameters, save raw responses, and record version identifiers and timestamps. Wire evaluation results into logging services and monitoring alerts to form a baseline that can be regression-tested continuously. In engineering terms, the evaluation pipeline can run on a container platform, with artifacts written to object storage and a message queue handling scheduling, avoiding the reproducibility problems of one-off scripts. If you use Baidu AI Cloud’s general capabilities, it is also advisable to design around generic categories such as “compute resources + storage + monitoring” rather than binding to a single interface.
3. Checklist of Common Mistakes
- Using “can it get the answer right” instead of “how detailed is it,” ignoring format compliance, boundary conditions, and citation completeness.
- Equating the price gap directly with a quality gap, with no value-for-money dimension.
- Single-reviewer subjective scoring, so preference noise is mistaken for capability difference.
- Testing only the success path, not failure fallbacks or honesty in refusals.
- Never refreshing the question bank, which produces data leakage and overfitted “high scores.”
4. Conclusion
The right way to compare two model versions is to treat evaluation as an engineering process that is statistical, reproducible, and regression-friendly: independent authoring, difficulty tiering, sufficient sampling, double-blind subjective scoring, and cost weighting. Once those are in place, most “which one is stronger” arguments turn into a more practical question: which version to choose under which difficulty range and cost constraint, and whether routing and fallback strategies are needed.
