How to Evaluate LLM Cost-Effectiveness Using Intelligence Scores and Cost per Task

    This article explains why sticker price alone is a poor indicator of LLM usage costs, and introduces two key metrics for model selection: cost per task and intelligence scores. It covers how output length, hidden reasoning tokens, retries, and context length affect real spending, how to use log-scale charts and Pareto frontiers to compare candidates, and provides a practical step-by-step evaluation workflow with Python code examples.

    Why Unit Price Doesn’t Represent Actual Cost

    When choosing a large language model, many developers’ first instinct is to compare listed API prices — the cost per million input or output tokens. This comparison is useful but incomplete. Actual spending depends on how many tokens a task consumes and how many times the model must be called.

    The main factors affecting real cost include:

    1. Output length: Given the same prompt, some models answer concisely while others produce lengthy explanations. Output tokens typically cost more than input tokens, so longer outputs drive up cost quickly.
    2. Tokens consumed by reasoning: Some models perform extended internal reasoning. These intermediate tokens are billed even though users never see them.
    3. Retries and corrections: If a model fails to produce a correct result on the first attempt, the program must call it again, multiplying cost by the number of calls.
    4. Context length: Multi-turn conversations or long-document tasks repeatedly resend large amounts of context, and cumulative input tokens can far exceed expectations.

    The following function estimates the cost of a single task based on the number of calls, making it useful for rough calculations during model selection.

    1. def estimate_task_cost(price_in, price_out, tokens_in, tokens_out, calls=1):
    2. """
    3. Estimate the cost of a single task.
    4. price_in / price_out: price per million input/output tokens (same currency)
    5. tokens_in / tokens_out: input and output tokens per call
    6. calls: number of calls per task (including retries)
    7. """
    8. per_call = (tokens_in * price_in + tokens_out * price_out) / 1_000_000
    9. return per_call * calls

    The function looks simple, but it captures a key idea: cost is the combined result of price, usage volume, and call count. Comparing unit price alone ignores the latter two.

    Cost per Task: Measuring What It Costs to Get Something Done

    Cost per task refers to the total expense a model incurs to complete one full task. It focuses on outcomes rather than unit price.

    This metric removes the surface advantage that comes from model size. Smaller models usually have lower unit prices, but if they need multiple attempts, step-by-step decomposition, or verbose intermediate output, their final task cost may not be low. Conversely, a large model with a high unit price may be more cost-competitive overall if it delivers an accurate answer in one shot.

    When evaluating, the question to answer is: for the same batch of tasks, which model has the lowest total cost? That is closer to a real engineering decision than “which model has the lowest unit price.”

    Two caveats:

    • Task definitions must be identical. Input material, evaluation criteria, and output format should all be standardized, or the comparison is meaningless.
    • Cost should be calculated per successful task, not per call. Failed calls still cost money, so models with high failure rates have inflated effective unit costs.
    1. def cost_per_success(total_cost, successes):
    2. """Compute unit cost per successful task, rather than per call."""
    3. if successes == 0:
    4. return float("inf")
    5. return total_cost / successes

    Intelligence Scores: Benchmarking Model Capability

    Cost alone cannot tell you whether a model is usable. A cheap model with insufficient capability has no value for real business. Model selection therefore needs a capability dimension: the intelligence score.

    An intelligence score is typically a weighted or normalized aggregation of results across multiple benchmarks, covering mathematical reasoning, code generation, common-sense QA, and logical inference. It provides a comparable capability scale across models.

    When using intelligence scores, keep the following in mind:

    1. The composition of the score determines what it reflects. If the test set emphasizes one type of task, the score’s relevance to other scenarios drops.
    2. Benchmarks suffer from saturation and contamination. Some questions have been widely published, and models may have seen similar content during training, inflating scores.
    3. Score gaps must be interpreted in business terms. A few points of difference may matter greatly for complex code generation but be negligible for simple classification.

    Intelligence scores are therefore best suited for initial screening; final decisions should rely on evaluation sets that match your own business.

    Why Use Log Scales and the Pareto Frontier

    Plotting cost and capability on the same chart is an intuitive way to compare models. Because per-task costs can differ by tens of times or more, a linear axis crowds low-cost models together and makes them hard to distinguish. A logarithmic axis spreads out relative differences, making each cost tier clearly visible.

    A common analytical tool for such charts is the Pareto frontier. A model on the frontier satisfies this condition: no other model is both cheaper and more capable. Models outside the frontier generally have no reason to be selected from the current candidate pool.

    The following code shows how to extract the Pareto frontier from a set of candidate models. The data is fictional and for illustration only.

    1. def pareto_frontier(models):
    2. """
    3. models: list of dicts, each {"name": str, "cost": float, "score": float}
    4. Returns models on the frontier, sorted by ascending cost.
    5. Rule: lower cost and higher intelligence score are better.
    6. """
    7. ordered = sorted(models, key=lambda m: m["cost"])
    8. frontier = []
    9. best_score = float("-inf")
    10. for m in ordered:
    11. if m["score"] > best_score:
    12. frontier.append(m)
    13. best_score = m["score"]
    14. return frontier
    15. candidates = [
    16. {"name": "Model A", "cost": 0.05, "score": 52},
    17. {"name": "Model B", "cost": 0.20, "score": 48},
    18. {"name": "Model C", "cost": 0.40, "score": 61},
    19. {"name": "Model D", "cost": 1.20, "score": 60},
    20. {"name": "Model E", "cost": 3.00, "score": 68},
    21. ]
    22. for m in pareto_frontier(candidates):
    23. print(m["name"], m["cost"], m["score"])

    In the output, Model B and Model D are not on the frontier. Model B costs more than Model A but performs worse; Model D costs far more than Model C yet scores slightly lower. This kind of judgment can directly inform selection discussions.

    For plotting, you can use common scientific computing libraries: set the x-axis to a log scale, the y-axis to the intelligence score, and connect frontier points with a line. This lets a team see at a glance where the cost-effectiveness boundary lies.

    Parameter Count, Knowledge Capacity, and Post-training

    A common intuition in the community is that more parameters mean a stronger model. There is some basis for this, but it is incomplete.

    Parameter count roughly determines how much knowledge a model can store and influences its potential in complex reasoning. However, final capability also depends on:

    • Quality and composition of pretraining data: messy or narrow data limits the model’s ceiling.
    • Post-training: including instruction fine-tuning, RLHF, and reinforcement learning based on verification results. Post-training determines how the model converts existing knowledge into reliable output.
    • Distillation and compression: smaller models can approach larger models’ performance at lower cost by learning from their output distributions.
    • Inference strategy: whether to use chain-of-thought, tool calling, or multiple sampling affects both capability and cost.

    The sensible approach is to treat parameter count as one reference signal, not the sole criterion. A mid-sized model with thorough post-training can outperform an unoptimized larger model on specific tasks while costing significantly less.

    This also explains why some teams favor the路线 of “maximizing one direction at a fixed scale.” The core of this approach is efficiency: under the same resource constraints, maximize capability output per unit of investment.

    A Practical Selection Workflow

    Building on the analysis above, a team can follow these steps for model selection.

    Step 1: Define tasks and success criteria. Clarify the business scenario — customer support QA, code completion, document summarization, or data extraction. Prepare a representative sample set for each task type and agree on explicit success criteria.

    Step 2: Build an internal evaluation set. Public benchmarks are only a reference. Testing with real business data reflects model performance in your own scenario more accurately. Sample size should cover the main edge cases.

    Step 3: Record complete usage data. Log input tokens, output tokens, latency, and success status for every call. Without this data, real cost cannot be computed.

    Step 4: Compute cost per successful task. Divide total spend by the number of successful tasks to get average cost per success. If a model has the lowest unit price but a poor success rate, this metric will expose the problem clearly.

    Step 5: Factor in latency and stability. For real-time interactive scenarios, response time may matter more than cost. For offline batch processing, throughput and unit cost are more critical.

    Step 6: Make trade-offs on the frontier. Place candidate models on the cost-versus-capability chart, identify the frontier, then make the final decision considering budget, latency, and compliance requirements.

    The following code ties together the key calculations from this workflow to generate a simple selection summary.

    1. def summarize_candidate(name, records):
    2. """
    3. records: list of dicts, each with {"tokens_in", "tokens_out", "price_in", "price_out", "success"}
    4. """
    5. total_cost = 0.0
    6. successes = 0
    7. for r in records:
    8. total_cost += (r["tokens_in"] * r["price_in"] + r["tokens_out"] * r["price_out"]) / 1_000_000
    9. if r["success"]:
    10. successes += 1
    11. unit_cost = cost_per_success(total_cost, successes)
    12. success_rate = successes / len(records) if records else 0.0
    13. return {
    14. "name": name,
    15. "total_cost": round(total_cost, 4),
    16. "success_rate": round(success_rate, 3),
    17. "cost_per_success": round(unit_cost, 4) if unit_cost != float("inf") else None,
    18. }

    Common Pitfalls

    The following mistakes are frequent in real-world evaluations:

    1. Looking only at listed prices, not usage. The most common problem, and it leads to underestimating real cost.
    2. Trusting public leaderboards without internal validation. Leaderboards and business scenarios can differ substantially.
    3. Inconsistent comparison conditions. Different prompts, temperature settings, context lengths, or output limits destroy comparability.
    4. Ignoring failure costs. Failed calls still incur charges, plus the overhead of manual review and rework.
    5. Overlooking engineering costs. Integration difficulty, operational burden, and monitoring capability are all part of total cost.

    Avoiding these pitfalls comes down to treating evaluation as an engineering problem: define clearly, measure thoroughly, and make results reproducible.

    How Scenarios Differ

    Different scenarios weight cost and capability very differently.

    • High-frequency, low-complexity tasks, such as text classification and keyword extraction: per-call cost dominates total spending. A sufficiently capable model with low unit cost is usually the right choice.
    • Low-frequency, high-value tasks, such as complex code review and professional document analysis: the cost of errors is high, so capability comes first and cost second.
    • Tasks requiring multi-step reasoning or tool calling: focus on task completion rate, since failure at any step can trigger cascading retries.

    Breaking your workload into clear scenarios and selecting models on the corresponding frontier for each is more efficient than using a single model for everything.