How to Evaluate and Select LLMs: A Reproducible Testing and Selection Framework

    This article presents a reproducible framework for evaluating and selecting large language models. It covers defining test conditions, five weighted evaluation dimensions, methods for detecting shallow reading of long documents, a results comparison template, scenario-based selection criteria, a multi-model collaboration structure, key risks, and step-by-step reproduction instructions—helping teams produce evaluation reports that others can replicate and use to match models to tasks.

    1. Define the Evaluation Scope First

    Before testing begins, three things must be settled: which tasks to test, which model versions to use, and under what conditions to run them. Model versions change as providers roll out updates, so the same model name may behave differently at different times. Every evaluation report should record the call date and version number.

    Keep the candidate list to three to six models. Too many candidates means each model gets too few samples, making conclusions unstable.

    Runtime parameters must also be fixed. Settings such as temperature, maximum output length, and system prompts should stay consistent across models and be documented in the report.

    2. Five Evaluation Dimensions and Their Weights

    Dimension What It Measures Suggested Weight
    High-level reasoning and planning Whether solution designs are well-structured and logically consistent 25%
    Instruction following and material utilization Coverage of long materials and recall of key information 20%
    Code engineering Cross-file modifications, defect localization, test case generation 25%
    Long-text and knowledge integration Detail recall, cross-chapter association, contradiction detection 15%
    Stability and cost Output consistency, response latency, token consumption per task 15%

    These weights are a default starting point; teams should adjust them to fit their business. For example, a team focused on code delivery might raise the code engineering weight to 35% and reduce the others accordingly.

    Each dimension’s task set should contain at least 30 items covering three scenarios: routine tasks, edge cases, and tasks with distracting information. Tasks should come from real business work—code snippets from internal projects, historical documents, and actual requirements—rather than generic example problems.

    Use a 1-to-5 scoring scale with explicit criteria for each score. Two reviewers score independently; if their scores differ by more than 1 point, they discuss and reach a final score. Run each prompt three times per model and record the mean and standard deviation. A model with an excessively large standard deviation has insufficient output stability and should be penalized in the stability dimension.

    3. Detecting “Shortcut” Behavior

    In long-document scenarios, a model may only sample the content and skip most of it. The detection method is a planted-fact test: embed one unique fact in each of five or more documents—such as a fictional project ID, date, or value—then require the model to cite each one in its output.

    Recall is calculated as: correctly cited planted facts divided by total planted facts. Run the same document set three times on each model and average the results.

    The following prompt can be used as one of the test conditions:

    1. Please read all the materials I provide in full, without skipping any file.
    2. After reading, first outline how each file relates to the task, then describe
    3. the valuable information in each file one by one, and finally integrate this
    4. information into your answer. If a file is irrelevant to the task, explain why.

    Whether this kind of prompt actually works must be determined through a controlled experiment: run the same documents with and without the prompt, and compare recall. Without controlled data, do not assume the prompt improves material utilization.

    4. Results Comparison Table Template

    After scoring, summarize each model’s results in the table below. All data must come from this test run. Leave untested items blank or mark them “not tested”—never fill in estimated values.

    Model Version Test Date Reasoning Score Coding Score Long-Text Score Multimodal Score Cost per Task Key Limitations
    TBD TBD TBD TBD TBD TBD TBD TBD TBD

    “Cost per task” is calculated by multiplying input and output token counts by the provider’s current public pricing, with the price lookup date noted in the report. Prices change, so cost figures from different dates should not be compared directly.

    5. Scenario-Based Selection Checklist

    Selection should start from the task, not from the model. The table below lists evaluation priorities and example switching conditions for common tasks; thresholds must be set by each team based on its own requirements.

    Task Type Priority Dimension Example Switching Condition
    Technical solution design High-level reasoning and planning Proposal rejection rate exceeds the team’s set limit
    Bulk code modification Code engineering Unit test pass rate falls below the current baseline
    Long contract or long report analysis Instruction following and material utilization Planted-fact recall falls below the preset threshold
    High-frequency short request handling Stability and cost Response latency exceeds the service level objective

    Switching conditions should be written down in advance. Without preset thresholds, it is hard to judge whether a model switch is justified.

    6. A Basic Structure for Multi-Model Collaboration

    Multi-model collaboration can be divided into three layers.

    The planning layer handles requirement decomposition, solution design, and result review. Choose models that score high on high-level reasoning for this layer.

    The execution layer handles concrete implementation. Assign code tasks to models with high code engineering scores, and document-intensive tasks to models with high long-text scores.

    The verification layer cross-checks key conclusions. Verification models should ideally come from a different vendor or architecture than the execution models. If the verification model shares its origins with the execution model, the two may make the same mistakes, rendering verification meaningless.

    On the engineering side, use a task queue to orchestrate the call order across models, log the inputs, outputs, latency, and token consumption of every call, and set up failure retry and fallback policies. When a model is unavailable, the system can automatically switch to a backup model while recording the switch event for later review.

    7. Risks and Caveats

    First, evaluation data may already be in a model’s training data. Public benchmarks carry a high risk of having been trained on, so prioritize real internal tasks.

    Second, model versions get updated. Evaluation conclusions have a shelf life; rerun the tests every quarter or after each major provider update.

    Third, scoring involves subjectivity. Dual scoring and unified criteria reduce bias but cannot eliminate it entirely.

    Fourth, cost data changes with pricing. Note the price lookup date in the report and recalculate after any price adjustment.

    Fifth, conclusions from one business domain do not generalize directly to others. A model that performs well on frontend code may not suit backend data processing.

    8. Reproduction Steps

    1. Define the task set and prepare planted-fact documents for long-material testing.
    2. Fix the model versions, temperature, output length, and system prompts.
    3. Run each task three times per model, saving all inputs and outputs.
    4. Have two reviewers score independently against unified criteria, and record how disagreements were resolved.
    5. Aggregate dimension scores, standard deviations, recall rates, and per-task costs into the comparison table.
    6. Use the scenario-based selection checklist to determine the preferred model and switching conditions for each task.
    7. Retest with the same task set every quarter or after version updates, and compare the changes.

    Following this process, a team can produce an evaluation report that others can reproduce, and use it to select the right combination of models for different tasks.