Evaluating Newly Released LLMs: Performance, Cost, and Long-Horizon Tasks

    When new Large Language Models (LLMs) are released, benchmark scores rarely reflect real-world performance. This article provides a practical framework for evaluating LLMs, covering capability assessment, long-horizon task stability, actual cost analysis based on token efficiency, and a structured selection process to help teams make data-driven decisions.

    1. Why Release Benchmarks Should Not Be the Sole Selection Criteria

    Whenever a new model is released, vendors typically publish a set of benchmark scores. While these numbers offer reference value, using them directly for model selection can lead to skewed decisions for three main reasons.

    First, evaluation setups are not standardized. Different teams use varying temperature parameters, context lengths, system prompts, and tool-calling formats. The same model can yield significantly different scores under different configurations. Second, test sets may overlap with training data, resulting in scores that are higher than actual performance in real-world scenarios. Third, benchmark scores measure accuracy on fixed questions, whereas production systems care about whether a task can be completed end-to-end, whether errors occur midway, and whether the system can recover from those errors.

    Therefore, a safer approach is to treat public leaderboards as an initial screening tool, while basing actual decisions on an internal task set. This internal task set should closely mirror your business requirements, and all candidate models should be run under the same environment, using the same set of prompts and scoring criteria.

    2. Capability Assessment: Shifting from Single-Item Scores to Task Completion Rates

    When evaluating a model’s capabilities, it is recommended to break down business requirements into several independently measurable capability areas. Common categories include:

    • Code generation and modification: Can it locate issues in an existing project and write executable patches?
    • File I/O and structural understanding: Can it correctly read multiple files, understand dependencies, and generate consistent modifications?
    • Multi-step tool calling: Are the parameters for each step correct, and can it adjust its strategy based on return information upon failure?
    • Long-context retrieval: How accurate is it at retrieving key information from a large volume of materials?
    • Instruction following: Are output formats, constraints, and boundary requirements consistently met?

    Each category should have a clearly defined passing standard. For instance, a code modification task can be judged by whether all unit tests pass, while a file task can be judged by the hash value or structural validation of the output file. Below is a simplified evaluation framework example:

    1. import time
    2. from dataclasses import dataclass
    3. @dataclass
    4. class TaskResult:
    5. task_id: str
    6. success: bool
    7. input_tokens: int
    8. output_tokens: int
    9. cached_tokens: int
    10. latency_s: float
    11. def run_suite(call_model, tasks, check_fn):
    12. # call_model returns a dict containing text and usage fields; check_fn determines if the task passes.
    13. results = []
    14. for task in tasks:
    15. start = time.time()
    16. resp = call_model(task["prompt"])
    17. elapsed = time.time() - start
    18. usage = resp["usage"]
    19. results.append(TaskResult(
    20. task_id=task["id"],
    21. success=check_fn(task, resp["text"]),
    22. input_tokens=usage["input_tokens"],
    23. output_tokens=usage["output_tokens"],
    24. cached_tokens=usage.get("cached_tokens", 0),
    25. latency_s=elapsed,
    26. ))
    27. return results
    28. def completion_rate(results):
    29. return sum(r.success for r in results) / len(results)

    The key here is to record task-level results rather than just the accuracy of individual Q&A turns. Looking at task completion rate, average latency, token consumption, and failure types together provides a true reflection of a model’s performance in real-world workflows.

    3. Evaluating Long-Horizon Task Usability

    Long-horizon tasks refer to tasks that require continuous execution of dozens or even hundreds of steps, generating large amounts of intermediate state along the way. Examples include batch code refactoring, organizing a set of documents to generate a report, or completing a data migration across multiple systems. The requirements for these tasks differ from single-turn Q&A.

    To determine if a model can support long-horizon tasks, observe the following aspects:

    First, do errors compound? Assuming a single-step accuracy rate of p and a task containing n interdependent steps, the overall success rate is roughly p^n. Even with a single-step accuracy of 95%, the overall success rate after 20 consecutive steps drops to only about 36%. Therefore, reducing single-step errors and introducing validation steps is more valuable than pursuing extreme single-step accuracy.

    Second, is state consistency maintained? Whether a model forgets previously agreed-upon directory structures, variable names, or API contracts during long conversations directly determines the quality of subsequent modifications.

    Third, can the task recover from interruptions? Network fluctuations, API timeouts, and context window exhaustion can all interrupt a task. Good engineering practice involves writing intermediate state to external storage and allowing the task to resume from the latest checkpoint.

    The following example illustrates the basic concept of a checkpoint mechanism:

    1. import json
    2. import os
    3. CHECKPOINT = "progress.json"
    4. def load_progress():
    5. if os.path.exists(CHECKPOINT):
    6. with open(CHECKPOINT, "r", encoding="utf-8") as f:
    7. return json.load(f)
    8. return {"done_steps": []}
    9. def save_progress(state):
    10. with open(CHECKPOINT, "w", encoding="utf-8") as f:
    11. json.dump(state, f, ensure_ascii=False, indent=2)
    12. def run_long_task(steps, execute_step):
    13. state = load_progress()
    14. for step in steps:
    15. if step["id"] in state["done_steps"]:
    16. continue # Skip completed steps to avoid redundant execution
    17. execute_step(step)
    18. state["done_steps"].append(step["id"])
    19. save_progress(state)

    With checkpoints, if a model occasionally makes an error or the service is interrupted, the cost is merely re-running the last step, not the entire task. This design applies to any model and complements the model’s inherent capabilities.

    4. Token Efficiency: A More Critical Cost Variable Than Unit Price

    Many teams compare model costs by only looking at the price per million tokens. However, the actual cost also depends on how many tokens are consumed to complete the same task. A model with a lower unit price but verbose outputs and repeated trial-and-error may ultimately cost more than a model with a higher unit price that completes the task in a single attempt.

    The cost of a single task can be broken down as follows:

    Cost = Uncached Input Tokens × Input Price + Cached Input Tokens × Cache Price + Output Tokens × Output Price

    Among these, cached input usually accounts for the bulk of long-horizon tasks, as agents must repeatedly carry long context at every step. Therefore, differences in cache pricing significantly impact total cost. Different vendors have varying cache pricing rules—some charge based on cache hits, others have minimum cache duration limits, and some require explicitly enabling caching. These rules should be verified against official documentation and not estimated based on assumptions.

    The following code converts measured usage into unit task cost. The price parameters should be replaced with actual official prices.

    1. def estimate_cost(result, price):
    2. # price is the cost per million tokens, including input, cached, and output fields.
    3. uncached = result.input_tokens - result.cached_tokens
    4. cost = (
    5. uncached * price["input"]
    6. + result.cached_tokens * price["cached"]
    7. + result.output_tokens * price["output"]
    8. )
    9. return cost / 1_000_000
    10. def cost_per_completed_task(results, price):
    11. total = sum(estimate_cost(r, price) for r in results)
    12. completed = sum(r.success for r in results)
    13. return total / completed if completed else float("inf")

    Here, we use “cost per completed task” rather than “cost per API call.” Failed tasks still incur costs, so counting only successfully completed tasks in the denominator provides a more accurate reflection of cost-effectiveness.

    If the gap in token consumption between two models persists across the same task, even with similar unit prices, the actual costs will show a noticeable difference. This is why testing with the same set of tasks is essential.

    5. The Relationship Between Attention Structure and Inference Cost

    Model architecture influences inference cost, which in turn affects pricing. Understanding common attention designs helps in judging whether a model’s cost structure is reasonable.

    The standard full attention mechanism computes relationships between every token and all other tokens in the sequence. In the pre-fill phase, computation grows quadratically with sequence length, and the memory footprint of the KV cache grows linearly. For long-context scenarios, both of these overheads are substantial.

    Common optimization approaches in the industry generally fall into the following categories:

    • Sparse attention: Only computes relationships between a subset of tokens, reducing computation through fixed patterns or learned selection rules.
    • Linear attention: Uses techniques like kernel functions to approximate computational complexity down to linear correlation with sequence length, though expressive power and implementation details are closely linked and results require empirical testing.
    • Compressed attention: Compresses historical information into fewer representations, reducing the amount of content that needs to be stored and computed long-term.
    • Hybrid attention: Uses exact attention for local regions and linear or compressed methods for global information, striking a balance between performance and cost.

    Each of these approaches involves trade-offs. Sparse methods might miss important long-distance dependencies, linear methods might be less stable than full attention on certain retrieval tasks, and the information loss in compressed methods is difficult to quantify. Therefore, architecture alone cannot determine if a model is good or bad; it must be evaluated alongside training methods, data quality, and actual tasks.

    From a cost perspective, a model employing a lower-computation attention structure is theoretically better positioned to offer services at a lower price. However, architecture is only one factor influencing cost. Training scale, inference frameworks, batching efficiency, and hardware utilization all affect the final unit cost. Thus, inferring price solely based on architectural descriptions is unreliable; verification with actual usage data is still necessary.

    Synthesizing the dimensions above, teams can follow this process for model evaluation:

    1. Outline business scenarios: List the ten to twenty most common real-world tasks and define automatically verifiable passing standards for each.
    2. Standardize the runtime environment: This includes prompt templates, temperature, tool definitions, and context length, ensuring all candidate models run under identical conditions.
    3. Run the task suite: For each model, record completion rate, latency, input/output tokens, and cache hit metrics.
    4. Calculate unit cost: Convert usage into the cost per successful task using official pricing, and compare both completion rate and cost, rather than looking at either in isolation.
    5. Conduct canary testing: For candidates with similar cost and quality, run a small-scale gradual rollout to observe failure types in real user scenarios.
    6. Monitor and test continuously: After deployment, maintain monitoring. Run regression test suites whenever a model version is updated to ensure critical tasks have not degraded.

    Regression testing is particularly important. After a model version update, some tasks may improve while others regress. Only by retaining a fixed test set and periodically re-running it can such changes be promptly identified.

    7. Monitoring Subsequent Versions

    In the face of continuously iterating models, teams should monitor three types of signals. First, whether the measured score for the same capability area shows stable improvement, rather than just changes in public leaderboard numbers. Second, whether the cost curve per successful task remains manageable as versions upgrade. Scaling up usually means higher per-inference costs; if cost growth outpaces capability improvement, cost-effectiveness will decline. Third, whether failure modes have changed. Some versions might reduce syntax errors but increase logical leaps—changes that can only be discovered through task-level logging.

    Conclusion

    The key to evaluating LLMs is translating promotional metrics into business metrics. Capability is measured by task completion rate, stability by error accumulation and recovery ability in long-horizon tasks, and cost by actual expenditure per successful task. Architectural knowledge helps understand the source of costs, but final decisions should rely on measured data within a consistent environment.