Methodology for Evaluating Lightweight LLMs and Office Infrastructure Selection

    As vendors release lightweight (Flash-tier) Large Language Models (LLMs) promising low latency and cost for office applications, developers must look beyond unit token prices. This article introduces a comprehensive evaluation framework based on "cost per task" rather than "cost per token." It covers task selection, multi-dimensional scoring (quality, cost, latency, stability), and the Pareto frontier approach for model selection. Furthermore, it highlights strategies to maximize cache hit rates to reduce costs and recommends implementing a routing-based architecture instead of relying on a single model for all enterprise workloads.

    1. Why “Half the Price” Doesn’t Mean “Half the Cost”

    Recently, multiple vendors have launched lightweight (often referred to as Flash-tier) LLMs, focusing on low latency and low cost, targeting high-frequency, light-load scenarios such as daily office work and document processing. Taking a newly released lightweight model as an example, its API pricing is roughly 0.5 RMB per million input tokens and 2 RMB per million output tokens, while cached input costs only about 0.02 RMB. Compared to other cost-effective models on the market, its standard input/output unit price is roughly half of off-peak pricing and a quarter of peak pricing.

    However, as developers, we must be wary of a trap: a low unit price does not equate to a low total cost. The true cost of an LLM is determined by three variables:

    1. Total Cost = Input Tokens × Input Price + Output Tokens × Output Price - Cache Deduction

    The number of tokens required by different models to complete the same task can vary drastically—some models give verbose answers, while others have long reasoning chains that consume massive amounts of implicit thinking tokens. If a “cheap” model requires multiple rounds of follow-up questioning to provide the correct result, its end-to-end cost may actually be higher than that of a more expensive model that answers correctly on the first try. Therefore, the core metric for evaluation should be “cost per task,” not “cost per token.”

    2. Evaluation Framework: From Task Sets to Scoring System

    1. Selecting a Representative Task Set

    Typical workloads in office infrastructure scenarios include: document summarization and polishing, meeting minutes generation, tabular data understanding and extraction, internal knowledge Q&A (RAG retrieval-augmented generation), multilingual translation, and structured information extraction (e.g., extracting fields from contracts and invoices). When designing an evaluation set, several principles should be followed:

    • Close to real traffic: Use desensitized real request samples from production rather than textbook-style questions.
    • Tiered difficulty: Allocate 60% to simple tasks (determining the cost baseline), 30% to medium tasks, and 10% to difficult tasks (exposing capability boundaries).
    • Auto-scoring capability: Prioritize tasks with standard answers or rule-based validation (such as field extraction accuracy and format compliance). For subjective tasks, supplement with manual or LLM-based scoring.

    2. Multi-dimensional Scoring

    It is recommended to cover at least four dimensions:

    1. Quality Score: Task completion accuracy, format compliance rate, and factual consistency (absence of hallucinations).
    2. Cost Score: The actual monetary value of input/output tokens consumed per task.
    3. Latency Score: Time to first token (TTFT) and overall throughput (tokens/s), which are particularly critical for interactive office products.
    4. Stability Score: Error rates under concurrency, rate limiting situations, and capability degradation with long contexts.

    3. Comprehensive Decision: Quality-Cost Pareto Frontier

    Plot each model on a two-dimensional plane of “quality score vs. cost per task.” Only models on the Pareto frontier are candidates. A common conclusion is that lightweight models match flagship models in quality on 80% of daily tasks, but still show a clear gap in complex reasoning and long-chain logic. This directly leads to the implementation architecture in the next section.

    3. Cache Hits: The Underestimated Cost Lever

    The earlier figure of “cached input at 0.02 RMB” is worth exploring—cache pricing is only 4% of the standard input price. In office scenarios, a large number of requests share identical prefixes: system prompts, enterprise knowledge base snippets, and document templates. Cache hit rates can be significantly improved through the following methods:

    • Prefix Stabilization: Place immutable content (system prompts, tool definitions, knowledge base) at the beginning of the prompt, and variable user questions at the end.
    • Request Aggregation and Batching: Aggregate similar requests within a time window.
    • Avoiding Prefix Jitter: Do not place dynamic timestamps, random IDs, or similar fields in the prefix.

    In a typical RAG Q&A system, if 80% of the input tokens can hit the cache, input-side costs can be reduced by more than 70%. This means that when evaluating model pricing, you must perform weighted calculations based on your business’s cache hit potential, rather than simply comparing list prices.

    4. Implementation: Tiered Routing Instead of Betting on a Single Model

    The ultimate output of an evaluation should not be “picking a single winner,” but rather a routing strategy:

    1. def route(task):
    2. if task.complexity == "low": # Summary, translation, formatting
    3. return flash_model
    4. elif task.complexity == "medium": # Knowledge Q&A, extraction
    5. return flash_model_with_rag
    6. else: # Complex reasoning, key decisions
    7. return flagship_model

    From an engineering perspective, a standard API gateway with monitoring and alerting capabilities can be used to uniformly observe the call volume, cost, and error rate across different model tiers. Set up a canary deployment or gray release mechanism to quickly perform regression testing when model versions are updated.

    5. Evaluation Checklist

    1. Define business scenarios and real request distributions.
    2. Build a tiered evaluation set of 200 to 500 items, ensuring over 70% of tasks are auto-scorable.
    3. Record quality, token consumption, latency, and stability data for each candidate model.
    4. Sort by “cost per task” and conduct sensitivity analysis based on cache hit assumptions.
    5. Output a routing strategy and fallback plans, and continuously monitor and run regressions post-launch.

    Conclusion

    The price war among Flash-tier models is a tangible benefit for developers, but rational selection must be built on reproducible evaluation. Unit price is merely the starting point; cost per task, cache utilization, and tiered routing strategies are the true keys to determining the final bill and user experience. Building a solid evaluation system allows you to consistently acquire the most stable “office infrastructure” capabilities at the lowest cost in a market of rapidly iterating models.