A Methodology for Evaluating and Selecting Large Language Model Versions
This article explains why a new large language model version needs structured evaluation rather than informal spot checks. It introduces eight evaluation dimensions, describes how to build a reproducible test set and scoring rules, provides a basic Python evaluation loop, and shows how to quantify writing quality. The goal is to turn subjective impressions into metrics that can be recorded, compared, and rerun when choosing a model version.
1. Why Version Upgrades Need Systematic Evaluation
After a new version is released, teams often try a few questions and judge by feel whether the model has “improved” or “gotten worse.” This approach has three problems.
First, a single trial is affected by prompt wording, conversation history, and task type, so the conclusions are hard to reproduce.
Second, a person’s impression of the output is easily shaped by the most recent conversation, which introduces bias.
Third, a version update often changes reasoning ability, output format, safety policy, and billing at the same time. Looking at only one of these areas makes it easy to miss the other risks.
Therefore, model selection needs to turn “feelings” into metrics that can be recorded, compared, and rerun.
2. Establishing Evaluation Dimensions
A practical evaluation framework usually covers the following eight dimensions.
- Task correctness: For tasks with reference answers, calculate accuracy. Examples include the field match rate for information extraction, the unit test pass rate for code generation, and the answer agreement rate for math problems.
- Factual consistency: Check whether the output matches the provided material, and measure the share of fabricated information.
- Expression quality: Assess whether conclusions come first, whether terms suit the reader’s background, and whether paragraphs are clear. This usually requires manual scoring against a rubric.
- Instruction adherence: Check whether the model strictly follows constraints on format, word count, field names, and banned words. Rule-based scripts can verify these metrics automatically.
- Long-context ability: Place key information in a long document and measure whether the model can accurately retrieve it.
- Latency and throughput: Record time to first token and total completion time. Track percentiles such as P50 and P95 instead of relying only on averages.
- Unit task cost: Calculate a weighted cost based on input and output token counts, including retries and multi-turn calls.
- Safety false-positive rate and stability: Measure the share of legitimate requests that are wrongly rejected. Run the same input repeatedly to observe how much the output varies.
The weight of each dimension should be set by business needs. Customer service scenarios place more weight on latency and false-positive rate. Report generation places more weight on expression quality and factual consistency.
3. Building an Evaluation Set
The quality of the evaluation set directly determines whether the conclusions are reliable. We recommend the following steps.
Step 1: Sample real requests. Draw user questions from de-identified business logs instead of using only idealized questions written by hand. Real requests are usually longer, more colloquial, and more likely to expose problems.
Step 2: Stratify by category. Divide the samples into four groups: regular requests, edge cases, adversarial requests, and long-text requests. Each group should have at least 50 cases. Key categories can be expanded to 100 or more.
Step 3: Define scoring rules. Rules should be machine-checkable wherever possible. For tasks that cannot be judged automatically, use a scoring rubric. Have two annotators score independently, and calculate an agreement coefficient such as Cohen’s kappa. If agreement is below 0.6, the rubric wording is ambiguous and needs revision.
Step 4: Fix the version. Save the samples, run parameters, and raw results so that each case can be matched item by item during later reruns.
The script below shows the simplest evaluation loop, using keyword hit rate as an example score:
import statisticsfrom dataclasses import dataclass@dataclassclass EvalCase:case_id: strprompt: strexpected_keywords: list[str]category: strdef score_response(response: str, case: EvalCase) -> float:hits = sum(1 for kw in case.expected_keywords if kw in response)return hits / max(len(case.expected_keywords), 1)def run_suite(call_model, model_id: str, cases: list[EvalCase], repeats: int = 3) -> dict:results = {}for case in cases:scores = []for _ in range(repeats):response = call_model(model_id, case.prompt)scores.append(score_response(response, case))results[case.case_id] = {"category": case.category,"mean": statistics.mean(scores),"stdev": statistics.pstdev(scores),}return results
call_model is an adapter function that connects to a specific service. The team implements it according to its own calling method. Running each sample multiple times yields both the mean and the variability. Both serve as selection criteria.
The keyword method is simple to implement, but it only gives a rough signal. For complex tasks, switch to a scoring rubric, or have another model score responses against the rubric. When a model is used as the scorer, calibrate its bias with manual spot checks.
4. Quantifying Expression Quality and Readability
“Easy to read” can also be broken down into items that can be checked:
- Whether the conclusion appears within the first two paragraphs.
- Whether each paragraph discusses only one topic.
- Whether specialized terms are defined the first time they appear and match the reader’s level.
- Whether sentence length is within a readable range, and whether the text contains a large amount of content-free filler.
- Whether the output follows the required structure, such as conclusion first, then reasons, then solution.
Write these rules into a scoring table, with 0 to 2 points for each item. The total gives an expression quality score. This provides a consistent standard for comparing different versions.
Prompts also have a significant effect on output style. A clear description of the reader
