LLM Selection and Evaluation for Office and Development Workloads
This article explains how to choose large language models by task scenario rather than by generic rankings. It outlines capability requirements for UI, backend engineering, daily office and content, and deep research tasks; presents a reproducible evaluation framework with scoring dimensions and a sample script; and shows how evaluation results can inform model routing, fallback, human review, and data-exposure controls.
1. Why Model Selection Should Be Scenario-Based
Office and R&D tasks differ substantially. A model that performs reliably when generating frontend pages may be overly verbose when summarizing meeting notes. A model that excels at multi-file backend refactoring may not be suitable for low-cost batch document processing. Therefore, the question “Which model is strongest?” is not precise enough. A more useful question is: on a specific type of task, which model can achieve the required quality at an acceptable cost?
Before selecting a model, break business tasks into several categories and evaluate each category separately.
2. Capability Requirements for Typical Scenarios
2.1 UI and Interaction Tasks
These tasks include frontend page generation, component encapsulation, data visualization, and small interactive prototypes. The core requirements are understanding layout specifications, style constraints, and browser behavior, while maintaining structural consistency across multiple rounds of modification. During evaluation, focus on whether the generated code can run directly, whether the visual result matches the design, and whether modification instructions accidentally change unrelated parts.
2.2 Engineering Backend Tasks
These tasks include API development, data access layer implementation, business rule implementation, and cross-file refactoring. They place higher demands on context length, code repository understanding, and testing awareness. The model needs to understand the call relationships among existing modules, and the generated changes should pass existing tests and follow the project’s error handling and logging conventions.
2.3 Daily Office and Content Tasks
These tasks include information retrieval and organization, summary writing, email and report polishing, and tabular data summarization. They involve frequent calls and short outputs per call, making them more sensitive to cost and response speed. The key metrics are factual accuracy, format adherence, and stability during batch processing.
2.4 Deep Research Tasks
These tasks require comparing materials from multiple sources, synthesizing conclusions, and citing references. They place higher demands on long-text understanding and completeness of the reasoning chain. Cited sources still require manual review; sources provided by the model cannot be accepted directly.
3. Build a Reproducible Evaluation Framework
Whether evaluation conclusions are reliable depends on whether the task set reflects real work and whether scoring criteria are consistent. The following steps are recommended.
- Sample from real tickets, requirements documents, and historical tasks. Use no fewer than 30 samples per task type, and retain anonymized original inputs.
- Write automatable acceptance conditions for each sample, such as tests passing, format validation passing, and key fields being present.
- For content that cannot be judged automatically, use two-person blind review. Hide model identities before scoring.
- Fix the prompt template, sampling temperature, and maximum output length so that different models are compared under the same conditions.
- Run each sample at least three times and record fluctuations in pass rate.
3.1 Scoring Dimensions
Scoring should cover the following five dimensions:
- Correctness: Whether the result meets the acceptance conditions.
- Completeness: Whether key points in the requirements are missing.
- Latency: Time to first token and total completion time.
- Unit cost: Average cost of completing one task.
- Stability: Consistency of results across multiple runs and whether the model can recover after a failure.
3.2 Example Evaluation Script
The code below provides a skeleton for the evaluation workflow. call_model is implemented by the caller and is responsible for connecting to the specific model service.
import statisticsimport timedef run_case(call_model, model_id, case):"""Run a single case and return pass status, latency, and output length."""start = time.perf_counter()output = call_model(model_id, case["prompt"])elapsed = time.perf_counter() - startpassed = all(check(output) for check in case["checks"])return {"passed": passed, "latency": elapsed, "chars": len(output)}def evaluate(call_model, model_id, cases, repeat=3):results = []for case in cases:for _ in range(repeat):results.append(run_case(call_model, model_id, case))pass_rate = sum(r["passed"] for r in results) / len(results)median_latency = statistics.median(r["latency"] for r in results)return {"pass_rate": round(pass_rate, 3),"median_latency_s": round(median_latency, 2),}
run_case only cares about the input, output, and acceptance functions, so switching models does not require changing the evaluation logic. The checks list for each sample is defined by the task owner, for example “unit tests pass” or “JSON fields are complete.”
4. Interpreting Results
- With small sample sizes, differences in pass rate may come from random variation. A difference of only a few percentage points between two models is not enough to draw a conclusion.
- A single metric can be misleading. The model with the highest pass rate may also have the highest cost; combine results with unit cost to calculate the average cost per passed task.
- Prompts have a strong impact on results. If a model performs well only under a specific phrasing, state that premise in the conclusion rather than giving a blanket ranking.
- Evaluation results are time-sensitive. After a model version update, key samples should be rerun.
5. Forming a Model Routing Strategy
After evaluation, conclusions can be translated into routing rules:
- Route by task: Use more capable models for UI and engineering tasks, and lower-cost models for batch office tasks.
- Set fallbacks: When the primary model times out or its output fails format validation, automatically switch to a backup model.
- Keep human review: Externally published content, production environment code, and data changes must be manually confirmed.
- Control data exposure: For tasks involving sensitive data, send only necessary fields and confirm the provider’s data retention policy.
After routing rules go live, sample and retest monthly, and record changes in pass rate and cost for each task type so that routing boundaries can be adjusted in time.
