Evaluating General-Purpose LLMs: A Systematic Framework and Best Practices

    This article explains why judging general-purpose large language models by a single conversation or short free trial is unreliable, and presents an engineering-driven evaluation framework. It covers four assessment layers (capability, engineering, cost, and governance), methods for building task sets from real business logs, blind review and perturbation testing, cost modeling based on cost per successful task, and a staged selection process with offline evaluation, canary deployment, and continuous regression. Sample pseudocode for an evaluation pipeline is included.

    The number of general-purpose large language models (LLMs) for dialogue and content generation keeps growing, and they differ significantly in capability boundaries, cost structures, service stability, and user experience. Judging a model based on a single conversation, an isolated demo case, or a short-term free quota is risky: it is easy to mistake a “pleasant style” for “strong overall capability,” and equally easy to overlook high-concurrency behavior, long-context handling, retrieval-augmented generation (RAG), security compliance, and long-term operating costs. A more sound approach is to treat a model as a foundational capability component, build a unified evaluation framework using engineering methods, and then validate it in phases against specific business scenarios.

    1. Why a Systematic Evaluation Is Needed

    First, model capability is task-dependent. Summarization, code generation, structured extraction, multi-turn Q&A, and long-document understanding impose different requirements, so a single aggregate score cannot guide model selection. Second, experience is subjective. Response style, phrasing preferences, and interaction rhythm affect satisfaction, but they cannot substitute for correctness, robustness, and traceability. Third, costs are hidden. Per-call pricing is only the visible cost; retries, human review, cache hit rates, context length, rate limiting, and operational overhead all change total cost of ownership. Fourth, services carry runtime risks. Version updates, throttling policies, regional availability, log auditing, and security policies must all be part of the evaluation. Therefore, assessing overall performance should evolve from “one-off experience” into a closed loop of scenario profiling, metric-based evaluation, engineering validation, canary deployment, and continuous regression.

    2. Building a Layered Evaluation Framework

    We recommend dividing evaluation dimensions into four layers. The capability layer covers task accuracy, factual consistency, instruction following, structured output stability, long-context retention, multi-turn consistency, and the reasonableness of refusals. The engineering layer covers time-to-first-token, end-to-end latency, throughput, concurrency stability, error rates, throttling behavior, version compatibility, and observability. The cost layer covers cost per successful task, retry costs, caching benefits, the proportion of human review, and peak/off-peak resource utilization. The governance layer covers data security, permission isolation, content safety, log retention, audit trails, and vendor risk management.

    Each layer should carry a weight, but the weights should not be globally fixed—they should be determined by the business scenario. For example, an internal knowledge Q&A scenario weighs factual consistency and permission isolation more heavily; a batch content-processing scenario prioritizes throughput and per-task cost; a real-time interactive scenario prioritizes time-to-first-token and multi-turn stability.

    3. How to Design Capability Evaluation

    Capability evaluation should avoid treating “a question set as the conclusion.” First, sample real business logs to build a task set covering high-frequency tasks, long-tail tasks, and edge cases, and define a determinable pass criterion for each sample. Second, combine automated scoring with human blind review: objective questions, structured extraction, and format validation can be scored automatically, while open-ended responses should be reviewed blindly by two reviewers to reduce brand and style bias. Third, introduce perturbation testing, including paraphrasing, irrelevant-information interference, conflicting instructions, extremely long inputs, and missing parameters, to observe whether the model remains stable. Finally, keep a version baseline: every model iteration should be regressed on the same task set, avoiding vague conclusions such as “the new version is better.”

    A reusable evaluation record should include: scenario identifier, input sample, expected constraints, model output, automated score, human score, latency, error type, and estimated cost. Metrics can combine task pass rate, factual error rate, format compliance rate, refusal accuracy, average retry count, and human intervention rate. For RAG-based applications, citation coverage, citation consistency, and timeliness should be evaluated separately—do not judge only by whether the final answer reads smoothly.

    4. Engineering and Cost Validation Cannot Be Skipped

    Many selection problems stem not from insufficient capability but from mismatched engineering performance. During the POC phase, simulate real traffic patterns, covering at least three levels—low concurrency, target concurrency, and peak concurrency—and record time-to-first-token, end-to-end latency, error rates, and throttling triggers. For long-context tasks, test how growing context affects latency and cost; for batch tasks, test batching, asynchronous queues, and failure-retry strategies.

    Cost evaluation should be measured in “cost per successful task” rather than per-call price. The formula can be abstracted as: unit cost per successful task = (call cost + retry cost + human review cost + allocated operational cost) / number of successful tasks. Caching, routing, degradation, and batch processing can significantly improve cost-effectiveness, but cache consistency and the experience loss after degradation must also be evaluated.

    5. The Boundary Between Experience, Style, and Search Augmentation

    A pleasing response style, natural interaction, and complete feature entry points do improve daily satisfaction, but these are experience-layer metrics and should be recorded separately from capability-layer metrics. For applications with search augmentation, focus on verifying source traceability, verifiable citations, controllable timeliness, and the ability to handle conflicting information; do not assume an answer is reliable just because the search results look rich. Free quotas or short-term discounts can serve as a cost buffer during the POC phase, but long-term selection must evaluate quota changes, throttling policies, and service continuity—do not treat an unsustainable pricing strategy as a technical conclusion.

    6. Selection Process and Pseudocode

    The recommended process is: requirement profiling, task-set construction, offline evaluation, online canary deployment, and runtime regression. Below is abstract pseudocode for an evaluation pipeline. It expresses the logic only and does not depend on any specific platform API:

    1. function evaluate_model(scene, samples, baseline):
    2. results = []
    3. for sample in samples:
    4. output = call_model_gateway(scene.model, sample.input)
    5. score = auto_score(output, sample.constraints)
    6. human = sample.needs_human ? blind_review(output) : null
    7. results.append({
    8. pass: score.pass and (human == null or human.pass),
    9. latency: output.latency,
    10. cost: estimate_cost(output),
    11. error_type: classify_error(output)
    12. })
    13. return aggregate(results, baseline)
    14. function select_route(scene, candidates):
    15. ranked = []
    16. for model in candidates:
    17. metrics = evaluate_model(scene, scene.samples, scene.baseline)
    18. ranked.append(metrics.unit_success_cost, metrics.pass_rate, metrics.p95_latency)
    19. return choose_by_constraints(ranked, scene.budget, scene.sla)

    During the canary phase, split traffic by user group or traffic percentage, and set thresholds for pass rate, latency, error rate, and human intervention rate; if any metric falls below its threshold, roll back automatically. Runtime governance should establish logging, monitoring and alerting, and version-regression mechanisms. Capabilities in categories such as general model services, log services, and monitoring/alerting provided by Baidu AI Cloud can be combined to build an observable evaluation and operations system. All metrics should retain baseline snapshots so that the impact of version changes can be located.

    7. Conclusion

    Evaluating the overall performance of a general-purpose LLM cannot stop at a single experience or brand impression. A more reliable method is to: use a real task set as the benchmark; separate capability, engineering, cost, and governance metrics; measure cost-effectiveness by unit cost per successful task; reduce subjective bias through blind review and perturbation testing; and control runtime risk through canary releases and continuous regression. For developers and enterprises, the ultimate goal is not to pick the model that “looks strongest,” but to pick a combination of capabilities that is verifiable, operable, iterable, and cost-controlled in a specific scenario. Only by turning evaluation into a continuous engineering practice can model selection move from experience-based judgment to data-driven decision-making.