A Guide to LLM Selection: Performance, Cost, and Token Efficiency

    When new large language models are released, engineering teams need a repeatable evaluation framework rather than relying solely on benchmark scores or individual experiences. This article introduces a structured framework for LLM selection based on four dimensions: capability boundaries, long-task availability, cost structure, and token efficiency. It provides detailed methods for task-based capability assessment, quantitative standards for long-term tasks, cost calculation formulas including cache hit rates, and token efficiency metrics to help teams make informed decisions for their specific business workloads.

    Why Structured Evaluation is Needed After New Model Releases

    Every time a new large language model is released, discussions usually center on two types of information: officially published benchmark scores and individual user experiences. While benchmark scores offer broad coverage, their relevance to specific business operations is limited. Personal experiences are authentic but suffer from small sample sizes and are heavily influenced by network conditions, deployment status, and prompt engineering. Engineering teams need a repeatable evaluation framework that breaks down “usability” into measurable dimensions, combined with their own business workloads to make decisions.

    The framework provided in this article includes four dimensions: capability boundaries, long-task availability, cost structure, and token efficiency. These answer four questions respectively: Can the model complete the task? Can it sustain an entire workflow? How much does it cost to complete a task? And does the cost match the output?

    Dimension 1: Capability Boundaries

    Value and Limitations of Benchmark Scores

    Public benchmarks typically measure capabilities such as reasoning, coding, math, or instruction following on fixed datasets. They provide a consistent reference for horizontal comparison but have three obvious limitations:

    • Datasets may overlap with the model’s training data, inflating the scores;
    • Benchmark questions are mostly single-turn Q&A, which differ significantly from multi-step engineering tasks;
    • Different evaluators use varying inference parameters and prompt templates, making scores directly incomparable.

    Therefore, benchmark scores are suitable for initial screening but not for drawing final selection conclusions.

    Splitting Capabilities by Task Type

    The same model may perform very differently across tasks like UI generation, API and business logic implementation, file organization, and document writing. It is recommended to build a capability matrix based on real task types in your business:

    Task Type Focus Metrics Determination Method
    UI Generation Layout fidelity, interaction completeness Render check + manual scoring
    API & Logic Implementation Test pass rate, edge case handling Automated test results
    File Read/Write & Organization Step accuracy, accidental deletion count Operation log audit
    Multi-turn Reasoning Analysis Conclusion accuracy, evidence sufficiency Comparison with standard answers

    Each cell should have a clear pass criterion. Scoring without standards is easily influenced by the evaluator’s subjective impressions, making conclusions difficult to reproduce.

    Multimodal Inputs Require Separate Evaluation

    If a model accepts both text and image inputs, its text and multimodal capabilities should be tested separately. A multimodal model may not outperform a text-only model on pure text tasks, and its performance on image understanding tasks needs to be validated using an independent sample set. Mixing the two types of results will mask their respective shortcomings.

    Dimension 2: Long-Task Availability

    Long-task availability refers to workflows that last from tens of minutes to hours, involving extensive tool calls and file operations. The requirements for models in these tasks differ significantly from single-turn Q&A, primarily including the following four points:

    • State maintenance: Remembering previous constraints and completed steps in a continuously growing context;
    • Error recovery: Whether it can retry or switch paths after a tool call failure, rather than falling into a repetitive loop;
    • Output stability: Consistent return formats for similar requests without service interruptions;
    • Task planning: Whether it can break down a large goal into verifiable sub-tasks.

    Quantitative Standards for Availability

    The following metrics can be used to determine if a model meets the availability threshold for long tasks:

    • The proportion of the entire workflow completed without human intervention;
    • The average number of human interventions required per task;
    • The number of interruptions or timeouts per hour;
    • The number of reworks caused by context loss.

    These metrics are more valuable than the subjective judgment of “whether it can be used.” Teams can first set a threshold, for example, only moving to a pilot phase if the completion rate exceeds a certain percentage, and then adjust based on business tolerance.

    Interference of Service Status on Evaluation

    Services in early deployment, gray-box testing, or trial phases often experience issues like intermittent disconnections, response timeouts, and unstable versions. These problems may stem from infrastructure rather than the model itself. During evaluation, the time of each call, service version identifier, and failure logs should be recorded. Otherwise, it is easy to misinterpret service instability as a lack of model capability, or to mistake occasional good performance for stable performance.

    Dimension 3: Cost Structure

    Breakdown of Pricing Items

    Most pay-as-you-go model APIs include the following pricing items:

    • Regular input tokens;
    • Cached input tokens, usually priced lower than regular input, but discount rules vary significantly across services;
    • Output tokens, generally priced higher than input;
    • Some services set different price tiers for extra-long contexts.

    Specific values should be based on the pricing rules published by the service provider. All pricing items must be included in the calculation during evaluation; comparing only one item is insufficient.

    Calculating Total Cost

    Unit price does not equal cost. The true cost of a task depends on the sum of the products of the various token quantities consumed and their corresponding unit prices:

    $C = N{\text{fresh}} \times p{\text{in}} + N{\text{cache}} \times p{\text{cache}} + N{\text{out}} \times p{\text{out}}$

    Where $N{\text{fresh}}$ is the number of uncached input tokens, $N{\text{cache}}$ is the number of cached input tokens, and $N_{\text{out}}$ is the number of output tokens. Below is pseudocode for batch estimation:

    1. function estimate_total_cost(tasks, pricing):
    2. total = 0
    3. for task in tasks:
    4. fresh = task.input_tokens - task.cached_input_tokens
    5. cost = fresh * pricing.input
    6. + task.cached_input_tokens * pricing.cached_input
    7. + task.output_tokens * pricing.output
    8. total = total + cost
    9. return total

    Impact of Cache Hit Rate

    Agentic workflows repeatedly send similar long contexts, such as system instructions, project descriptions, and conversation history. This input often accounts for the bulk of the bill in long tasks, so the cache hit rate can impact the final cost more than the listed price difference.

    Common practices to increase the hit rate include:

    • Keeping the request prefix stable by placing unchanging system instructions and reference materials at the very beginning;
    • Avoiding inserting time-varying content, such as timestamps, in the middle of the context;
    • Creating segmented summaries of long documents to reduce the amount of content repeatedly transmitted in each turn.

    Dimension 4: Token Efficiency

    Token efficiency refers to the number of tokens consumed to complete the same task. Assuming two models have the same unit price but their token consumption for the same job differs by a factor of two, the actual cost will also differ by roughly a factor of two. Therefore, efficiency is a variable easily overlooked in cost evaluation.

    Factors Affecting Efficiency

    • The verbosity of the reasoning process, including unnecessary self-confirmations and repetitive explanations;
    • The number of tool calls and the size of the content returned each time;
    • Whether the same file is read repeatedly;
    • The correct rate of the first output; a low correct rate means more modification turns.

    Defining Efficiency Metrics

    It is recommended to use “token consumption per successful task” as the core metric:

    $E = \frac{\sum{i} T_i}{N{\text{passed}}}$

    Where $Ti$ is the total tokens consumed by the $i$-th task, and $N{\text{passed}}$ is the number of tasks that passed acceptance. This metric reflects both efficiency and quality. Even if a model consumes few tokens per call, if its pass rate is very low, its cost per successful task may still be high.

    When comparing efficiency, it is essential to ensure that the task definitions, acceptance criteria, and context management strategies are completely identical. Otherwise, the comparison results only reflect differences in test conditions.

    Building a Reproducible Testing Plan

    Testing is the critical step to implement the previous four dimensions. The following process is recommended:

    1. Select representative task sets: Extract ten to thirty tasks from real work, covering different types and difficulties.
    2. Fix variables