Comparing Multiple Models with a Unified Evaluation Framework

    This article explains how to build a unified evaluation framework for comparing large language models under controlled conditions. It covers a common provider-plus-model configuration pattern for connecting multiple models, six fairness switches that must be fixed before a comparison, a three-layer task set design that moves from capability baselines to real business scenarios, execution and data collection practices, and a four-dimensional result analysis that goes beyond pass rate. It also highlights common pitfalls such as data contamination, toolchain drift, survivorship bias, and overfitting, and closes with practical advice for turning evaluation into a repeatable engineering pipeline.

    1. Why a Unified Evaluation Framework Matters

    Large models iterate fast. Within a single week, you may see a base model upgrade, additional post-training, or a change in reasoning settings. Scores published by vendors are hard to reproduce because they depend on prompts, tool permissions, sampling parameters, and the degree of benchmark contamination. What engineering teams actually need is not a verdict on “which model is the strongest,” but evaluation infrastructure they can run repeatedly on their own business data.

    The core value of a unified evaluation framework is reducing variables to one. The model is the only variable; everything else—run mode, reasoning level, toolchain, skills directory, prompts, timeout and retry policy—stays fixed. Only then can differences be attributed to the model itself rather than to environment differences.

    2. A Common Pattern for Connecting Multiple Models

    Mainstream AI coding tools and agent frameworks generally use a two-layer configuration model: provider plus model identifier. Connecting a new model usually involves four steps:

    1. Open the model or provider management page in settings.
    2. Add a provider and select the corresponding API protocol type (usually an OpenAI-style Chat Completions compatible protocol).
    3. Enter the API key and base URL to complete authentication and verify connectivity.
    4. Fetch the available model list. If the target model is too new to be indexed automatically, register the model identifier manually and save.

    Example configuration (field names follow common conventions):

    1. {
    2. "providers": [
    3. {
    4. "id": "custom-provider",
    5. "protocol": "openai-compatible",
    6. "base_url": "https://<your-endpoint>/v1",
    7. "api_key": "${MODEL_API_KEY}",
    8. "models": ["model-a", "model-b", "model-c"]
    9. }
    10. ]
    11. }

    Practical advice: keep keys in environment variables or a secrets management service instead of committing them to the repository. Set an independent timeout and concurrency limit for each model so that rate limiting on a single provider does not stall the entire evaluation round.

    3. Six Switches for Fairness Control

    To make a comparison meaningful, explicitly fix the following settings and put them under version control:

    • Run mode: use standard mode for all models and disable “deep” or “auto” modes that rewrite behavior automatically.
    • Reasoning level: use each model’s default setting without raising the thinking budget.
    • Temperature and sampling: use defaults or fix a low temperature to ensure reproducibility.
    • Tool permissions: open the skills directory, web search, and document lookup to all parties equally.
    • Context and turns: apply the same maximum turn count and context window limit.
    • Failure handling: keep timeout, retry, and error reporting policies identical.

    If any one of these is inconsistent, the conclusions lose explanatory power. A common approach is to pin the configuration in YAML:

    1. run:
    2. mode: standard
    3. max_turns: 40
    4. temperature: default
    5. timeout_seconds: 600
    6. tools:
    7. skills_dir: ./skills
    8. web_search: true
    9. doc_lookup: true

    4. Task Set Design: From Toy Problems to Business Problems

    The evaluation set determines how usable the conclusions are. A three-layer structure is recommended.

    The first layer is a capability baseline covering general tasks such as code generation, refactoring, defect localization, cross-file understanding, and long-document summarization. It quickly filters out obviously unsuitable candidates.

    The second layer is tool-use capability. It focuses on whether a model proactively searches, whether it cites documents, whether it asks clarifying questions when information is insufficient, and how it recovers after a tool call fails. This layer often predicts the real user experience better than pure generation ability.

    The third layer is business scenario tasks drawn from the team’s real repositories and tickets, including legacy system modernization, log troubleshooting, and API migration. Scoring relies on automatically verifiable criteria: unit test pass rate, number of static analysis warnings, whether the build succeeds, and semantic correctness confirmed by manual spot checks.

    5. Execution and Data Collection

    The principle is no manual intervention throughout, but observability is essential. Each run should record the task identifier, model identifier, configuration hash, start and end time, token consumption, tool call sequence, final artifacts, and failure reasons. Logs go to a centralized logging service, metrics feed into the monitoring and alerting system, and artifacts are stored in object storage for traceability and secondary analysis.

    1. # Pseudocode: batch execution and result archiving
    2. for task in tasks/*.yaml; do
    3. for model in model-a model-b model-c; do
    4. run_agent --config eval.yaml --task "$task" --model "$model" \
    5. --report "reports/$(basename "$task" .yaml)-$model.json"
    6. done
    7. done

    6. Result Analysis: Look Beyond Pass Rate

    A single pass rate hides cost differences. A four-dimensional view is recommended: effectiveness (pass rate, rework rate), efficiency (elapsed time, number of turns), cost (tokens and number of calls), and stability (variance across repeated runs of the same task). A model with high variance carries more production risk, even with an attractive average score.

    Also distinguish “model capability” from “prompt fit.” A model that performs better under your own prompt style may simply be a style match rather than an absolute capability advantage. A sensitivity test with slight prompt rewrites can show whether the ranking flips.

    7. Common Pitfalls

    Data contamination is the most hidden problem. Public benchmarks may already be in the training corpus, so keep a private task set. Toolchain drift is next: skill version upgrades make historical results incomparable, so pin versions. Survivorship bias also matters—counting only tasks that finished overestimates capability, and failed tasks must be included in the denominator. Finally, avoid excessive tuning. Optimizing separately for one model breaks fairness, so tuning should happen only after model selection is settled.

    8. Implementation Advice

    Make evaluation a pipeline: a configuration commit triggers a regression round, and results are shown on a dashboard as trends rather than single snapshots. Update the business task set every quarter to keep difficulty aligned with the business. Capture conclusions in a selection matrix that defines the default and fallback models for different scenarios. If you use cloud resources, a container platform can handle concurrent execution, object storage can archive artifacts, and the logging and monitoring system can track stability—turning evaluation from a one-off activity into a sustainable engineering capability.