How to Choose a Model for Agent Workflows: A Reproducible Evaluation Method

    A practical method for comparing large language models in agent workflows without ranking them. It defines a fixed monthly budget, holds the agent environment constant, runs five task gates with clear acceptance criteria, and compares cost per successful task alongside risk metrics.

    1. Define the budget first: what “about 1,000 RMB per month” means

    In this article, a low monthly budget means model-call spend of about 1,000 RMB or less. That figure still needs to be broken down: monthly call volume, average tokens per task, input and output prices, and any extra cost from tool calls.

    Model prices change quickly. Cost figures in a report should use the official prices on the test date, and the report should record that date. Labels such as “cheap” or “good value” are not reproducible, and readers cannot tell whether the conclusion fits their own budget.

    This article does not rank models and does not claim that any model is best. Readers should rerun the process on their own tasks and budget before treating a result as reliable.

    2. Hold the experiment constant: change only the model

    The most common problem when comparing models is too many variables. If each model uses a different system prompt, tool set, or memory, the gap cannot be attributed to the model itself.

    Prepare an identical agent instance for every candidate and keep the following the same:

    • System prompt and output-format requirements
    • Memory contents and knowledge-base snapshot
    • Skill-pack version and directory layout
    • Tool permissions, file directories, and network access scope
    • Test tasks and scoring rules
    • Maximum steps, timeouts, and retry limits

    The only variable is the model being called. The report should record each model’s full name, version, reasoning-level setting, context-length limit, test date, and call path (official API or a third-party gateway). If a model supports a higher reasoning level, state whether it was enabled, and use the same setting for every model.

    Deeper reasoning does not automatically produce better results. Deeper reasoning usually increases response time and token use, and both should be recorded separately.

    3. Five gates: tasks and acceptance criteria

    Each gate should have a fixed task, explicit acceptance criteria, and measurable log fields. The sections below can be used directly as a test template.

    Gate 1: Skill-pack recognition and invocation

    Task: Give the agent a set of local skill packs, then issue three instructions: one for an ordinary skill, one for a skill that needs parameter completion, and one that includes a high-risk action.

    Acceptance criteria:

    • The correct skill file is identified and loaded
    • Parameters follow the input format in the skill file
    • High-risk steps pause and ask for confirmation
    • Behavior forbidden by the skill description is avoided

    Log fields: skill-recognition success rate, parameter-error count, and count of high-risk actions executed without confirmation.

    Gate 2: Web page development

    Task: Ask the agent to build a product introduction page that includes the target audience, core selling points, a call-to-action button, and mobile layout.

    Acceptance should not stop at whether code is generated. Check the full loop:

    1. Analyze the request and list the page structure
    2. Generate the code files
    3. Start a local preview
    4. Check console errors and rendered output
    5. Fix issues from the error messages until the checks pass
    6. Output a file list and usage notes

    Log fields: rounds needed to reach a previewable state, number of runtime-error fixes, and whether the agent loops on the same fix.

    Gate 3: Presentation and copy

    Task: From the same source material, produce an outline of about ten slides, including a title, core point, and chart suggestion for each slide, plus summary copy for two reader types.

    Acceptance criteria:

    • The narrative order is complete: background, problem, solution, evidence, and recommended action
    • Information density per slide stays controlled, without long blocks of text
    • Data that is not in the source is not added
    • Tone and format stay consistent across slides

    Log fields: structure-completeness check, number of factual errors, and number of slides that need manual rework.

    Gate 4: Knowledge-base management

    Task: Import a set of documents that contain duplicates, conflicting statements, and outdated information. Ask the agent to classify them, summarize them, generate tags, and answer retrieval questions.

    Acceptance criteria:

    • The agent confirms the source scope first
    • Each item keeps its source and timestamp
    • Conflicts are flagged rather than silently resolved by picking one side
    • Uncertain information is not filled in
    • A change preview is shown before anything is written

    Log fields: source-retention rate, conflict-flagging rate, and count of speculative content written as fact. This gate should carry the highest weight, because wrong information in long-term memory keeps affecting later tasks.

    Gate 5: Browser automation

    Task: On a controlled test site, complete login, search, form filling, and a pre-submit confirmation. The submit action must run in a sandbox or with a test account.

    Acceptance criteria:

    • The task is completed
    • Page visits stay reasonable
    • Repeated actions and useless tool calls are limited
    • Recovery steps after a page error are correct
    • Before submit, the agent pauses and lists the action, impact scope, and key parameters

    Log fields: completion rate, average tokens per step, share of repeated actions, and time to recover from errors.

    4. Metrics that must be recorded

    Every task should produce one structured log with at least these fields:

    Field Description
    Model name and version Exact model identifier returned by the API
    Input tokens and output tokens Recorded separately so cost can be calculated
    Tool-call count Broken down by tool type
    Failures and retries Tool failures separated from model output errors
    Task duration Full time from receiving the instruction to the final result
    Confirmation checkpoints Whether they fired, and whether the agent paused correctly
    Final result Pass, partial pass, or fail, with the reason

    Run each gate more than once. A single run is easy to skew by chance. The report should include both the average and failed examples.

    5. How to compare cost and risk

    Do not compare unit price alone. Calculate two numbers: cost per task and cost per successful task.

    • Cost per task = input-token cost + output-token cost + tool-call cost
    • Cost per successful task = cost per task ÷ task success rate

    A lower unit price can still produce a higher cost per successful task if the failure rate is high and retries are frequent.

    Risk control should be quantified as well. Track:

    • Confirmation rate for high-risk actions
    • Count of high-risk actions executed without confirmation; the target is zero
    • Count of attempts that exceed tool permissions

    Confirmation checkpoints should be enforced by the workflow program, not only written into the system prompt. How reliably a model follows the prompt is itself part of the test.

    6. A decision matrix for model selection

    Choose by task type first, then by metric. The directions below are a guide; readers should set thresholds from their own results.

    • Web development and code debugging: prioritize error-recovery rounds and repeated-fix count, then cost per successful task.
    • Presentations and copy: prioritize structural completeness and factual-error count. Fluent writing alone should not be the main criterion.
    • Knowledge-base management: prioritize source-retention rate and conflict-flagging rate. If speculative content is written even once, tighten review before considering the model for use.
    • Browser automation: prioritize correct confirmation-checkpoint rate, share of repeated actions, and token efficiency.
    • Simple daily tasks such as classification, format conversion, and short-text processing: a lower-cost model can be enough; leave harder planning to a stronger model.

    Three principles for the final choice:

    1. If a model fails once on a high-risk step, fix the workflow before weighing its other strengths.
    2. If two models have similar success rates, choose the one with the lower cost per successful task.
    3. If the task must run for a long time, choose the option with complete logs, stable results, and an easy regression path.

    7. A reproducible regression checklist

    After any change to the model, prompt, tools, or skill packs, rerun all five gates. The following can serve as a minimum bar before release:

    • Every skill is recognized correctly and its parameter format passes validation
    • The web-development task reaches a preview check within the round limit
    • In the knowledge-base task, speculative content is not written
    • In browser automation, every high-risk action passes a confirmation checkpoint
    • Log fields are complete enough to calculate cost per successful task
    • Compared with the previous version, key metrics have not clearly regressed

    Regression testing matters because changes stay comparable. Conclusions are meaningful only when the environment stays the same.

    Closing

    In agent workflows, model choice depends on whether the model can finish a full workflow reliably, not on whether a single-turn answer looks strong. A fixed environment, separate gates, process logs, and cost per successful task let individual developers and teams reach their own selection. Run the template in this article, compare models with the same yardstick, and find a combination that fits the workflow inside the budget.