How to Choose an LLM: From Blind-Test Rankings to Cost per Task

    This guide explains how to read blind-test leaderboard scores, why total and active parameters differ in Mixture of Experts (MoE) models, and why a large context window does not guarantee good results. It also shows how to calculate the cost of a single request, build an internal evaluation set, and follow a five-step process for model selection.

    1. How to Read Leaderboard Scores

    In a blind-test leaderboard, reviewers compare two responses without knowing which models produced them. The results of these head-to-head matchups are converted into relative ratings. This method reflects human preferences in real use. However, it measures the overall quality of a response, which does not necessarily match success rates for code repair or accuracy when extracting information from long documents.

    When you read a leaderboard, pay attention to three things.

    First, check the sample size and the margin of error. A model with few battles can have large score swings, and its rank may change noticeably over a short period.

    Second, look at the score gap instead of the rank. If two adjacent models differ by only a small margin, you usually cannot conclude that one is better. A large gap gives a more useful signal.

    Third, check the task-specific sub-leaderboards. Rankings on general conversation, coding, and web development sub-leaderboards can differ significantly. When you select a model, give priority to the sub-leaderboard closest to your business use case.

    2. Total Parameters vs. Active Parameters

    Mixture of Experts (MoE) models send each input token through only some of the expert subnetworks. To understand these models, you need to distinguish two concepts:

    • Total parameters: The total number of weights in the model. This sets the model’s capacity ceiling and determines how much GPU memory or RAM is needed to deploy it.
    • Active parameters: The number of weights that take part in a single forward pass. This directly affects the compute required per token and the inference speed.

    As a result, a model with many total parameters but few active parameters can require less computation per token. However, deployment still requires storage for all experts. A model’s size does not mean it can run on small hardware.

    The following table lists the main metrics that affect inference resources:

    Metric Main Impact Common Bottleneck
    Total parameters Model capacity, weight storage GPU memory or RAM
    Active parameters Compute per token Compute and throughput
    Context length KV cache usage, prefill time Memory and time to first token

    3. Long Context: Fitting Data In Does Not Mean Using It Well

    As context windows grow, teams often send an entire code repository or all historical documents in a single request. This approach has three costs.

    First, input cost rises with length. More input tokens mean a higher fee for each request.

    Second, KV cache usage rises with length. Long contexts consume more GPU memory and limit the number of concurrent requests.

    Third, information utilization is inconsistent. Several studies have observed that models sometimes extract information less accurately from the middle of a long text than from its beginning and end.

    More reliable approaches include the following:

    • Retrieve first, then generate: Use keyword or vector search to select relevant passages, and include only those in the context.
    • Hierarchical summarization: Summarize each section of a long document first, then complete the downstream task based on the summaries.
    • Reuse prefixes: Place fixed system instructions and shared background at the start of each request. This makes it easier to use prefix caching and reduce repeated charges.

    4. Converting Token Prices into the Cost of a Single Task

    API billing usually calculates input, output, and cache-hit tokens separately. Prices are quoted per million tokens. A low price does not guarantee a low total cost, because output length depends on how verbose the model is. A model with a lower unit price that writes long answers can cost more in practice than a model with a higher unit price that answers concisely.

    The cost of a single request is calculated as follows:

    Single request cost = uncached input tokens × input price + cached input tokens × cache price + output tokens × output price

    All prices in the formula are amounts per million tokens, so divide the result by 1,000,000. The following function implements this calculation:

    1. def request_cost(prompt_tokens, cached_tokens, output_tokens,
    2. price_in, price_cache, price_out):
    3. """All prices are per million tokens. Returns the cost of a single request."""
    4. uncached = prompt_tokens - cached_tokens
    5. total = (uncached * price_in
    6. + cached_tokens * price_cache
    7. + output_tokens * price_out)
    8. return total / 1_000_000

    When you estimate the cost of a business task, multiply by two more factors: the average number of model calls per task and the total task volume. Include extra tokens from retries and tool calls, along with the formatting overhead of structured output. Leaving these out will systematically underestimate costs.

    5. Building Your Own Evaluation Set

    Public leaderboards cannot replace internal evaluation based on your own business. We recommend building an evaluation set in the following steps:

    1. Collect samples from real business workflows. Cover typical scenarios and edge cases, with at least several dozen samples per category.
    2. Define an automatically checkable standard for each sample. For example, check whether code passes unit tests, whether JSON output passes schema validation, or whether key fields are extracted completely.
    3. Use the same sampling parameters, maximum output length, and system prompt for all candidate models, then run the evaluation.
    4. Record accuracy, average latency, token usage, and failure types, and group the failures by cause.
    5. For subjective quality, use blind review. Hide model identities and randomly swap the display order of the two responses to reduce reviewer bias.

    The code below shows a minimal evaluation framework. You need to implement the call interface and the judging function for your own business:

    1. from statistics import mean
    2. def evaluate(models, cases, call_model, judge):
    3. """Run all cases against each candidate model and summarize pass rate, latency, and cost."""
    4. stats = {m: {"passed": 0, "latency": [], "cost": []} for m in models}
    5. for case in cases:
    6. for m in models:
    7. resp = call_model(m, case["prompt"]) # Unified model call wrapper
    8. ok = judge(case, resp["text"]) # Automatic judging function
    9. s = stats[m]
    10. s["passed"] += int(ok)
    11. s["latency"].append(resp["latency_ms"])
    12. s["cost"].append(resp["cost"])
    13. return {
    14. m: {
    15. "pass_rate": s["passed"] / len(cases),
    16. "avg_latency_ms": mean(s["latency"]),
    17. "avg_cost": mean(s["cost"]),
    18. }
    19. for m, s in stats.items()
    20. }

    Wrapping the call interface in one unified function has two benefits. First, switching models requires only a configuration change, and the business code stays the same. Second, evaluation results can be compared directly, so small differences between APIs do not distort the conclusions.

    6. A Five-Step Model Selection Process

    We suggest dividing model selection into five steps:

    1. Define the scenario and acceptance criteria. For example, a goal like “success rate for automatically fixing failing unit tests” needs a clear numeric threshold.
    2. Use public leaderboards for an initial screen to narrow the candidates. Leaderboards offer leads, but they cannot serve as final conclusions.
    3. Compare accuracy, latency, and cost per task on your internal evaluation set. Review these three metrics together.
    4. Check compliance requirements, including whether data may leave the country, whether private deployment is required, and whether the model license covers commercial use.
    5. Launch with a small traffic share, monitor quality and cost continuously, and retest regularly. Model versions change quickly, so conclusions from last quarter may no longer apply.

    In addition, add a unified calling layer between your business logic and the model APIs. When cost, quality, or compliance requirements change, the team can switch models with less effort and rely less on a single vendor.

    7. Conclusion

    Leaderboards point to candidate directions. Accuracy, latency, and cost on your own data determine the actual choice. Building the evaluation process into a repeatable engineering asset lets you keep making informed decisions as models change quickly.