Selecting and Evaluating Fast Models for AI Agent Workflows
In AI agent systems, a single user request often triggers multiple model calls. While main models handle planning and complex reasoning, many auxiliary tasks do not require heavy inference. Relying solely on flagship models can lead to increased end-to-end latency, frequent rate limits, and unpredictable costs. This article explores how to evaluate and select faster, more cost-effective models for auxiliary tasks in agent systems, providing a comprehensive framework that balances speed, cost, and capability based on real-world business data.
1. Why Focus on Fast Models?
In AI agent systems, a single user request typically triggers multiple model calls. The main model is responsible for planning and complex reasoning, but many stages do not require top-tier reasoning capabilities, such as intent classification, parameter extraction, summarization of tool return results, conversation title generation, and initial screening of web or interface content. These stages are called frequently, have short individual durations, yet accumulate significant latency and cost.
If all calls use the same large language model, the system often faces three problems. First, end-to-end latency increases, extending user wait times. Second, account quotas or rate limits are more easily triggered, especially when multiple agents are running in parallel. Third, costs become difficult to predict because the number of calls multiplies with task complexity. Therefore, many teams are beginning to tier models by responsibility, selecting faster and cheaper models for auxiliary stages while reserving the main model for key decisions.
The value of a fast model lies not in a single metric, but in whether it can significantly improve the efficiency of the entire chain within an acceptable range of quality degradation. When selecting a model, you must consider speed, cost, and capability simultaneously—all three are indispensable.
2. Three Categories of Requirements for Models in Agent Scenarios
1. Response Speed
Response speed is typically measured by two metrics. Time to First Token (TTFT) refers to the time elapsed from sending a request to receiving the first output chunk, which determines the “start responding” speed perceived by the user. Generation throughput (Tokens per Second) refers to the number of tokens generated per second during the output phase, determining the completion time for long texts.
For agents, the importance of these two metrics varies by stage. Short output tasks like tool call parameter extraction focus more on TTFT, while long summarization or code generation rely more on throughput. During evaluation, both metrics should be recorded separately. Do not just look at a single average value; pay attention to percentiles, such as the 95th percentile latency, because tail latency is often the primary source of timeouts and stutters.
2. Cost
Model billing is usually calculated separately for input and output tokens, and some services have separate pricing for cache hits, long contexts, or specific features. Therefore, a lower unit price does not necessarily mean a lower total cost. For tasks with longer outputs, the output unit price has a greater impact; in scenarios with long contexts and repeated calls, the input unit price and caching strategy are more critical.
3. Capability
Capability refers to the model’s completion quality on the target task, including result accuracy, format adherence, tool call accuracy, and stability in multi-step tasks. Fast models are generally weaker than flagship models in the same series, but in specific tasks, optimized small-to-medium models may perform closely or equally. Capability assessment must be based on your own business data, not just general benchmark rankings.
3. Understanding Common Model Concepts
When reading model introductions, several concepts frequently appear. Understanding them helps determine which scenarios a model is suited for.
Mixture of Experts (MoE) is a common architecture. The model contains a massive number of parameters, but only activates a portion of the expert networks during each forward pass. Therefore, the total parameter count is different from the parameters actually involved in a single inference. Total parameters determine model capacity, while activated parameters are closer to the baseline of inference cost and speed. When reading parameter scales, pay attention to both numbers.
Native Multimodal means the model learns representations of text, images, and other modalities simultaneously during training, rather than converting images to text via an external vision module before processing. For agents that need to understand interface screenshots, charts, or document layouts, native multimodality usually reduces information loss, but the final effect still requires actual testing.
Context Window refers to the maximum input length a model can process in a single request. A larger window can accommodate more history, documents, and tool outputs, but a long context also brings higher latency and cost. In practice, context trimming and summarization should be applied, rather than blindly stuffing everything into the request.
Reasoning Intensity Levels refer to some models supporting the adjustment of thinking depth. Lower levels offer faster responses and lower costs, suitable for simple judgments; higher levels consume more reasoning tokens, suitable for complex planning and math or code tasks. A practical approach is to fix a default level for each task type and only upgrade after a failure, avoiding the use of the highest level for all requests.
4. Establish Your Own Evaluation Process
1. Build a Business Evaluation Set
The evaluation set is the foundation of model selection. It is recommended to extract 200 to 500 samples from real business logs, covering main scenarios and common edge cases. Each sample should include the input, expected output or scoring criteria, and difficulty labels should be applied where possible. The evaluation set needs regular updates because business distributions change with product iterations.
For agent tasks, evaluation should not only look at the final text but also check intermediate steps, such as whether the tool name is correct, whether parameters are complete, and whether it stops calling when necessary. You can define a set of automatically verifiable checks for each sample, supplemented by manual spot checks.
2. Measure Latency and Throughput
Below is a general latency measurement example using a streaming interface to record time to first token and total time. Here, call_model_stream is a placeholder function that should be replaced with the actual client used by your team.
import timeimport statisticsdef measure_latency(prompts, call_model_stream):first_token_times = []total_times = []for prompt in prompts:start = time.perf_counter()first_token_at = Nonetoken_count = 0for chunk in call_model_stream(prompt):if first_token_at is None:first_token_at = time.perf_counter()token_count += 1end = time.perf_counter()if first_token_at is not None:first_token_times.append(first_token_at - start)total_times.append(end - start)p95 = statistics.quantiles(first_token_times, n=20)[18]return {"ttft_avg": statistics.mean(first_token_times),"ttft_p95": p95,"total_avg": statistics.mean(total_times),}
Note a few points during measurement. Tests should be conducted under network environments and concurrency levels similar to production, otherwise the results lack reference value. Each sample should be repeated multiple times to eliminate occasional fluctuations. Different models should be tested alternately within the same time period to reduce time-related biases.
3. Cost Estimation
The cost of a single call can be estimated using the following formula:
Single Cost = Input Token Count × Input Unit Price + Output Token Count × Output Unit Price
The total cost of the agent must also be multiplied by the average number of calls per task. For example, if a task includes five auxiliary calls, with an average of 3,000 input tokens and 300 output tokens per call, the auxiliary model cost for that task is the sum of the five calls. Placing this estimate into the monthly request volume yields a budget comparison for different schemes.
When estimating, include retries, failed requests, and cache hit situations, otherwise the results will be overly optimistic.
4. Quality Assessment and Regression
Quality assessment should use both automated checks and manual reviews. Automated checks are suitable for formats, field integrity, and tool parameter validation; manual reviews are suitable for semantic accuracy and expression quality. After every model replacement or version upgrade, a full regression test must be run to confirm that key scenarios have not degraded.
5. Division of Labor Between Main and Auxiliary Models
In practice, a more robust approach is to adopt a tiered architecture. The main model is responsible for global planning, complex reasoning, and final responses, while auxiliary models handle high-frequency, low-complexity subtasks. The boundary of this division should be determined by evaluation data, not by gut feeling.
Here are several types of tasks suitable for fast models:
- Intent recognition and routing, determining which processing flow a request should enter
- Structured extraction of tool return content, such as extracting fields from web text
- Rolling summarization of long conversations to control context length
- Initial description of interface screenshots to provide status information for subsequent steps
- Generation of short texts like titles and tags
The following tasks typically still need to be handled by the main model: multi-step planning, judgments requiring strict logic, confirmation of high-risk operations, and key user-facing replies.
6. Case Study: Determining Interface State from Screenshots
A typical use of multimodal capabilities in agents is determining the current state of a screen. For example, automated testing programs need to confirm whether a pop-up has appeared, whether a button is clickable, or whether a form was submitted successfully. Traditional methods rely on control trees or fixed coordinates, which incur high maintenance costs after interface redesigns. With multimodal models, you can input the screenshot and task description together, letting the model output a structured judgment.
In implementation, a two-step approach can be adopted. In the first step, a fast model quickly classifies the screenshot, such as “loading,” “error prompt,” or “normal page.” In the second step, only when the classification result is uncertain or at a critical node is a stronger model called for detailed analysis. This controls latency while ensuring the reliability of critical judgments.
The output should use a fixed structured format, such as a JSON object containing status labels, confidence, and explanatory basis, making it easy for subsequent programs to parse. The prompt should clearly specify the range of selectable labels to reduce inconsistencies caused by the model’s free play.
7. Implementation Considerations
- Quotas and Rate Limiting: When running multiple agents in parallel, set independent concurrency limits and backoff strategies for each model type to prevent a single stage from exhausting the quota.
- Fallback Plans: When a fast model is unavailable or times out, the system should switch to a backup model or fall back to rule-based logic. Fallback paths need regular drills.
- Data Privacy: Content sent to third-party models may contain user information. Desensitization should be performed before calls, and service terms regarding data retention and training usage should be confirmed.
- Version Management: Model providers may update underlying versions, causing changes in output style or accuracy. It is recommended to fix version identifiers in configurations and incorporate the evaluation set into the continuous integration process.
- Observability: Record the model, duration, token count, and result status of each call to facilitate locating cost anomalies and quality degradation.
8. Conclusion
Selecting a fast model should not rely solely on advertised speed or unit price, but rather on establishing a comprehensive evaluation framework that includes speed, cost, and capability. Teams need to first map out the call stages within their agents, build an evaluation set using real business data, measure latency and cost, and finally determine the division of labor between the main and auxiliary models based on the results. Only through this process can the selection conclusions be reproducible and quickly re-evaluated during model iterations.
