Why AI Agents Perform Differently on the Same LLM: Causes and Evaluation Methods
When multiple AI agents are connected to the same Large Language Model (LLM), significant discrepancies often emerge in output quality, response speed, and task completion. This article explores the engineering factors outside the model layer that cause these differences, categorizing them into four dimensions: interaction modality, context assembly, tool permission models, and output contracts. It also proposes a reproducible evaluation framework featuring controlled variables, task sets, quantitative metrics, and a sample script, providing actionable guidance for agent selection across different scenarios.
1. The Phenomenon: “Same Model” Does Not Mean “Same Performance”
In practical engineering, a common confusion arises: when multiple AI agents (either CLI or GUI based) are connected to the same LLM, their output quality, response speed, and task completion rates vary significantly. Many teams conclude that “the model is underperforming,” but the real cause usually lies not in the model layer, but in the engineering structure surrounding it.
It is clearer to understand an AI agent as a closed-loop system:
User Intent -> Context Assembly -> Model Inference -> Tool Invocation -> Permission/Approval -> Result Rendering/Persistence
The model is only responsible for the “inference” step. All other steps are determined by the host program, and these steps are the primary sources of the performance discrepancy.
2. Four Sources of Discrepancy
2.1 Interaction Modality: GUI vs. CLI Determines “Loop Length”
Graphical User Interfaces (GUIs) and Command Line Interfaces (CLIs) are not merely visual differences; they alter the rhythm of human-machine collaboration. CLI agents typically handle approvals as explicit, batch pre-authorized confirmations, while GUI agents tend to break down each side-effect operation into independent confirmation cards. When a task requires accessing dozens of external addresses, the number of interruptions in the latter approach multiplies, and the end-to-end duration becomes entirely dominated by “waiting for humans.”
A key insight here is: End-to-end duration = Model latency + Tool latency + Human waiting time. In interaction modalities requiring human confirmation, the third item often accounts for over 80% of the total time. Therefore, simply comparing “total time” does not accurately reflect the model’s capability.
2.2 Context Assembly: Retrieval Channels and Truncation Strategies
For a simple query like “fetch the transcript of yesterday’s specific news,” different agents will select different retrieval entry points, pagination depths, and text extraction rules. If the host defaults to fetching only the search results’ homepage summaries, recall is inherently limited. If it categorizes before extracting, the output will present a “classification + brief summary” format. If it enters analysis mode directly, the output will lean towards “conclusion + attribution.”
Context budget is another hidden variable. In long-document scenarios, content exceeding the window is either truncated or summarized in segments. Different hosts have different segmentation granularities, leading to varying degrees of information loss.
2.3 Tool Permission Model: Confirmation Granularity Determines Task Completeness
Permission confirmation is a necessary risk control, but its granularity design directly impacts whether a task can be completed end-to-end. Per-address confirmation is more conservative in terms of security but incurs a high cost in efficiency. A more mature engineering practice is to introduce scoped pre-authorization: granting permissions once per domain, directory, or operation type, while retaining a complete audit log.
# Example: Scoped pre-authorization policy (pseudo-configuration)allow:- tool: fetchscope: "https://news.example.com/*"max_calls: 20- tool: read_filescope: "./repo/**"- tool: write_filescope: "./output/**"require_confirm: true
2.4 Output Contract: Persistence and Structuring
An easily overlooked discrepancy is the “output contract.” Some agents only render results within the chat session; others proactively generate Markdown archive files, even if the user did not request it. The latter offers better traceability but can cause artifact directory pollution if uncoordinated. A reasonable approach is to make the output contract explicit, declared by the caller:
{"output_mode": "inline | file | both","artifact_path": "./reports/","schema": "markdown-with-toc"}
3. Designing a Reproducible Evaluation Framework
3.1 Control Variable Checklist
For a comparison to be meaningful, the following variables must be locked: same model and version, same sampling parameters (temperature, top_p), same context budget, same network egress, same permission policy, and same type of task within the same time window. Any drift in these invalidates the conclusion.
3.2 Four Task Categories
| Task Type | Capability Tested | Observation Focus |
|---|---|---|
| Long text summarization | Summarization and structuring | Verbatim extraction, classification, summary density |
| Retrieval QA | Recall and channel selection | Source quality, coverage completeness |
| Skill reuse | Instruction following | Result consistency under the same skill |
| Enumeration completeness | Pagination and self-verification | Whether all results are provided at once, or asks follow-up questions midway |
The enumeration completeness task has the highest distinguishing power. When asked to “list all stocks that hit the daily limit in a specific market yesterday,” weaker implementations often return partial results and ask “do you want to continue?” whereas implementations with self-verification and pagination aggregation will provide the complete list at once. This is essentially an issue of whether a completeness verification step exists, not a model intelligence issue.
3.3 Quantitative Metrics
- Time to first token (TTFT) (seconds): reflects scheduling and assembly efficiency;
- End-to-end duration (seconds): includes human waiting time, confirmation counts must be recorded separately;
- Number of manual interventions: a direct measure of the permission loop cost;
- Recall completeness: number of standard answer entries hit / total entries;
- Format compliance: whether the declared output contract is satisfied.
3.4 Sample Evaluation Script
def run_case(agent, task, timeout=1800):t0 = time.monotonic()first_token_at = Noneconfirms = 0for ev in agent.stream(task):if ev.type == "token" and first_token_at is None:first_token_at = time.monotonic()if ev.type == "confirm":confirms += 1ev.reply("allow_once")return {"case": task.id,"ttft": (first_token_at - t0) if first_token_at else None,"total": time.monotonic() - t0,"confirms": confirms,"recall": score_recall(task.golden, ev.final),"schema_ok": validate(ev.final, task.schema),}
4. Conclusion and Selection Recommendations
In summary, agent selection should not be based solely on benchmark scores or a single speed metric, but should be matched to the scenario:
- Exploration and rapid prototyping: Prioritize modalities with low intervention and low latency, accepting shallower summary depth.
- Production-grade transformation and long-chain tasks: Prioritize modalities with complete permission auditing, artifact persistence, and self-verification capabilities, accepting longer end-to-end durations.
- Highly compliant scenarios: Scoped pre-authorization and comprehensive operation logs must be enabled. This can be combined with log services and monitoring alerts for auditing and tracing, with artifacts uniformly archived to object storage.
Finally, a crucial methodology: any comparative conclusion must be accompanied by a variable specification; otherwise, it cannot be reused. Scripting, metricizing, and making evaluations reproducible is the fundamental way to avoid “selection by feeling.” If enterprises wish to implement such an evaluation pipeline on Baidu AI Cloud, they can directly use the container platform to host evaluation tasks, message queues for task distribution, and log services with monitoring alerts for observability support, without binding to any specific tool modality.
