Unified LLM Evaluation Across Providers: A Step-by-Step Guide to Reproducible Results
This guide explains how to run a reproducible evaluation of multiple large language models from different providers. It covers defining scope, setting up the environment, configuring providers and API keys securely, mapping model IDs, fixing inference parameters, and designing evaluation dimensions with task examples.
Models from different providers often differ in deployment method, API format, and default inference parameters. If each model is tested by hand in its own console, the results mostly reflect differences in default settings rather than the models’ actual capabilities. A unified evaluation framework can fix the access method, inference parameters, and scoring process, which makes comparisons more trustworthy. This article explains, in the order you would run them, how to complete a reproducible multi-model evaluation.
1. Define Evaluation Goals and Scope
A unified framework controls only a limited set of variables. It can standardize task scheduling, context management, and metric calculation, but it cannot remove every residual difference. Examples include server load fluctuations, silent model updates, and bias in the scorer itself. Before you start, write down three things: which models you will compare, the question you want the results to answer (for example, “Which model is better suited to code completion?”), and how long the conclusion remains valid. Record model version numbers and the evaluation date. Without them, the results cannot be checked again a few months later.
2. Set Up the Environment
Run the evaluation in an isolated virtual environment or container, and record the following information:
| Item | What to record | Example |
|---|---|---|
| Evaluation framework | Name and version number | Version 1.x of the framework you use |
| Runtime environment | Python version and operating system | Python 3.11, Ubuntu 22.04 |
| Models under test | Provider, model ID, and verification date | model-x-2026-10 from provider_a |
| Scorer | Human or auxiliary model, and version number | Scoring model v2 |
3. Configure Providers and Manage API Keys
Each provider needs an endpoint, an authentication method, and concurrency settings. The configuration file stores only the names of environment variables, never the keys themselves:
{"providers": [{"name": "provider_a","base_url": "https://api.provider-a.example.com/v1","api_key_env": "PROVIDER_A_API_KEY","auth_header": "Authorization: Bearer","timeout_seconds": 60,"max_retries": 2,"max_concurrency": 4}]}
Follow these key management practices:
- Keep keys only in environment variables or a key management service. Never include plaintext keys in the code repository or evaluation scripts.
- Use a separate key for each provider, with least-privilege permissions and a monthly quota.
- Rotate keys regularly, and revoke the old key immediately after rotation.
- Log only the last four characters of a key. Never log complete request headers.
- Do not include real user data or internal sensitive information in evaluation data.
To keep quota differences from affecting results, use the same concurrency limit and timeout for every provider in a given evaluation round. Record the values that were actually applied.
4. Map Model IDs and Add Models Manually
The framework’s automatic sync may not recognize newly released models. Follow this sequence: first try to sync the model list. If the target model does not appear, add it manually. After adding it, send one minimal request to confirm that it works. A manually added model configuration looks like this:
{"models": [{"provider": "provider_a","model_id": "model-x-2026-10","display_name": "Model X","verified_at": "2026-11-20","notes": "Not returned by the list endpoint, added manually"}]}
The model_id must match the provider’s documentation exactly. Copy and paste it rather than typing it by hand. Common errors and troubleshooting steps are below:
| Symptom | Common cause | Troubleshooting step |
|---|---|---|
| Model unavailable or 404 | Mismatch in model ID spelling, capitalization, or version suffix | Copy the ID from the provider’s documentation |
| Invalid request or 400 | Parameter name or value does not fit that provider’s API | Send one request with curl and compare it with the official example |
| 401 or 403 | Invalid or expired key, or missing model permission | Check that the environment variable is set, and confirm permissions |
| 429 | Concurrency or quota limit exceeded | Lower max_concurrency, and increase the retry interval |
| Request timeout | Output is too long, or the network is unstable | Increase timeout_seconds, and check max_tokens |
5. Unify Inference Parameters
Providers differ in which parameters they support and in their default values, so you cannot rely on default settings. For each evaluation round, set the following parameters explicitly and save them as a snapshot file:
| Parameter | Recommended value | Notes |
|---|---|---|
| temperature | 0 or 0.2 | Reduces randomness and supports reproducibility. State this in the report. |
| top_p | 1.0 | Adjust only one of temperature and top_p to avoid compounding effects. |
| max_tokens | 2048 | Use the same value for all models. Flag truncated outputs separately. |
| stop | Set uniformly for each task | Prevents output from continuing into unrelated content. |
| system prompt | Same text for all models, stored in a file | Use identical content for every model. |
| seed | Fix it when supported, and record it when not | Some providers do not offer this parameter. |
| Retry policy | Up to 2 retries | Record retry results separately from first-attempt results. |
If a model does not support temperature=0, use the lowest value that the model accepts in the same range, and state the difference in the report. If the conclusions are sensitive to parameters, run the evaluation twice with two parameter sets. When both sets reach the same conclusion, the result is more reliable. When they do not, the report must state the parameter conditions the conclusion depends on. Prompt tuning also needs a fixed budget. Give every model the same number of tuning attempts, and report that number separately.
6. Evaluation Dimensions and Task Examples
Each dimension needs concrete tasks, metrics, and sample sizes. Listing only general directions cannot produce comparable results.
1. Knowledge Q&A and Fact Verification
Example: Explain the difference between max-age in Cache-Control and Expires in HTTP caching.
Metrics: factual correctness (0 to 2 points), information completeness (0 to 2 points), and knowledge boundary statement (0 to 1 point, awarded when the model acknowledges uncertainty).
Sample size: per subject area.
