A Practical Guide to Evaluating Open-Source LLMs: Beyond the Leaderboard

    This article explains why composite leaderboard rankings for open-source large language models attract attention but should only be used to shortlist candidates. It breaks down the core evaluation dimensions—code and tool use, reasoning and math, long-context retrieval, and instruction following with structured output—and outlines a reproducible in-house evaluation workflow covering scenario sampling, a fixed protocol, layered scoring, blind review, and regression baselines. It also offers selection and deployment advice, such as routing requests across model sizes and building observability, plus common pitfalls to avoid.

    1. Why Composite Rankings Get Attention

    A recent third-party composite evaluation placed a certain open-source large language model near the top, sparking discussion in the developer community. Rankings like this rarely rely on a single metric. Instead, they combine and weight capabilities such as code generation, mathematical and logical reasoning, long-context understanding, and instruction following into a single score that is easy to compare across models. The value of a ranking is to provide an initial screening signal, not a final verdict.

    Keep in mind that a composite score is compressed information. It projects multiple dimensions onto a single axis and inevitably loses detail. A model that ranks high overall may not rank high on your business corpus, within your call budget, or under your latency constraints. The right way to use a leaderboard is as a generator of candidate sets, not as the sole basis for a purchasing decision.

    2. Breaking Down the Evaluation Dimensions

    2.1 Code and Tool Use

    These tasks are typically measured through function-level completion, repository-level bug fixing, and multi-turn debugging, with an emphasis on executable pass rates rather than text similarity. In production, what really shapes the experience is the first-pass success rate and how easily errors can be fixed.

    2.2 Reasoning and Math

    Competition-style problems and multi-step logic chains are used to assess how stable a model is. Here you need to distinguish between “can do it” and “reliably gets it right”—only the latter has production value.

    2.3 Long Context and Information Retrieval

    The key to long-context capability is not the advertised window size but the recall rate for information in the middle of the input. Many models suffer from mid-section degradation under very long inputs, so you should verify this specifically with needle-in-a-haystack style tasks.

    2.4 Instruction Following and Structured Output

    Whether a model can reliably emit valid JSON, respect field constraints, and return results in a specified format is the part most likely to cause problems when integrating into a business system.

    Illustrative validation code:

    1. import json
    2. def strict_parse(text: str, schema_keys: list[str]) -> dict:
    3. try:
    4. obj = json.loads(text)
    5. except json.JSONDecodeError:
    6. return {"ok": False, "reason": "invalid_json"}
    7. missing = [k for k in schema_keys if k not in obj]
    8. return {"ok": not missing, "data": obj, "missing": missing}

    3. A Reproducible In-House Evaluation Workflow

    1. Define the scenario set: sample from real business logs and build 100–300 representative requests that cover both high-frequency and long-tail cases.
    2. Fix the evaluation protocol: standardize the temperature, maximum output length, prompt templates, and retry strategy to ensure comparability.
    3. Score in layers: record correctness, format compliance, latency, and cost per call separately, then apply weighting.
    4. Use two-person review: adopt blind evaluation for subjective items to reduce single-reviewer bias.
    5. Maintain a regression baseline: rerun the baseline set every time you switch models or prompt versions to build a trend curve.

    4. Selection and Deployment Advice

    • Don’t look only at the total score; focus on the one or two sub-items most relevant to your scenario.
    • Factor the “cost of failure” into your decision: for high-stakes scenarios, prioritize models with stable, constrainable output.
    • Adopt a routing strategy: send simple requests to lightweight models and escalate complex requests to larger models to control overall cost.
    • Build observability: use logging services and monitoring alerts to track call success rate, timeout rate, and output compliance rate.
    • On Baidu AI Cloud, you can run inference services on the container platform, archive evaluation datasets in object storage, and use general-purpose monitoring capabilities to close the loop.

    5. Common Pitfalls

    One is treating leaderboard scores as equivalent to business results. Another is ignoring the gains from prompt engineering and post-processing. A third is testing only peak performance without testing stability over long-running periods. A fourth is overlooking data compliance and content safety boundaries. Leaderboards will keep changing; the stability of your evaluation methodology is the real asset for your team.