Evaluating LLM Office Tools: A Quantitative Framework for Latency, Quality, and Cost

    Comparing AI office assistants by subscription price or leaderboard rank leads to poor choices: real cost differences hide in per-model multipliers, and general benchmarks don't predict performance on structured, constraint-heavy office work. This article lays out a reproducible, task-level evaluation framework built on three dimensions—delivery quality, latency, and resource consumption. It shows how to control inputs, validate outputs automatically, measure latency with percentiles, and compute cost per accepted delivery, then applies the method to two worked examples: long-form sourced writing and cross-format calendar-plus-notice generation. It also provides an engineering pipeline with structured task specs and a platform-agnostic adapter, plus a checklist for turning results into tiered routing, caching, and quota strategies.

    1. The Selection Problem: Why Subscription Price and Leaderboards Aren’t Enough

    1.1 Once prices converge, differences hide in multipliers and tiers

    Most mainstream AI office assistants today use a two-layer pricing structure: a subscription fee plus a per-model multiplier or credit system. Base subscription prices often differ by only a dollar or two; the real cost variable is the multiplier attached to each model—more capable models carry higher multipliers, so a single task consumes more credits. Some platforms also offer limited-time low-multiplier promotions for newly added models, making it common for “the same task” to consume resources that differ by an order of magnitude.

    This leads to two conclusions:

    • Comparing products by subscription price tells you almost nothing;
    • Single-run credit consumption can’t be compared head-to-head—you have to convert it into “the cost consumed per accepted, usable deliverable.”

    1.2 The extrapolation risk of leaderboard scores

    General capability leaderboards measure average performance on standardized problems, but the core constraints of office work are entirely different: long-form documents need structural consistency and traceable facts; spreadsheets need correct row/column semantics and accurate formatting marks; official documents need strict word-count and wording constraints. A model that leads on a reasoning leaderboard isn’t guaranteed to reliably pass a multi-constraint structured task like “given a public notice, generate a full-year calendar workbook with a summary sheet.”

    1.3 The three dimensions of task-level evaluation

    An actionable evaluation revolves around just three dimensions: delivery quality (is it usable as-is), latency (is it acceptable), and resource consumption (is it worth it). The three constrain one another; any single-point optimum may only be a local optimum, so they must be weighed together in one table.

    2. Controlling Variables: Making Two Runs Truly Comparable

    The most common evaluation mistake is that “the conclusion actually comes from the variables.” To ensure comparability, you need to fix at least four kinds of input.

    2.1 Fix the input materials and their versions

    Put reference materials (public notices, raw data, reference sets) under version control and record content hashes. Use materials with the same hash across different rounds of the same task; otherwise “model differences” and “material differences” can’t be separated.

    1. import hashlib, pathlib
    2. def material_fingerprint(path: pathlib.Path) -> str:
    3. h = hashlib.sha256()
    4. with path.open("rb") as f:
    5. for chunk in iter(lambda: f.read(1 << 20), b""):
    6. h.update(chunk)
    7. return h.hexdigest()[:16]

    2.2 Fix the deliverable constraints (output contract)

    Write “what you want” as a structured contract rather than adjectives scattered through a prompt. The contract is used both for generation and for automated validation.

    2.3 Fix sampling parameters and prompt versions

    Temperature, maximum output length, and whether web retrieval is enabled all significantly change results. Prompts must carry version numbers (e.g., prompt/calendar@v3) and be checked into the code repository.

    2.4 Record minimum reproducible metadata

    Each run should record at least: task ID, model identifier and tier, multiplier, prompt version, material hash, start and end time, total elapsed time, first-segment response time, credit consumption, and output file paths. Miss any one of these and any after-the-fact attribution is guesswork.

    3. The Metrics System: Turning “Feels Good to Use” into Numbers

    3.1 Delivery quality: automated validation first, human review as backup

    Break quality into two layers:

    Layer What’s checked How it’s judged
    Hard constraints Word-count range, number of paragraphs/sections, sheet names, required columns, cell fill colors, formula correctness Programmatic, binary pass/fail
    Soft quality Factual accuracy, source verifiability, instruction adherence, language readability, visual formatting 1–5 review score, or “model review + sampled human review”

    Hard constraints are the key filter. Whether an office deliverable is “usable” or “not usable” often comes down to hard constraints: a calendar missing a sheet, a make-up workday without a color marker, a notice exceeding the 300-character cap—any of these forces rework.

    3.2 Latency: use percentiles instead of a single point

    Single-run latency varies widely with queuing, network, and output length. Run the same task at least 3–5 times, report P50 and P90, and record first-segment latency separately—it drives the interactive feel, while total duration is mostly determined by output length.

    3.3 Consumption: from “how much was spent” to “cost per accepted delivery”

    This is the most overlooked and most valuable step in the whole method:

    1. Cost per accepted delivery (CPD) = total credit consumption / number of deliverables that pass hard-constraint validation

    If a model runs 5 times and passes validation 3 times, its real cost isn’t 1× the single-run consumption but roughly 1.67×. A model with a low price and a high-multiplier discount that only passes half the time will have its cost advantage largely erased.

    3.4 Composite score

    First set a latency threshold (SLO), then compare the quality-to-cost ratio within that threshold:

    1. If P90 latency > SLO: judged not applicable to this task
    2. Otherwise Score = Q_hard_pass × (0.6·Q_soft + 0.4·Q_style) / CPD_norm

    Here CPD_norm is the unit cost normalized against a baseline model. The formula’s meaning is straightforward: at an acceptable speed, whoever delivers a directly usable result for less money wins.

    4. Evaluation Design for Two Typical Office Tasks

    4.1 Task A: Long-form structured writing (with sources)

    Task: Write a ~5,000-word technical profile that connects a full arc—from education and entrepreneurship to the evolution of a technical approach and its industry impact—and list sources at the end.

    Hard-constraint checks:

    • Body word count falls in the 4,500–6,000 range;
    • No fewer than 5 sections, covering the five semantic slots “early life / founding / technical approach / industry impact / references”;
    • The number of reference entries corresponds to the in-text citation markers (no ground-truth verification, only traceability).

    Soft quality focuses on two points: whether the timeline has obvious misalignments, and whether key facts come with clickable sources. The most common failure mode in long-form tasks isn’t “not long enough” but “long yet with drifting facts and vague citations.”

    4.2 Task B: Cross-format document generation (spreadsheet + official notice)

    Task: Given a public holiday notice, generate a full-year calendar workbook and attach an internal notice.

    Requirements (the original prompt is itself a dense set of hard constraints, ideal as a validation baseline):

    1. Lay out the full year on a standard two-day-weekend schedule;
    2. Mark holiday dates with one fill color and make-up workdays (weekend days worked to compensate) with another; the two must not be confused;
    3. Note the holiday name for each month;
    4. Additionally generate a “holiday and make-up workday summary sheet” with fields such as date, type, and number of days;
    5. Separately write an internal company notice within 300 characters, clearly labeled as an example compiled from the public notice.

    This single prompt stress-tests four capabilities at once—spreadsheet generation, format constraints, cross-sheet consistency, and official-document writing—making it an excellent evaluation sample. The corresponding automated validation can read the output directly:

    1. from openpyxl import load_workbook
    2. HOLIDAY = "FFFFC7CE" # Example: holiday marker color
    3. WORKDAY = "FFC6EFCE" # Example: make-up workday marker color
    4. def validate_calendar(path: str, summary_sheet: str = "汇总表") -> dict:
    5. wb = load_workbook(path)
    6. result = {"sheets": wb.sheetnames}
    7. # 1) Summary sheet exists and contains required columns
    8. if summary_sheet not in wb.sheetnames:
    9. result["summary_ok"] = False
    10. return result
    11. header = [c.value for c in wb[summary_sheet][1]]
    12. result["summary_ok"] = all(
    13. any(k in str(h) for h in header if h) for k in ("日期", "类型", "天数")
    14. )
    15. # 2) Both marker colors appear and are never mixed
    16. seen = set()
    17. conflict = 0
    18. for ws in wb.worksheets:
    19. for row in ws.iter_rows():
    20. for cell in row:
    21. rgb = cell.fill.start_color.rgb
    22. if rgb in (HOLIDAY, WORKDAY):
    23. seen.add(rgb)
    24. if isinstance(cell.value, str) and "上班" in cell.value and rgb == HOLIDAY:
    25. conflict += 1
    26. result["colors_ok"] = {HOLIDAY, WORKDAY}.issubset(seen) and conflict == 0
    27. return result

    The official-notice side can be validated just as mechanically: the word-count cap, the presence of an “example” disclaimer, and the absence of absolute-promise language.

    1. import re
    2. from docx import Document
    3. def validate_notice(path: str, limit: int = 300) -> dict:
    4. text = "\n".join(p.text for p in Document(path).paragraphs if p.text.strip())
    5. return {
    6. "char_count": len(re.sub(r"\s", "", text)),
    7. "within_limit": len(re.sub(r"\s", "", text)) <= limit,
    8. "has_disclaimer": "示例" in text,
    9. }

    4.3 How to read the results (illustrative data, for demonstrating the method only)

    Suppose a pilot round produced the following illustrative records:

    Task Model tier P50 latency Hard-constraint pass rate Per-run credit consumption Cost per accepted delivery
    A long-form writing Low-multiplier general model ~3 min 4/5 Near zero (limited-time low multiplier) Very low
    A long-form writing High-multiplier flagship model ~4 min 5/5 Medium Medium
    B calendar + notice Low-multiplier general model ~5 min 3/5 Low Medium
    B calendar + notice High-multiplier flagship model ~7 min 5/5 High Relatively high

    Three general patterns can be drawn from this illustrative data:

    • Latency and quality aren’t monotonically related: in the long-form task, the faster side isn’t necessarily lower quality, because total duration is mainly determined by output length;
    • Pass rate is the denominator of cost: in Task B, the low-multiplier model’s advantage is significantly offset by its rework rate—exactly the mistake of “looking only at single-run consumption”;
    • Tier should follow task constraints: use low-multiplier models for tasks with fewer constraints and higher fault tolerance; use high-multiplier models for tasks dense with hard constraints and complex formats—the total account is often cheaper.

    5. Engineering the Evaluation Pipeline

    5.1 Describe tasks with a structured spec

    1. task_id: calendar_2027
    2. prompt_ref: prompt/calendar@v3
    3. materials:
    4. - name: public_notice.md
    5. sha256_16: 9f2c1ab7d3e45f60
    6. output_contract:
    7. workbook:
    8. sheets: [全年日历, 汇总表]
    9. required_columns: [日期, 类型, 天数]
    10. fill_colors: {holiday: FFFFC7CE, workday: FFC6EFCE}
    11. notice_doc:
    12. max_chars: 300
    13. must_contain: [示例]
    14. slos:
    15. p90_latency_sec: 480
    16. repeats: 5

    5.2 Adapter layer: don’t bind the evaluation code to one platform

    Abstract “model invocation” into a unified interface that emits uniform trace records. Only then can you compare capabilities from different sources under the same validators:

    1. import time, json, hashlib
    2. from dataclasses import dataclass, asdict
    3. @dataclass
    4. class RunTrace:
    5. task_id: str
    6. model_tag: str # e.g. general-small / flagship-large
    7. multiplier: float # multiplier for this model tier
    8. prompt_ref: str
    9. material_hash: str
    10. latency_sec: float
    11. first_token_sec: float | None
    12. quota_cost: float
    13. artifacts: list[str]
    14. def run_once(adapter, spec: dict, material_hash: str) -> RunTrace:
    15. t0 = time.perf_counter()
    16. result = adapter.generate(prompt_ref=spec["prompt_ref"],
    17. material_hash=material_hash,
    18. contract=spec["output_contract"])
    19. trace = RunTrace(
    20. task_id=spec["task_id"],
    21. model_tag=result.model_tag,
    22. multiplier=result.multiplier,
    23. prompt_ref=spec["prompt_ref"],
    24. material_hash=material_hash,
    25. latency_sec=round(time.perf_counter() - t0, 2),
    26. first_token_sec=result.first_token_sec,
    27. quota_cost=result.quota_cost,
    28. artifacts=result.artifact_paths,
    29. )
    30. return trace

    5.3 Aggregation: compute the “cost per accepted delivery”

    1. from collections import defaultdict
    2. def summarize(traces, passed: dict[str, bool]) -> list[dict]:
    3. """traces: list[RunTrace]; passed: run_id -> whether it passed hard constraints"""
    4. agg = defaultdict(lambda: {"runs": 0, "pass": 0, "cost": 0.0, "lat": []})
    5. for i, t in enumerate(traces):
    6. key = (t.task_id, t.model_tag)
    7. a = agg[key]
    8. a["runs"] += 1
    9. a["pass"] += int(passed.get(f"{t.task_id}#{i}", False))
    10. a["cost"] += t.quota_cost
    11. a["lat"].append(t.latency_sec)
    12. rows = []
    13. for (task, model), a in agg.items():
    14. lat = sorted(a["lat"])
    15. p50 = lat[len(lat) // 2]
    16. p90 = lat[min(len(lat) - 1, int(len(lat) * 0.9))]
    17. cpd = a["cost"] / a["pass"] if a["pass"] else float("inf")
    18. rows.append({
    19. "task": task, "model": model,
    20. "pass_rate": round(a["pass"] / a["runs"], 2),
    21. "p50_sec": p50, "p90_sec": p90,
    22. "cost_per_accepted": round(cpd, 3),
    23. })
    24. return sorted(rows, key=lambda r: (r["pass_rate"] == 0, r["cost_per_accepted"]))

    If this pipeline is to run long-term within a team, it can be built entirely on the general capabilities of any mainstream cloud platform—use object storage to archive input materials and output artifacts for reproducibility, a message queue to smooth the queuing of batch evaluation tasks, and log services with monitoring alerts to track latency and quota-consumption curves. Platforms such as Baidu AI Cloud provide exactly this class of general cloud-infrastructure capability, and the choice of provider doesn’t affect the applicability of the evaluation method above.

    6. Turning Evaluation Conclusions into a Cost Strategy

    Evaluation isn’t a one-off activity; its output should directly drive three things.

    Tiered routing. Build a mapping table by task-constraint strength: information extraction, format cleanup, and summarization/rewriting go to low-multiplier tiers; deep long-form writing, multi-sheet linkage, and strict format constraints go to high tiers. The routing rules themselves should also be evaluated—validate with a small-sample regression set before launch to confirm the routing is correct.

    Caching and prefix reuse. Office materials (policy documents, historical reports, public notices) are highly repetitive. Pin the invariant long prefix as a prefix cache, and cache outputs by “material hash + prompt version.” This usually cuts both latency and consumption at once.

    Quota and observability. Treat “credit consumption” as a first-class monitoring metric: set quotas and alert thresholds by project, by task type, and by model tier, and set expiry reminders for limited-time low-multiplier promotions to avoid an unnoticed cost-structure shift when the promotion ends.

    7. Implementation Checklist

    1. Build a regression set of 5–10 tasks covering long-form writing, spreadsheet generation, official-document writing, and information extraction, each with a written output contract;
    2. Put all materials and prompts under version control with recorded hashes;
    3. Run each task 3–5 times per candidate model tier, reporting P50/P90 and the hard-constraint pass rate;
    4. Compare head-to-head using “cost per accepted delivery” rather than “single-run consumption”;
    5. Set a latency SLO as an admission threshold, then select within it by quality-to-cost ratio;
    6. Roll out tiered routing, prefix and output caching, and quota/alert management;
    7. Re-test once per quarter with the same regression set—model tiers, multipliers, and promotions all change, and yesterday’s conclusion is usually valid for only one quarter.

    The core of this method is a single sentence: break “which one is easier to use” into hard constraints that can be judged automatically, latency percentiles that can be measured statistically, and a unit delivery cost that can be normalized—and selection turns from a subjective experience into a reproducible engineering decision.