Multimodal LLM Selection: Evaluating Cost and Capability by Task

    This article provides a practical guide to selecting multimodal large models based on actual capability and retesting costs. It covers defining business requirements, establishing objective acceptance criteria, interpreting model specifications, and calculating the true cost per successful result. Additionally, it details specialized testing for AI agents, a reproducible retesting methodology, a tiered trial strategy, and an essential engineering checklist before deployment.

    1. Define the Selection Problem First

    Before selecting a model, answer three questions: what modalities the business inputs contain, whether the task requires tool calling, and whether processing is batch offline or online interactive. These three points determine the candidate pool.

    If the input is purely text, the candidate range is the broadest. If images are involved, you must confirm that the model’s comprehension capabilities meet your needs, such as table recognition, receipt field extraction, or screenshot understanding. If direct video input is required, the candidate pool shrinks significantly, as not all models support native video input; some may require frame extraction into an image sequence before processing.

    Tool calling is another dividing line. Agent-based applications rely on the model to output structured function-calling parameters, which are then executed by a program, and the results are fed back. This requires the model to maintain stable formatting and accurate parameters across multi-turn conversations, and to make reasonable retries or fallbacks when a tool reports an error.

    2. Write Acceptance Criteria Before Discussing Price

    Acceptance criteria are the starting point for selection. Without standards, you cannot determine whether a response is “good enough,” making cost comparisons meaningless.

    These criteria should be quickly verifiable by either a program or human review. Examples include:

    • Extraction tasks: Accuracy of key fields, proportion of missing fields.
    • Code modification tasks: Unit test pass rate, whether diffs only alter the target scope.
    • Tool calling tasks: Validity of parameter JSON, correctness of tool names, completeness of multi-step workflows.
    • Long document summarization tasks: Omission of key facts, presence of hallucinated content not found in the original text.

    Prepare 20 to 50 representative samples for each task type, covering both common and edge cases. The sample size does not need to be massive, but it should reflect the real business distribution.

    3. How to Read Specifications

    Model documentation lists many specifications, but most do not directly represent actual performance. The following points require specific understanding.

    Context Window determines how much input a single request can hold. However, a large window does not mean the model can effectively utilize the entire context. Information in the middle of a long input is often ignored. Therefore, it is best to place critical information at the beginning or end of the prompt, combined with Retrieval-Augmented Generation (RAG) or chunking.

    Output Limit determines the maximum number of tokens generated in a single response. When the output limit is insufficient, long code, long reports, or complete JSON will be truncated. Truncated results often appear normal but fail during downstream parsing. Therefore, you should verify during testing whether the output ends completely.

    Reasoning Mode causes the model to generate additional thinking content before providing an answer. This hidden content is also billed as output tokens and increases latency. Complex reasoning tasks may benefit from this, while simple extraction tasks may only incur extra costs.

    Input Modalities must be validated against actual file formats. A document stating support for images does not mean that images of any resolution or format can be stably recognized.

    4. Convert Price into “Cost per Success”

    The price of a single API call is only the starting point. What should truly be compared is the comprehensive cost of achieving a qualified result.

    You can estimate this using the following logic:

    1. Single call cost = Input token count Input unit price + Output token count Output unit price.
    2. The total cost of a batch of tasks includes all attempts, including failed ones.
    3. Each failure must add the cost of manual review or rework.
    4. Cost per success = Total cost / Number of successful tasks.

    Calculated this way, a model with a low unit price but a low pass rate might be more expensive than a model with a high unit price but a high first-time pass rate. Conversely, a high-priced model is not necessarily more expensive if it reduces retries and human intervention.

    Below is a sample code snippet demonstrating how to calculate using these metrics:

    1. from dataclasses import dataclass
    2. @dataclass
    3. class Run:
    4. passed: bool # Whether it passed the acceptance check
    5. input_tokens: int # Number of input tokens for this run
    6. output_tokens: int # Number of output tokens for this run
    7. def cost_per_success(runs, price_in, price_out, rework_cost):
    8. """Price unit: per thousand tokens; rework_cost: manual rework cost for a single failure."""
    9. total = 0.0
    10. successes = 0
    11. for run in runs:
    12. total += (run.input_tokens * price_in + run.output_tokens * price_out) / 1000
    13. if run.passed:
    14. successes += 1
    15. else:
    16. total += rework_cost
    17. return total / successes if successes else float("inf")

    The prices and rework costs in the example should be replaced with actual business data; do not copy someone else’s numbers.

    5. Test Agent Capabilities Separately

    In Agent scenarios, failures are often not “wrong answers” but the process breaking at a certain step. Evaluation should break down and observe the following dimensions:

    • Whether tool selection is correct and whether non-existent tools are called.
    • Whether parameters match the schema, with complete types and required fields.
    • Whether it remembers the results of previous steps in multi-turn tasks.
    • Whether it can correct parameters based on error information after a tool returns an error.
    • Whether it explicitly stops when unable to complete the task instead of fabricating results.

    These dimensions should be automatically logged, such as recording the tool call sequence and validation results for each turn, and then aggregating failure reasons by task type.

    6. Retesting Methodology

    The core of retesting is “the same set of tasks, the same set of judgments, the same set of records.” The specific steps are as follows:

    1. Fix the task set, locking the prompt version and tool definitions.
    2. Run the same tasks for each candidate model. Run each task at least two to three times to observe stability.
    3. Record input/output tokens, time taken, pass/fail status, and failure type.
    4. Use blind evaluation for subjective outputs. Remove model identifiers and have two people score independently.
    5. After aggregation, compare pass rate, cost per success, and average latency simultaneously.
    1. def evaluate(model_id, tasks, call_model, check):
    2. runs = []
    3. for task in tasks:
    4. resp = call_model(model_id, task.prompt, task.attachments)
    5. runs.append(Run(
    6. passed=check(task, resp),
    7. input_tokens=resp.usage_in,
    8. output_tokens=resp.usage_out,
    9. ))
    10. return runs

    In this example, call_model should be encapsulated into a unified interface to mask request format differences across platforms, avoiding interface-level errors during comparison.

    7. Tiered Trial Strategy

    You do not have to select one model for all scenarios right from the start. A more prudent approach is a tiered strategy:

    • High-frequency, fixed-structure tasks (e.g., OCR field extraction, format conversion): First select a cost-effective and stable candidate to establish a baseline. Record baseline cost and pass rate.
    • Long-output, budget-sensitive tasks (e.g., batch report generation): Focus on checking whether the output limit is sufficient and if the truncation rate is acceptable.
    • Complex Agent workflows (e.g., multi-tool collaboration, long-chain decision-making): Run the same suite of tasks using the full candidate set. Determine the final solution based on multi-turn pass rate and cost per success.
    • Video inputs: First confirm the candidate model’s video support method, then decide whether frame extraction preprocessing is needed.

    The benefit of tiering is that each layer has a clear acceptance target, avoiding sending all requests to the most expensive solution just for the sake of a few complex scenarios.

    8. Engineering Checks Before Deployment

    Once the selection conclusion is finalized, engineering preparations are still necessary:

    • Desensitize and validate input length; sensitive information should not enter logs.
    • Set timeouts, retry limits, and rate limiting for model calls.
    • Retain a fallback path; switch to a backup candidate when the primary model is unavailable.
    • Track changes in pass rate, latency, and cost through monitoring and alerting. Re-run benchmark tests after model version updates.
    • Set permission boundaries for an Agent’s tool calls; operations like delete, send, or payment must include a human-in-the-loop confirmation step.

    Model prices and specifications will change, and service availability will fluctuate. Therefore, selection should be a repeatable process, not a one-time decision. Regularly retesting with the same suite of tasks ensures that cost and performance remain under control at all times.