Methodology for Horizontal Benchmarking and LLM Selection Among 76 Models
This article outlines a comprehensive methodology for benchmarking and selecting large language models (LLMs) from a large candidate pool. It details how to define the selection problem based on business constraints, establish a multi-dimensional evaluation framework, and design robust task sets using public, private, and adversarial data. Furthermore, it covers statistical analysis beyond simple averages, building a reproducible and auditable engineering pipeline, translating evaluation results into tiered selection decisions, and implementing continuous regression and governance for long-term model operation.
Methodology for Horizontal Benchmarking and LLM Selection Among 76 Models
When the number of candidate models reaches dozens, the real challenge is no longer “whether a model is available,” but “how to use a reproducible, explainable, and auditable method to categorize candidate models into Tier 1, production-ready, usable baselines, and not recommended.” Relying solely on a single benchmark score or subjective experience often leads to mistaking “good demo effects” for “production-ready.” This article abstracts the original topic into a general technical problem: how to establish a complete methodology from capability evaluation to engineering selection when facing a large-scale candidate model set.
1. Define the Selection Problem Before Benchmarking
The first step in evaluation is not preparing the dataset, but clarifying business goals and constraints. Different scenarios define a “good model” differently: knowledge QA prioritizes factual accuracy and citation consistency; structured extraction focuses on field completeness and format adherence; long-text summarization emphasizes information coverage and faithfulness; conversational systems care about multi-turn consistency and safety boundaries. Therefore, before evaluation begins, a selection problem specification should be formed, including at least:
- Business goals: Whether the task is classification, extraction, generation, reasoning, code assistance, or multi-turn interaction;
- Input distribution: Text length, language, domain, noise level, and whether tables or code are included;
- Output constraints: Format, length, citations, refusal strategies, and sensitive content handling;
- Engineering constraints: Latency limits, concurrency scale, per-call cost, and availability requirements;
- Risk constraints: Data desensitization, audit trails, content security, vendor dependency, and replaceability.
Based on this, candidate models can be divided into several capability tiers: Tier 1 meets production requirements for both overall quality and stability; Tier 2 performs well on specific tasks but has clear boundaries; Tier 3 is a usable baseline suitable for low-risk or offline tasks; Tier 4 is not recommended due to potential quality, stability, or compliance risks. Tiering is not about putting permanent labels on models, but providing decision-making bases for different business scenarios.
2. Establish a Multi-Dimensional Evaluation Framework to Avoid Misleading Single Scores
The most common mistake in large-scale horizontal evaluation is compressing all dimensions into a single total score. Total scores are suitable for initial screening but not for final selection. It is recommended to cover at least the following dimensions and set business weights for each:
- Task Quality: Accuracy, pass rate, field completeness, human preference win rate, faithfulness, and coverage. Quality metrics must be tied to business tasks and cannot be replaced solely by general benchmarks.
- Format & Instruction Following: Whether it stably outputs the specified structure and obeys length, role, refusal, and citation requirements. For production systems, format failure is often more fatal than knowledge errors.
- Robustness: Whether it remains stable against typos, colloquialisms, long-tail inputs, adversarial inputs, and multilingual mixtures.
- Consistency & Reproducibility: Whether results are stable across multiple calls with the same input; whether results remain acceptable under changes in temperature and sampling parameters.
- Latency & Throughput: Focus on P50, P95, and P99 latency rather than just averages; simultaneously record throughput and failure rates under concurrency.
- Cost: Estimate comprehensive cost per thousand requests, per million input/output tokens, after retries and caching, rather than just looking at unit price.
- Security & Compliance: Sensitive information leakage, unauthorized answers, content security, audit trails, and data classification handling capabilities.
- Operability: Error code readability, rate-limiting behavior, timeout performance, version change documentation, and canary/rollback capabilities.
Each dimension should have a clear collection method and judgment criteria. For example, “format adherence” can be automatically judged by a structured validator; “faithfulness” can combine manual spot checks with automated consistency checks; “robustness” can be tested using synonym paraphrasing, noise injection, and long-tail sample construction. Weights should be jointly confirmed by business, R&D, and risk owners, avoiding unilateral decisions by the evaluation team.
3. Task Set Design: Public Benchmarks, Private Business Sets, and Adversarial Sets
The quality of the evaluation set determines the credibility of the conclusions. A three-tier task set is recommended:
- Universal Capability Set: Used for initial screening, covering basic capabilities like language understanding, reasoning, extraction, generation, and multi-turn dialogue to quickly eliminate obvious mismatches.
- Private Business Set: Desensitized samples from real business logs, retaining real input distributions and long-tail patterns. The private set should include gold standard answers, scoring rules, and difficulty labels.
- Adversarial & Boundary Set: Includes noise inputs, ultra-long inputs, format inductions, conflicting instructions, sensitive requests, and refusal scenarios to observe model behavior under boundary conditions.
Task sets require version management, recording sampling strategies, annotation guidelines, difficulty distributions, and update reasons. To prevent data contamination, private business sets should not be publicly distributed; universal sets should also monitor whether candidates might have seen the test samples. Evaluation samples should be stratified by task type, difficulty, and business importance to ensure that even small-sample evaluations cover key scenarios.
A reproducible evaluation record should at least contain the candidate ID, task ID, input hash, output hash, latency, usage, status code, score, and evaluation config version. The pseudocode is as follows:
candidates = load_candidates("candidates.yaml")tasks = load_tasks("tasks.jsonl")for candidate in candidates:for task in tasks:request = build_request(task, candidate)response = invoke_with_retry(candidate, request, timeout, max_retry)record = {"candidate_id": candidate.id,"task_id": task.id,"config_version": evaluation_config.version,"latency_ms": response.latency_ms,"usage": response.usage,"status": response.status,"output_hash": hash(response.text),"score": score_output(task, response.text)}write_jsonl(record)report = aggregate_with_confidence_interval(records, weights)
The functions here are pseudocode; the focus is on complete recording, traceable configuration, and recalculable results.
4. Metric Statistics: Look at Distributions and Significance Beyond Means
In large-scale evaluations, means easily obscure long-tail failures. It is recommended to report means, percentiles, failure rates, and confidence intervals simultaneously. For quality metrics, provide sample size and confidence intervals; for latency metrics, report P50, P95, and P99; for cost metrics, distinguish comprehensive costs after input, output, retries, and caching. If the gap between two candidates is minimal, perform significance tests or increase the sample size to avoid treating random fluctuations as capability differences.
Tiered weighting is also crucial. Weighted scores can be calculated by task type, difficulty, and business weight, outputting multi-dimensional radar charts or decision matrices. The final ranking should retain “raw metrics + weighted metrics + risk flags” rather than just a single rank. For critical businesses, Pareto analysis can be used: among candidate sets meeting latency and cost constraints, find the boundary points for optimal quality or cost.
5. Engineering Pipeline: Reproducible, Auditable, Extensible
The evaluation pipeline should be configurable, parallelized, and equipped with failure retry capabilities. Candidate configurations, task sets, scoring rules, weights, and runtime parameters should all be versioned. Evaluation artifacts can be written to object storage, runtime logs sent to log services, and key metrics connected to monitoring alerts, forming traceable evaluation records. If using Baidu AI Cloud, object storage, log services, and monitoring alerts can serve as general infrastructure to host evaluation artifacts and runtime observations; the specific implementation should remain neutral and not rely on a single vendor’s interface.
The pipeline must also handle rate limiting, timeouts, retries, and desensitization. Retry strategies should distinguish between retryable and non-retryable errors; timeout samples should be tracked separately rather than simply discarded; sensitive inputs must be desensitized before entering evaluation, and original sensitive content should be avoided in logs. Concurrency should be dynamically adjusted based on API rate limits and downstream capacity to prevent evaluation tasks from impacting production traffic.
6. From Evaluation Results to Selection Decisions
Evaluation results should not directly equate to procurement or launch conclusions. A decision process of “threshold filtering + weighted sorting + sensitivity analysis” is recommended:
- Set hard thresholds: Directly eliminate candidates failing safety/compliance standards, falling below format adherence baselines, or having unacceptable P99 latency;
- Apply weighted sorting to candidates passing the thresholds, retaining multi-dimensional results;
- Adjust weights for sensitivity analysis to observe if rankings remain stable;
- Conduct low-traffic canary testing and manual spot checks on top-ranked candidates;
- Form a selection report recording recommended tiers, applicable scenarios, inapplicable scenarios, and rollback plans.
The final output can be: “Tier 1: suitable for core online tasks; Tier 2: suitable for offline batch processing or auxiliary scenarios; Usable baseline: suitable for low-risk experiments; Not recommended: has clear quality or compliance risks.” This tiering is more conducive to engineering implementation than a simple ranking.
7. Continuous Regression and Governance
Model capabilities, pricing, latency, and versions change over time; a single evaluation cannot remain permanently valid. A gold standard regression set should be established, triggered during model version changes, configuration adjustments, or business distribution shifts. Post-launch, monitor quality drift continuously through canary releases, A/B testing, and manual feedback. Retain degradation routing and rollback strategies for critical tasks to avoid single-point dependencies. Evaluation governance should also include access control, result archiving, review records, and periodic retrospectives, upgrading selection decisions from “one-time comparisons” to “continuous operations.”
In summary, when facing dozens of candidate models, the reliable approach is not chasing a single leaderboard, but establishing an evaluation system aligned with business goals: define the problem first, collect multi-dimensional data next, reproduce via engineering, and finally validate with tiering and canary testing. Only by turning evaluation into an auditable engineering process can selection decisions maintain stability and explainability amidst rapid model iterations.
