Evaluating Large Language Models: A Methodology for Comparing Overall Capability

    This article presents a practical methodology for evaluating the overall capability of mainstream large language models. It explains why searching for a single global ranking is misleading, since model capability is a multi-dimensional vector and each model performs differently across tasks. The article defines six core evaluation dimensions, outlines a reproducible three-layer test set design, and provides troubleshooting steps for common performance degradation. It also covers general cost-control practices and scenario-based selection advice, helping teams make data-driven model choices.

    1. The Core Problem: Why “Which Model Is the Best” Is the Wrong Question

    In engineering practice, the most common mistake when evaluating the overall performance of multiple large language models is looking for a global ranking. The reality is that model capability is a multi-dimensional vector, and different tasks vary greatly in their sensitivity to each dimension. A model that leads in code completion does not necessarily perform as well in long-document summarization, creative writing, or multi-turn tool calling. The right approach is to define the scenario first, then define the metrics, and only then compare.

    Another easily overlooked fact is that the same model may behave inconsistently at different points in time. Changes to server-side inference configuration, context length strategy, safety filtering strength, and rate limiting or fallback mechanisms can all alter the perceived experience. Therefore, any evaluation conclusion must include a timestamp and version constraints; otherwise, it is not reproducible.

    2. Six Core Evaluation Dimensions and Metric Definitions

    It is recommended to break the evaluation into the following dimensions, each with a quantifiable or verifiable判定 method:

    1. Stability and consistency: When the same prompt is called repeatedly, is the output structure stable, and does format drift occur? Does instruction forgetting appear in long conversations?
    2. Code and structured reasoning: Can it generate runnable code, explain design trade-offs, and locate defects within a given context? Does it proactively point out performance and boundary risks?
    3. Creativity and style control: Under specified style, length, and person constraints, is the text readable and distinctive, or does it degrade into templated expression?
    4. Multimodal and input robustness: What is the information extraction accuracy and anti-interference capability for mixed text-and-image layouts, table screenshots, scanned documents, and similar inputs?
    5. Tool calling and ecosystem integration: Are function call parameters valid? What is the multi-step task orchestration capability, and how well does it support failure retries and idempotent design?
    6. Cost and engineering constraints: Cost per call, latency distribution (focus on P95/P99 rather than the mean), concurrency quotas, and observability of logs and monitoring.

    3. Designing a Reproducible Test Set

    The credibility of an evaluation depends on the test set. A three-layer sample structure is recommended:

    • Baseline layer: General Q&A and summarization, used for quick regression.
    • Scenario layer: Real desensitized samples that fit your own business, such as ticket classification, log attribution, and contract key-point extraction.
    • Stress layer: Extremely long contexts, heavily noisy inputs, and multi-turn tool orchestration, used to expose degradation issues.

    Each layer should contain no fewer than 50 samples, and each sample should have a unique identifier and an expected判定 rule. Scoring uses a dual track of “automated validation + manual spot checks”: items that can be judged by rules (such as whether JSON is parseable or whether code passes unit tests) are handled by programs, while subjective items are assigned to blind human review, and the review must hide the model source.

    A sample evaluation skeleton is shown below:

    1. # Pseudocode: unified multi-dimensional evaluation skeleton
    2. cases = load_cases("baseline") + load_cases("scene") + load_cases("stress")
    3. def run(model_client, case):
    4. resp = model_client.chat(case.prompt, temperature=0)
    5. return {
    6. "case_id": case.id,
    7. "json_ok": try_parse_json(resp),
    8. "unit_pass": run_tests(resp) if case.has_code else None,
    9. "latency_ms": resp.latency_ms,
    10. "tokens": resp.usage.total_tokens,
    11. }
    12. report = {}
    13. for name, client in clients.items():
    14. rows = [run(client, c) for c in cases]
    15. report[name] = {
    16. "json_ok_rate": mean(r["json_ok"] for r in rows),
    17. "code_pass_rate": mean([r["unit_pass"] for r in rows if r["unit_pass"] is not None]),
    18. "p95_latency": percentile([r["latency_ms"] for r in rows], 95),
    19. "avg_cost": mean(r["tokens"] for r in rows) * unit_price,
    20. }

    4. Troubleshooting Common Degradation

    When the subjective experience shows that a model has become “dumber” or “lazier,” rule out engineering-side causes first before attributing the issue to the model itself. A typical troubleshooting order:

    1. Is the context being truncated? Check whether the number of historical turns or retrieved fragments has decreased.
    2. Have sampling parameters been adjusted on the platform side? Check temperature, maximum output length, and thinking budget.
    3. Has the tool calling chain changed? Check the available function set, authentication method, and quota policy.
    4. Have billing and permission policies changed? For example, whether a third-party integration has shifted from subscription coverage to pay-as-you-go billing, causing calls to be rate limited or rejected.
    5. Account and risk-control policies: Temporary bans triggered by anomaly判定 usually manifest as sudden 401/403 errors, with behavior returning to normal after recovery.

    Feeding the above signals into a logging service and monitoring alerts can surface problems before users notice them. Key metrics include error code distribution, P95 latency, average tool calls per task, and the edit/read ratio.

    5. General Cost-Control Practices

    Cost should not be measured by unit price alone, but by the “total cost of completing a unit of work.” Actionable strategies include tiered routing (simple requests go to small-parameter models, complex requests go to large-parameter models), prompt and context compression, result caching and semantic caching, batching and asynchronous queues for peak shaving, and setting timeouts and retry limits for long tasks. Example:

    1. def route(task):
    2. if task.complexity == "low":
    3. return small_model
    4. return large_model if task.needs_reasoning else mid_model

    6. Conclusion and Selection Recommendations

    The conclusion of a comprehensive evaluation should be scenario-based: if you pursue well-rounded general capability with no obvious weak spots, choose a balanced all-around solution; if the focus is on code and long-context understanding, choose a solution that stands out in code and reasoning; if the focus is creative writing, examine style control closely. From an engineering standpoint, the more robust path is to build an abstraction layer that unifies model invocation, routing, rate limiting, and logging, keeping replacement costs manageable. For multi-model integration and unified governance scenarios like this, Baidu AI Cloud typically supports teams through a combination of general capabilities such as model services, container platforms, logging services, and monitoring alerts, making it easier to continuously calibrate selection conclusions in a data-driven way.