Model Selection in Practice: Assigning Models by Task for Office Agents

    This article provides a practical framework for selecting and assigning LLMs to different office agent tasks, covering task-based model tiers, pre-deployment benchmarking, enterprise permission configuration, an intent-routing middleware design, and common pitfalls to avoid.

    Why Fixed Three Tiers Are Not Enough

    Office platforms have traditionally offered three model tiers: “standard,” “advanced,” and “flagship.” This simplifies choice, but users often struggle to decide which tier fits a given task. Calling a flagship model for simple text classification noticeably increases token costs, while using a lightweight model for complex long-document generation may produce unstable output quality. Once multiple models are exposed, the selection problem shifts from “which tier” to “which model is best for this type of task.”

    Selection Criteria for Three Task Categories

    Task Type Typical Examples Task Characteristics Recommended Tier Main Evaluation Metrics
    Complex planning Architecture design, multi-step project decomposition, resource scheduling Many constraints, uncertain intermediate steps Flagship model Plan executability rate, constraint satisfaction rate
    Rule-based analysis Contract clause review, financial compliance checks High information density, output must follow fixed templates Professional mid-size model Clause recognition accuracy, format compliance rate
    High-frequency lightweight Copy polishing, meeting minutes, email classification, information extraction High concurrency, latency-sensitive Lightweight model Time-to-first-token, per-call cost, success rate under high concurrency

    Complex planning tasks benefit from step-by-step generation. Let the model first produce a runnable plan, then revise it section by section based on user feedback. This makes it easier to pinpoint issues than generating a long text in one pass. Such models are expensive to invoke, so reserve them for requests that genuinely require multi-step reasoning.

    Rule-based analysis tasks rely on a well-structured system prompt that clearly defines the role, rules, and output format. Write the rules as a numbered list and require the model to provide a reasoning basis for each judgment, which facilitates manual review.

    High-frequency lightweight tasks are typically bottlenecked by concurrency and latency. Note that when setting retries, each retry increases the actual call count and therefore the cost.

    Benchmark Before Choosing a Model

    Vendor page prices and advertised speeds are only reference points. Before finalizing a model, follow these steps:

    1. Sample 50 to 100 examples from real business scenarios, covering both simple and difficult cases.
    2. Run each sample against every candidate model, keeping the prompt, temperature, and output format identical.
    3. Record three metrics: manual or rule-based scores, the P95 end-to-end latency, and token usage per task.
    4. Calculate costs according to the platform’s billing method, not by word count—different models tokenize text differently.
    5. Estimate monthly cost as “per-task cost × monthly task volume” and compare it against quality scores.

    Enterprise Permission Configuration Steps

    Administrators can configure model permissions in the following order. The exact menu names depend on the platform console you use.

    1. Establish department, user group, and member mappings according to the organizational structure.
    2. Bind an allowed model list to each user group. Models not listed are disabled by default.
    3. Set a monthly token budget and alert threshold per group.
    4. For departments handling sensitive data, only expose models that have passed internal compliance review.
    5. Enable call auditing. Log retention period should comply with enterprise compliance requirements.

    Example permission configuration (values are illustrative only):

    1. role: finance_analyst
    2. members_group: finance-dept
    3. allowed_models:
    4. - analysis-medium
    5. denied_models:
    6. - flagship-*
    7. monthly_token_budget: 20000000 # example value
    8. alert_threshold: 0.8
    9. data_scope: internal_only

    The audit log should at least include the following fields:

    Field Description
    request_id Unique request identifier for troubleshooting
    user_id, dept_id Caller and department
    model_id, model_version Actual model and version used
    input_tokens, output_tokens For cost allocation
    latency_ms End-to-end latency
    status, error_code Success, timeout, or rejection
    data_classification Sensitivity label of the requested data
    timestamp Call time, using a unified timezone

    Do not write plaintext sensitive fields such as ID numbers or bank card numbers into logs. Mask them before writing.

    Intent Routing Middleware

    Before calling a model, the agent uses a lightweight classifier to detect the task type, then dispatches the request based on a routing policy. The following pseudocode illustrates this:

    1. ROUTE_POLICY = {
    2. "complex_plan": {"model": "flagship", "timeout_s": 120, "retries": 1, "fallback": "analysis"},
    3. "rule_analysis": {"model": "analysis", "timeout_s": 60, "retries": 2, "fallback": "light"},
    4. "light_task": {"model": "light", "timeout_s": 15, "retries": 2, "fallback": None},
    5. }
    6. def route(request):
    7. label, confidence = classify_intent(request.text) # lightweight model classification
    8. if confidence < 0.7:
    9. label = "rule_analysis" # for low confidence, use the middle tier to avoid misusing flagship
    10. return call_with_fallback(ROUTE_POLICY[label], request)
    11. def call_with_fallback(policy, request):
    12. for _ in range(policy["retries"] + 1):
    13. try:
    14. return call_model(policy["model"], request, timeout=policy["timeout_s"])
    15. except (TimeoutError, RateLimitError):
    16. continue
    17. if policy["fallback"]:
    18. result = call_model(policy["fallback"], request, timeout=policy["timeout_s"])
    19. result.meta["degraded"] = True # mark degraded result
    20. return result
    21. raise ServiceUnavailable("all attempts failed")

    Policy parameters and how to adjust them:

    Parameter Meaning Suggested Starting Value Adjustment Basis
    confidence threshold How to handle classifications below this confidence 0.7 Calibrate against misclassification rate on a validation set
    timeout_s Timeout for a single call 15s for lightweight, 120s for flagship Loosen based on measured P95 latency
    retries Number of retries after failure 1–2 Retries count toward cost
    fallback Degradation target Flagship → professional, professional → lightweight Degraded results must indicate the actual model used

    After degradation, the output should clearly state which model was used so users can judge the reliability of the result.

    Common Mistakes

    • Setting the routing threshold too low lets many simple requests hit the flagship model, increasing overall cost. Sample and review the call distribution per tier weekly.
    • Having no upper bound on retries. When rate limiting occurs, request volume multiplies.
    • Comparing only unit price without comparing task completion rate. A model with a lower price but requiring manual rework twice may have a higher total cost.
    • Estimating tokens by word count, which does not match the bill. Always use the usage fields returned by the platform.

    Launch Checklist

    • Each task category has test samples and pass criteria.
    • Each user group has a model whitelist and monthly budget.
    • Logs include model version, token usage, and masked request identifiers.
    • The routing policy has a version number, and sampled A/B comparisons are done before and after changes.
    • Degraded results are clearly marked.