A Practical Benchmark of Lightweight Models for Office Workflows

    This article presents a practical framework for evaluating lightweight LLMs in everyday office tasks. Instead of comparing per-token prices, it measures cost per completed task by combining quality, structured-output reliability, latency, and retries. It covers task-set design, metrics, execution controls, key findings, and engineering recommendations such as tiered routing, structured constraints, caching, observability, and fallback strategies.

    1. Background: Why “Cheaper” Doesn’t Always Mean “Cost-Effective”

    When teams introduce large models into daily office workflows, the first thing they usually notice is the price gap in benchmark comparisons. Some lightweight models charge only half the off-peak price—or a quarter of the peak price—of comparable flagship models for input and output tokens. But unit price is only part of the picture. Total cost of ownership is driven by the number of calls, retries, and manual rework required to complete the same batch of tasks.

    The goal of an evaluation, therefore, should not be to crown the “most powerful model.” It should answer three engineering questions:

    • Can lightweight models meet an acceptable quality floor for existing office tasks?
    • Is the cost per task—not the cost per token—actually lower?
    • Do they remain stable under edge conditions such as peak-hour rate limiting, long documents, and structured output?

    2. Evaluation Framework Design

    2.1 Building the Task Set

    Break office scenarios into four categories that can be scored automatically:

    1. Summarization and rewriting: compressing meeting notes, extracting key points from long text;
    2. Structured extraction: contract elements, tabular fields, invoice and form data;
    3. Classification and routing: ticket triage, intent recognition, priority assignment;
    4. Generation and polishing: emails, weekly reports, first drafts of proposals.

    Prepare 50–100 real, anonymized samples per category, and keep both a reference answer and a set of acceptable answers so that valid alternative phrasings are not penalized.

    2.2 Metric Design

    • Quality: field-level precision/recall for extraction tasks; key-point coverage and human ratings for generation tasks;
    • Stability: structured-output parse success rate and format violation rate;
    • Efficiency: time to first token and overall P95 latency;
    • Cost: cost per task = average input tokens × input price + average output tokens × output price + retry cost.

    Illustrative cost calculation:

    1. def task_cost(avg_in, avg_out, price_in, price_out, retry_rate=0.0):
    2. base = avg_in * price_in + avg_out * price_out
    3. return base * (1 + retry_rate) # hidden cost introduced by retries

    2.3 Execution Guidelines

    Use the same prompts, the same temperature setting, and the same context-length limit, and fix randomness. Repeat each task three times and take the median to avoid conclusions distorted by incidental variance.

    3. Key Findings (Abstracted Conclusions)

    1. Lightweight models are usually sufficient for classification, routing, and short summarization, with no obvious quality gap.
    2. Flagship models hold a clearer advantage on very long documents and complex table extraction, but segmentation, retrieval augmentation, and secondary validation can close much of the gap.
    3. Structured-output success rate is a major hidden cost: one parse failure often means one retry or even human intervention.
    4. Peak-hour rate limiting can significantly raise P95 latency, so degradation and queuing strategies are mandatory.

    4. Engineering Recommendations

    • Tiered routing: send simple tasks to lightweight models and escalate complex ones to flagship models;
    • Prioritize structured constraints: constrain output with explicit schema descriptions, then apply server-side validation and automatic repair;
    • Caching and batching: use semantic caching for frequent repeated requests and batch non-real-time tasks;
    • Observability: connect logging and monitoring/alerting services, and track success rate, latency, and cost per task dimension;
    • Elasticity and fallback: configure autoscaling on the container platform, and switch to a backup model or defer execution when rate limited.

    5. Conclusion

    Moving the evaluation from “compare unit prices” to “compare cost per task,” and controlling variance with tiered routing, structured constraints, and observability, allows lightweight models to take on an “infrastructure-like” role in office scenarios. If needed, the evaluation and integration pipeline described above can be built on Baidu AI Cloud using general cloud capabilities such as object storage, message queues, a container platform, logging, and monitoring/alerting.