How to Compare LLMs in AI Agent Systems: A Horizontal Evaluation Method and Practice
Strong chat performance does not show whether a model can run a long agent workflow reliably. This article describes a horizontal method for comparing large language models inside agent frameworks. It covers how to set up identical test environments, assess the full task chain across five dimensions, and measure cost efficiency. Test scenarios include skill packaging, web development, presentation and long-form writing, knowledge base management, and browser automation.
In an AI agent system, model capability does not equal the final user experience. A model that performs well in a chat window does not necessarily read skill files reliably, call tools correctly, or keep task state consistent. It also does not guarantee that the model suits long-running automated work.
Therefore, model comparison should not rely only on whether answers read smoothly, or on single-turn accuracy. A meaningful evaluation places each model in an agent framework close to a real production environment. It then observes how the model understands goals, breaks down tasks, chooses tools, handles exceptions, and asks for confirmation before high-risk actions.
1. Standardize the Agent Environment Before Comparing Models
To reduce environmental noise, run several agent instances with identical configurations. Each instance should share the same:
- system prompt;
- memory content;
- skill files;
- tool list;
- working directory;
- permission boundaries;
- task inputs;
- output format requirements.
During testing, replace only the underlying model. Keep the reasoning level, context length, and tool return content as consistent as possible. Only then can the results reflect differences between the models themselves.
If agents use different skill definitions, or one model has extra tools, the conclusions can easily be distorted. For example, a model that performs better may simply have received a more complete tool description. A model that fails often may only be hampered by irrelevant history filling its context.
Before formal testing, establish an experiment baseline that records:
- the original task description and input files;
- the model version and inference configuration;
- available tools and parameter descriptions;
- the agent memory and skill directory;
- the start and end time of each run;
- inputs, outputs, tool calls, and error logs;
- token usage, retry count, and number of human interventions.
2. Evaluate the Full Task Chain, Not Just the Final Answer
Agent work usually involves several stages:
- understanding the user’s intent;
- deciding whether skills need to be read;
- drafting an execution plan;
- calling one or more tools;
- checking tool results;
- adjusting strategy based on those results;
- producing the final deliverable;
- reporting what was completed and what remains open.
An error at any stage can cause the whole task to fail.
For example, a model may produce a well-structured document without reading the reference file the user provided. Or it may successfully edit a web page without checking whether the page runs. Such results should not simply be labeled “completed.” A more accurate description is “superficially complete, unreliable process.”
Break evaluation results into five dimensions:
- Task completion: whether the goal was actually achieved;
- Process reliability: whether tool calls and steps executed stably;
- Output quality: whether code, documents, pages, or presentation materials are usable;
- Resource efficiency: time, tokens, retries, and context usage;
- Safety and compliance: whether permission boundaries were respected and whether high-risk actions were confirmed first.
3. Challenge 1: Packaging Experience into a Publishable Skill
The first task asks the model to organize a long prompt or working guideline into a reusable skill package.
This is not simple copying. It requires the model to turn working knowledge into a product-like capability. A qualified skill should include at least:
- the skill name and applicable scenarios;
- trigger conditions;
- input requirements;
- a standard execution workflow;
- an output structure;
- constraints;
- error handling;
- a self-check list;
- scenarios where the skill does not apply.
The model must distinguish long-term rules from one-off examples. It must also separate mandatory requirements from parts that can be adjusted to fit the task. If the original prompt is pasted into a file unchanged, the packaging looks complete but does not create transferable capability.
This challenge should also require self-checks, for example:
- whether any rules conflict;
- whether necessary inputs are missing;
- whether vague wording makes execution impossible;
- whether the skill could be triggered by mistake in the wrong context;
- whether failure handling is defined;
- whether the final output standard is clear.
Skill packaging is an important signal. Long-running agents often need to turn experience into rules continuously. If a model cannot organize complex guidelines clearly, it usually shows higher uncertainty when handling multi-step tasks later.
4. Challenge 2: Testing the Closed Loop in Web Development
For web development, do not judge only by the amount of code. Check whether the model completes the full loop from requirements to verification.
A test task can ask the agent to build a page with clear interaction logic, such as a form, data filtering, state switching, or a responsive layout. During evaluation, focus on whether the agent:
- clarifies the page goal first;
- splits components or files sensibly;
- chooses an appropriate implementation approach;
- handles empty, error, and loading states;
- considers different screen sizes;
- runs or previews the page;
- fixes problems based on error messages;
- explains how to run the project and lists known limitations at the end.
Many models can quickly generate interfaces that look reasonable, but that does not guarantee the interactions work. In tool-enabled environments, a model may modify files without reopening the page to confirm the result. It may also bypass a build error and present an unfinished result as complete.
Web tasks should therefore have explicit acceptance criteria. These include whether the page starts, whether core buttons work, whether input validation behaves correctly, and whether data displays accurately. Only output that passes verification counts as a complete delivery.
5. Challenge 3: Testing Structure in Presentations and Long-Form Writing
Presentation and long-form writing tasks mainly test whether a model can organize scattered information into a clear narrative.
Strong results usually involve these steps:
- defining the audience and use case;
- extracting the core argument;
- building a content hierarchy;
- pacing chapters or slides;
- separating facts, judgments, and recommendations;
- controlling information density;
- keeping a consistent tone;
- proofreading the final content.
For presentation tasks, checking whether the text is complete is not enough. Also check the logical relationship between slides. Titles should carry the argument instead of repeating the body text. Charts should support the reasoning rather than add visual clutter. The conclusion should answer the question raised at the beginning.
For writing tasks, focus on factual consistency, stable tone, and audience fit. Common problems include inconsistent statements, mixed concepts, key conclusions without support, and unverified details added to make the content seem more complete.
6. Challenge 4: Testing Long-Term Memory Through Knowledge Base Management
Knowledge base tasks more closely resemble long-term agent work. Ask the model to organize a set of documents, create categories, tags, summaries, and relationships, and then retrieve information accurately in later questions.
Key evaluation points include:
- whether the model identifies duplicate content;
- whether it separates facts from speculation;
- whether it preserves original sources;
- whether it builds stable classification rules;
- whether it can locate relevant content based on a question;
- whether it avoids treating outdated information as current;
- whether it states clearly when no supporting evidence is found.
The difficulty of knowledge base management lies not in generating a summary once, but in maintaining consistency over time. When new information arrives, does the model update older conclusions? When it finds a conflict, does it flag the conflict instead of deciding on its own? These abilities determine whether an agent can handle project materials, technical documentation, and internal knowledge management.
7. Challenge 5: Browser Automation as a High-Cost Integrated Test
Browser automation usually consumes the most context and tokens, because it involves repeated page observation, state checks, and repetitive actions.
A complete task may include:
- opening the target page;
- identifying the page structure;
- filling in forms;
- paging through results or applying filters;
- reading dynamic content;
- downloading or organizing results;
- handling pop-ups;
- retrying after failures;
- summarizing the execution results.
This kind of task is well suited to testing a model’s patience, memory, and error correction. The model must know the next step, and it must continuously judge whether the current page matches expectations. If a page fails to load, an element moves, or the result of an action is unclear, the model should stop acting blindly and reassess the environment.
Actions such as submitting, deleting, sending, making payments, or changing permissions require the agent to ask the user for confirmation before execution. A model with a high task completion rate is still unsuitable for direct production operations if it often skips these risk checks.
8. Cost Is More Than the Price per Call
Model selection must also account for long-term operating cost. The unit price of a single call does not reflect the real cost, because agent tasks often generate:
- multiple rounds of tool calls;
- repeated transmission of long context;
- retries after failures;
- page screenshots or structured page information;
- intermediate plans and self-checks;
- extra consumption from parallel tasks.
Therefore, record the total tokens, effective output tokens, number of tool calls, retry count, and completion time for each task. Then calculate the unit task cost.
A simple composite metric can help:
Overall efficiency = Task completion ÷ (Token consumption × Retry coefficient × Human intervention coefficient)
This metric does not need to be scientifically prec
