Lightweight LLM Selection for Office Tasks: A Guide to Cost, Latency, and Hands-On Task Testing
This guide explains how to evaluate lightweight large language models for common office work, including meeting minutes, email polishing, form field extraction, policy document Q&A, and weekly report generation. It covers how to break down API billing, define evaluation dimensions for quality, format compliance, latency, stability, and effective cost, build a test set from real business material, run fair comparisons, and turn the results into a selection decision.
1. Why Office Tasks Need Their Own Model Evaluation
Meeting minute summarization, email polishing, form field extraction, policy document Q&A, and weekly report generation are frequent office tasks. These tasks have short pipelines and are sensitive to latency. They usually do not need the strongest reasoning ability, but they do require low call costs and stable output formats. For these scenarios, whether a lightweight model is suitable matters more than its overall score on a flagship leaderboard.
There are two common mistakes in model selection. The first is relying only on public leaderboards. Leaderboards are mostly based on academic or programming tasks, which do not fully match the long context, fixed format constraints, and business terminology of office documents. The second is looking only at unit price. The unit price is just one part of the cost. The total cost of a task also depends on input length, output length, cache hit rate, and the number of retries after failures.
2. Breaking Down the Billing Structure
Most LLM API billing includes the following components:
- Regular input token price: charged by the length of the context submitted to the model.
- Output token price: usually higher than the input price, charged by the length of the generated content.
- Cached input price: when a request prefix matches recent requests, some services charge a lower price for those tokens.
- Time-of-day differences: some services apply different prices or rate limits during peak hours.
Actual prices are listed in each provider’s official documentation. This article only covers general methods for calculating costs and does not list any actual prices.
The cost of a single call can be estimated with the following formula:
Cost = regular input volume × regular input price + cached input volume × cached input price + output volume × output price
The following code shows an example estimate. The prices are illustrative values only:
from dataclasses import dataclass@dataclassclass Pricing:input_per_m: float # Price per million regular input tokenscached_input_per_m: float # Price per million cached input tokensoutput_per_m: float # Price per million output tokensdef estimate_cost(p: Pricing, input_tokens: int, cached_tokens: int, output_tokens: int) -> float:"""input_tokens is the total input volume, including the cached portion."""normal_input = max(input_tokens - cached_tokens, 0)total = (normal_input * p.input_per_m+ cached_tokens * p.cached_input_per_m+ output_tokens * p.output_per_m)return total / 1_000_000if __name__ == "__main__":# Illustrative values only, not actual pricingpricing = Pricing(input_per_m=1.0, cached_input_per_m=0.1, output_per_m=4.0)cost = estimate_cost(pricing, input_tokens=20000, cached_tokens=15000, output_tokens=2000)print(f"Cost per call: {cost:.6f}")
After estimating the cost of one call, multiply it by the average number of daily calls to get a monthly budget. Note that the cache hit rate depends on how requests are structured. If the system prompt and fixed templates appear at the start of each request and stay unchanged, the cache hit rate is usually higher.
3. Defining Evaluation Dimensions
A model selection test should cover the following five dimensions.
- Task quality: extraction accuracy, key point coverage in summaries, and whether facts are preserved in rewritten text.
- Format compliance: whether the output strictly follows the specified structure, such as whether all JSON fields are present and whether tables have the correct number of columns.
- Response latency: time to first token and total completion time. Report P50 and P90 instead of only the average.
- Stability: consistency of results when the same input runs multiple times, plus the rate of timeouts and errors.
- Effective cost: the cost of a single call divided by the task success rate. When failures require retries, the effective cost is noticeably higher than the unit price shown on the bill.
4. Building a Test Set That Reflects Your Business
The quality of the test set directly determines whether the evaluation conclusions are reliable. Build it using the following steps.
- Sample sources: prioritize de-identified real business materials, such as meeting notes, contract clauses, expense claim forms, and weekly reports.
- Sample size: include at least 50 samples for each task type, covering long texts, short texts, and boundary cases with noise.
- Reference answers: write a reference answer or scoring rule for each sample. Extraction tasks can use field-level exact matching. Rewriting and summarization tasks require a scoring rubric.
- Data de-identification: remove names, phone numbers, account numbers, and unpublished business data to make sure the testing process meets data compliance requirements.
5. Setting Up the Evaluation Process
The core of an evaluation is controlling variables. The prompt template, output length limit, sampling temperature, and scoring rules must stay the same across all candidate models. Otherwise, the comparison results are meaningless.
The code below shows a framework for evaluating a single sample. You implement the model call function yourself so you can connect it to different service interfaces:
import jsonimport timefrom statistics import quantilesdef run_case(call_model, prompt: str, expected_fields: list[str]) -> dict:start = time.perf_counter()raw = call_model(prompt)latency = time.perf_counter() - starttry:data = json.loads(raw)format_ok = all(field in data for field in expected_fields)except json.JSONDecodeError:data, format_ok = None, Falsereturn {"latency": latency, "format_ok": format_ok, "data": data}def summarize(results: list[dict]) -> dict:latencies = sorted(r["latency"] for r in results)format_rate = sum(r["format_ok"] for r in results) / len(results)p50 = quantiles(latencies, n=10)[4]p90 = quantiles(latencies, n=10)[8]return {"format_pass_rate": format_rate, "p50_latency": p50, "p90_latency": p90}
When running the evaluation, execute each model on the same set of samples at least three times. This shows the range of variation in the results and prevents randomness from being mistaken for a difference in capability. For accuracy scoring, have two annotators score independently, then calculate an agreement metric. A third reviewer resolves the samples where the annotators disagree.
6. Common Pitfalls When Reading Results
- Too few samples: a gap between a few dozen samples may only be noise. Judge conclusions with confidence intervals.
- Single runs: sampling introduces randomness, so results from one run are not enough to support a decision.
- Context limits: in long document tasks, content beyond the context length is truncated. Report performance on long-text samples separately.
- Unfair prompts: if you tune the prompt for one model only, the comparison loses its basis.
- Cache assumptions: treating the cache hit rate as a fixed value can cause large errors in cost estimates.
7. A Framework for Selection Decisions
After the evaluation, you can classify decisions by task risk and data sensitivity.
- High-frequency, low-risk tasks, such as polishing internal weekly reports: focus on cost and latency. A format compliance rate that meets the target is enough.
- Precise extraction tasks, such as reading fields from expense claim forms: quality carries the most weight. Pair the model with rule-based validation and a retry mechanism for failures.
- Tasks involving sensitive data: first assess where the data is stored, how it is transmitted, and who can access it. Then consider model selection.
When making the decision, first filter the candidate models that meet the minimum requirements for quality and format. Then compare effective cost and latency. This prevents choosing a cheaper model at the expense of reliability in critical tasks.
8. Deployment Recommendations
- Start with a small traffic canary rollout. Observe performance on real business data before expanding gradually.
- Set a reasonable output length limit. This controls cost and reduces latency from excessively long outputs.
- Place a stable system prompt at the beginning of requests to help improve the cache hit rate.
- Set up a monitoring dashboard to track success rate, P90 latency, and cost per task over time.
- Re-evaluate regularly. Model versions and billing rules change, so the conclusions of any single evaluation have a limited shelf life.
9. Summary
The value of a lightweight model for office tasks depends on whether it can complete specific tasks with acceptable quality, stable formatting, and low effective cost. Start model selection from real business needs. Build a test set, fix the evaluation variables, run each model multiple times, and judge the results by combining quality, latency, and cost. Relying only on unit price or only on leaderboard scores rarely leads to a reliable conclusion.
