A Practical Methodology for Reproducible LLM Benchmarking

    This article presents a four-layer framework for running reproducible side-by-side evaluations of large language models: an environment layer with unified access and fixed parameters, a test-case layer covering Chinese writing, code generation, logical reasoning, and long-context or multimodal tasks, a scoring layer that turns subjective impressions into weighted metrics, and an archiving layer supported by common pitfalls to avoid. It includes sample configuration, code, and scoring tables to help readers build a repeatable selection process for their own projects.

    1. Why a Reproducible Benchmarking Process Matters

    Large language models are iterating quickly, with multimodal understanding, very long context, and reasoning capabilities becoming the main focus for most vendors. For developers, the real pain point is not finding models — it is making fair comparisons under identical conditions. Most casual trials produce conclusions that drift, for three main reasons:

    1. Inconsistent prompts: asking about the same capability in different ways can produce differences larger than the differences between the models themselves.
    2. Opaque parameters: mismatched temperature, max output length, and system prompts change both output style and stability.
    3. No archiving: results stay scattered in chat windows, cannot be traced back, and cannot be analyzed statistically.

    So the first step is not picking a model, but fixing the variables. A single evaluation is best split into four layers — environment, test cases, scoring, and archiving — and solidified one layer at a time.

    2. Environment Layer: Unified Access and a Parameter Baseline

    Direct access to vendor APIs can involve network and account barriers in some regions. A common workaround is an aggregated access solution that lets you switch between models inside a single chat interface, reducing environment-induced noise. When choosing an entry point, look at four general capabilities:

    • Multiple models side by side: switch in one interface instead of shuttling context across platforms;
    • File upload: parse text, code, and tabular files to support long-document evaluation;
    • Web search: verify how models handle time-sensitive questions;
    • Traceable calls: export conversation records for later analysis.

    Fix the parameter baseline as follows: use a low temperature (for example 0.2–0.4) for reproducibility, keep max output length uniform, and keep the system prompt either empty or identical across runs. Example configuration:

    1. {
    2. "temperature": 0.3,
    3. "max_output_tokens": 1024,
    4. "system_prompt": "You are a rigorous technical assistant. Answers must state a conclusion and the supporting rationale.",
    5. "stream": false
    6. }

    3. Test-Case Layer: Designing Tasks for Four Core Capabilities

    Test questions should be identical in both content and phrasing, and should cover real working scenarios as much as possible. Prepare at least four groups of cases with 3–5 questions each to avoid drawing conclusions from a single accidental result.

    3.1 Chinese Comprehension and Writing

    Task example: write a short essay of roughly 500 characters on “AI ethics,” with a clear viewpoint and paragraph structure. Scoring ignores rhetoric and looks at three things: whether the thesis is clear, whether the evidence is concrete, and whether the terminology is overly academic. A common pattern in practice: one class of models prefers citing philosophical and policy texts with a more formal register, while another leads with cases and reads more easily. The conclusion should depend on the audience — choose the more readable output for general communication, and the more argument-dense output for research contexts.

    3.2 Code Generation and Debugging

    Task example: write a Python script that scrapes the list of headings from a public page, with exception handling and basic anti-scraping measures. Evaluation dimensions include: whether dependencies are common, whether comments are sufficient, whether exception branches are complete, and whether robustness features such as retries and randomized request headers are present. Example skeleton:

    1. import requests, random, time
    2. from bs4 import BeautifulSoup
    3. HEADERS_POOL = [
    4. {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"},
    5. {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"},
    6. ]
    7. def fetch_titles(url, retries=3):
    8. for i in range(retries):
    9. try:
    10. resp = requests.get(url, headers=random.choice(HEADERS_POOL), timeout=8)
    11. resp.raise_for_status()
    12. soup = BeautifulSoup(resp.text, "html.parser")
    13. return [h.get_text(strip=True) for h in soup.select("h2, h3")]
    14. except requests.RequestException as e:
    15. if i == retries - 1:
    16. raise
    17. time.sleep(2 ** i) # exponential backoff
    18. return []

    During evaluation, record the “first-run success rate” and the “degradation behavior under exception scenarios” — more meaningful than looking at code length alone.

    3.3 Logical Reasoning and Math

    Task example: an inlet pipe fills a pool in 5 hours, an outlet pipe empties it in 8 hours; how long does it take to fill with both open? The standard solution is a net rate of 1/5 − 1/8 = 3/40, so the time required is 40/3 ≈ 13.33 hours. The scoring focus is not the answer itself but whether the modeling process is written out explicitly and whether units and boundary conditions are checked (for example, the net rate must be positive, otherwise the pool never fills). Such questions effectively separate models that “can calculate” from those that “can explain how to calculate.”

    3.4 Long Context and Multimodal

    Upload a long document (such as a report of several dozen pages) and ask cross-section summarization and conflict-identification questions, then observe whether the model misses information in the middle. Then upload a file containing charts to check accuracy in extracting structured information. The key to long-context evaluation is setting “needle” questions: place a critical fact in the middle of the document and see whether the model can hit it reliably.

    4. Scoring Layer: Turning Subjective Impressions into Statistical Metrics

    Use a 1–5 scale with four weighted dimensions: correctness 40%, completeness 25%, readability 20%, robustness 15%. For blind multi-person testing, hide model identifiers, randomize presentation order, use no fewer than 10 participants, and report preference ratios and agreement. Example summary table:

    Dimension Weight Model A Model B
    Correctness 40% 4.2 4.0
    Completeness 25% 3.8 4.1
    Readability 20% 3.6 4.3
    Robustness 15% 4.0 4.2
    Weighted total — 4.02 4.08

    Note that the table above is only a formatting example and does not represent the performance of any real product. A real evaluation should be filled in with your own measured data.

    5. Archiving Layer and Common Pitfalls

    An archive should include the original prompts, parameter configuration, complete outputs, scoring details, evaluation time, and the version of the access entry point. For tooling, general-purpose capabilities are enough: object storage to keep raw records, a logging service to collect call metadata, and monitoring and alerting to track failure rates, forming a closed loop.

    There are four common pitfalls: first, judging longer answers as better while ignoring redundancy; second, running only single-turn tests and ignoring stability; third, ignoring cost and latency, so the evaluation detaches from engineering constraints; fourth, over-generalizing conclusions, treating an advantage in one scenario as an overall lead.

    6. Conclusion

    The value of side-by-side benchmarking is not crowning the “strongest” model, but establishing a reproducible, statistically grounded, traceable decision process. Fix the variables, unify the test cases, quantify the scoring, and archive completely — once these four steps are in place, you get a selection basis that matches your own scenario, whether the work is Chinese writing, engineering code, or complex reasoning. Start with three minimal case groups, expand the question bank over time, and let the results genuinely serve project selection and daily development.