How to Systematically Evaluate and Select General-Purpose Large Language Models

    Evaluating general-purpose Large Language Models (LLMs) for production requires looking beyond isolated benchmarks or single-scenario demos. This article introduces a reusable evaluation framework to help organizations select models based on task distribution, cost constraints, and compliance requirements. It covers distinguishing between exploratory and execution tasks, establishing a four-dimensional metrics system, verifying high-level mathematical proofs, calculating Total Cost of Ownership (TCO) through deployment strategies, implementing multi-model routing, and ensuring continuous regression testing for long-term governance.

    In practical technology selection, evaluating a general-purpose LLM is easily misled by two types of information: single-point benchmarks or subjective experiences, and speed, price, or demo effects in a specific scenario. When deployed in production, the evaluation target is not the isolated capability of the “model itself,” but its “comprehensive performance within the closed-loop of a specific task.” Therefore, the more reasonable question is not “Is it the strongest?” but “Is it stable, verifiable, and operable under my task distribution, cost constraints, and compliance requirements?” Below is a reusable evaluation framework.

    1. Distinguish Exploratory Tasks from Execution Tasks

    The capability differences among LLMs often lie not in simple “strength” but in task type matching. Exploratory tasks include brainstorming, idea divergence, multi-turn rewriting, requirement clarification, and technical route comparison. The core metrics are divergence, context retention, expression diversity, and factual consistency. Execution tasks include code modification, structured extraction, mathematical derivation, configuration generation, and test case completion. The core metrics are instruction following, determinism, verifiability, and error discoverability.

    Many selection disputes arise from mixing these two types of tasks for comparison: a model performing actively in the exploratory stage may not be suitable for low-temperature, long-chain, strong-verification execution tasks; a model stable in the execution stage may be too conservative in open discussions. In practice, separate task sets should be established, with distinct temperatures, context lengths, tool calling strategies, and human review ratios, before aggregating total cost and success rate.

    2. Establish a Four-Dimensional Evaluation Metrics System

    It is recommended to establish metrics from four dimensions: effectiveness, stability, efficiency, and cost.

    • Effectiveness includes task success rate, human scoring, factual error rate, citation consistency, code runnability, and proof checkability.
    • Stability includes multi-sample variance, long-context decay, concurrent error rate, refusal, and out-of-bounds behavior.
    • Efficiency includes first token latency, end-to-end latency, generation speed, and concurrent throughput.
    • Cost includes single-task call cost, retry and human review cost, deployment and O&M cost, and compliance audit cost.

    Metrics must be bound to specific task parameters. For example, “generation speed” should specify sequence length, batch, quantization method, and concurrency; “throughput” should distinguish between requests per second and generated tokens per second. A single throughput number publicly circulated without context usually cannot be directly used for capacity planning. During evaluation, raw logs, random seeds, prompt versions, and scoring rules should be preserved to ensure reproducibility.

    3. Emphasize Verifiability in High-Level Mathematical Proof Scenarios

    Mathematical proof tasks are often used as a proxy for “high-level reasoning,” but they are difficult to evaluate. For propositions lacking public reference proofs, the model might provide seemingly complete derivations, but fail on boundary definitions, implicit conditions, or counterexample checks.

    Effective evaluation should include: constructing private variants or rewriting propositions to reduce the impact of training data contamination; requiring the model to provide definitions, lemmas, proofs, and conclusions step-by-step; using independent checkers or human experts to review key steps; sampling the same proposition multiple times to observe conclusion stability; and recording whether the model fabricates citations or skips key steps.

    We cannot conclude that a model possesses open mathematical problem-solving skills just because a generated result “looks like a textbook.” A more prudent conclusion is: the model can assist in organizing proof ideas, generating drafts, and discovering expression loopholes, but high-risk mathematical conclusions still require expert verification and tool inspection.

    4. Throughput, Deployment Methods, and Total Cost of Ownership

    Production selection must calculate the Total Cost of Ownership (TCO), rather than just looking at the API unit price. Self-deployment may offer data control, elastic scheduling, and long-term cost advantages, but it requires taking on inference service O&M, capacity planning, monitoring and alerting, failover, and model update costs. Managed services are quick to start with and offer good elasticity, but require attention to quotas, rate limits, data residency, and long-term fees.

    In engineering implementation, general capabilities such as the container platform, object storage, logging services, and monitoring/alerting provided by Baidu AI Cloud can be utilized to host inference services, save evaluation sets, and run audits. Capacity assessment should clarify peak concurrency, average sequence length, P95 latency targets, and degradation strategies, and verify them through stress testing, rather than relying on a single peak number advertised by vendors. For high-throughput scenarios, the impact of batching, caching, routing, and asynchronous queues on user experience must also be evaluated.

    5. Multi-Model Routing is More Realistic Than a Single “Omnipotent” Model

    Most enterprises find it difficult to identify a single model that is optimal across all scenarios. A more realistic approach is task routing: exploratory tasks use high-creativity configurations and allow human filtering; execution tasks use low temperatures and strongly constrained prompts, integrated with static checks, unit tests, or proof checkers; high-cost tasks are pre-screened by a smaller model and then reviewed by a stronger model; latency-sensitive tasks have timeouts and degradation set.

    The routing strategy should be configurable, rollbackable, and record the basis for each choice. Below is a pseudocode example of a general evaluation and routing approach:

    1. function evaluate(client, tasks):
    2. records = []
    3. for task in tasks:
    4. start = now()
    5. response = client.generate(
    6. prompt = task.prompt,
    7. temperature = task.temperature,
    8. max_tokens = task.max_tokens
    9. )
    10. latency = now() - start
    11. score = rubric_score(response, task.rubric)
    12. records.append({
    13. task_id: task.id,
    14. latency: latency,
    15. score: score,
    16. cost: estimate_cost(response),
    17. verifiable: run_checker(response, task.checker)
    18. })
    19. return aggregate(records, metrics = [
    20. success_rate, human_score, p95_latency,
    21. cost_per_task, verifier_pass_rate
    22. ])
    23. function route(task):
    24. if task.kind == "ideation":
    25. return {temperature: 0.8, verify: false, review: "human"}
    26. if task.kind in ["code_patch", "math_proof", "structured_extract"]:
    27. return {temperature: 0.1, verify: true, review: "tool_and_human"}
    28. return {temperature: 0.3, verify: true, review: "sampled"}

    6. Governance and Continuous Regression

    Model evaluation is not a one-time task. After going live, failure cases should be continuously collected and attributed by task type: prompt issues, insufficient context, insufficient model capability, tool calling failures, or data pollution. Establish private gold standard sets and regression tests, re-running the scores for every model version, prompt, or routing strategy change. Configure human review, audit logs, rate limiting, degradation, and data masking for high-risk scenarios.

    The final conclusion should return to the business closed-loop: under acceptable cost and risk, has the task success rate improved, has human rework decreased, and has the delivery cycle shortened? There is no scenario where “a specific model is absolutely necessary,” only choices with higher matching degrees to task distribution, engineering constraints, and governance requirements.