Selecting Lightweight Models for Office Scenarios: Cost, Latency, and Multi-Turn Calls

    This article explores the rationale for using lightweight models in office scenarios, emphasizing their role in handling high-frequency, low-complexity tasks to optimize cost and latency. It outlines four key dimensions for model selection—task quality, response latency, unit cost, and tool calling stability—and provides a cost estimation method for single and multi-turn calls. Finally, it introduces a task routing strategy to allocate requests across different model tiers efficiently.

    1. Why Office Scenarios Need Lightweight Models

    Most requests in daily office work are short, such as rewriting a notice, polishing an email, formatting meeting notes into a table, or adding comments to a small code snippet. These tasks do not require deep reasoning but are highly sensitive to response speed. Deeper models with longer reasoning chains result in higher time-to-first-token and overall latency. Making users wait dozens of seconds for a single sentence significantly degrades the experience, making it difficult for the tool to integrate seamlessly into continuous workflows.

    Another scenario involves agentic calls. The model needs to repeatedly read files, invoke tools, and check results, sending the previous context back in each round. For a task involving dozens of tool calls, the cumulative input tokens grow with each turn. Even if the cost per call is low, the total expense multiplies rapidly across rounds. The value of lightweight models here lies in reducing unit costs, making high-frequency, long-chain tasks economically viable.

    Therefore, lightweight models handle high-frequency, low-complexity execution steps, forming the foundational layer of the overall cost structure. High-difficulty judgments, complex planning, and final reviews remain assigned to more capable models. Combining both creates a reasonable cost structure.

    2. Four Dimensions for Model Selection

    When selecting a model, it is recommended to evaluate at least the following four dimensions.

    1. Task Quality: Accuracy, content completeness, and adherence to output formats on the target task.
    2. Response Latency: Time-to-first-token and overall completion time. Interactive scenarios focus more on time-to-first-token, while batch processing focuses on throughput.
    3. Unit Cost: Input, output, and cache hit pricing calculated based on the actual token structure of the task.
    4. Tool Calling Stability: The ability to output parameters in the agreed format and retain prior constraints during multi-turn calls.

    Trade-offs exist among these four dimensions. The highest-quality models typically incur higher latency and cost, while the cheapest models may not reliably complete multi-step tool calls. When selecting a model, first identify the primary bottleneck of the task, then decide which dimension can be compromised.

    3. Cost Estimation: From Single Call to Entire Task

    Many teams only compare list prices, ignoring the actual token structure of their tasks. The cost of a single call can be calculated using the following formula:

    Single Call Cost = (Uncached input tokens × Input price + Cached input tokens × Cache price + Output tokens × Output price) ÷ 1,000,000

    The corresponding sample code is as follows:

    1. def estimate_cost(input_tokens, output_tokens, cached_tokens,
    2. price_in, price_out, price_cache):
    3. """Price unit: per million tokens"""
    4. fresh_in = input_tokens - cached_tokens
    5. return (fresh_in * price_in
    6. + cached_tokens * price_cache
    7. + output_tokens * price_out) / 1_000_000

    The input volume for multi-turn tasks is not fixed. Assuming the input for the i-th turn is roughly the initial context c plus the new content added in the previous i−1 turns, with an increment of d per turn and a total of n turns, the total input volume is approximately n·c + d·n(n−1)/2. As the number of turns increases, the input volume grows quadratically, which is the primary reason for cost overruns in agentic scenarios.

    Prefix caching can significantly reduce the cost of repeated portions. Placing stable system instructions and tool definitions at the beginning of the context can improve cache hit rates. Billing units, caching rules, and peak/off-peak price differences across different services should be verified against their respective official documentation. Estimations should use actual pricing tables rather than speculative numbers.

    4. Task-Level Routing

    Routing all requests to a single model wastes resources and slows down the experience. A more reasonable approach is to add a routing layer at the application frontend to select the appropriate tier based on task characteristics.

    Task Type Typical Characteristics Recommended Tier
    Copywriting rewrite, summarization, format conversion Short input, clear rules, verifiable output Lightweight
    General code modification, table formatting Medium context, requires some reasoning Standard
    Complex planning, multi-constraint decision-making, final review Long chain, high cost of error Flagship
    1. def route(task):
    2. if task.needs_long_reasoning or task.step_count > 20:
    3. return "flagship"
    4. if task.kind in {"rewrite", "summarize", "format"}:
    5. return "light"
    6. return "standard"

    Routing rules should be based on the number of steps, context length, and other relevant task characteristics to ensure optimal resource allocation and user experience.