LLM Model Selection: Cost per Task and Intelligence Index
Selecting the right large language model requires more than comparing API prices. This article introduces two complementary metrics—cost per task and intelligence index—shows how to visualize models on a log-scale scatter plot, filters candidates with the Pareto frontier, and provides a practical evaluation workflow with Python examples, common pitfalls, and selection guidelines.
1. Why API Unit Price Alone Is Not Enough
In model selection discussions, API unit price is the easiest number to find—and the easiest to misread. Price lists typically quote a rate per million input or output tokens, which looks straightforward. But it only answers “how much does it cost to process one token?” It does not answer “how much does it cost to get one thing done?”
The issue comes down to parameter scale. Smaller models tend to have lower unit prices because inference requires less compute. However, small models often need more prompting rounds, longer chains of thought, or multiple retries to produce a usable result. These extra costs accumulate and can end up exceeding the total cost of a more expensive model that gets the answer right on the first try.
Therefore, when evaluating model cost, “unit price” should be replaced with “the total cost of completing a task.” This is the starting point for all metrics discussed in this article.
2. Defining and Calculating Cost per Task
Cost per task refers to the total expense of completing one standardized task. The formula is:
Cost per Task = Input Tokens per Task × Input Unit Price + Output Tokens per Task × Output Unit Price
Two points are critical here. First, tasks must be standardized: the same test set, the same evaluation criteria, and the same context length. Second, token consumption must include hidden overhead from the reasoning process, such as internal thinking tokens, content returned by tool calls, and retries after failures.
Here is a general calculation example. All function names and data are for demonstration purposes:
def cost_per_task(input_tokens, output_tokens,input_price_per_m, output_price_per_m):"""Calculate cost per task; prices are per million tokens."""input_cost = input_tokens / 1_000_000 * input_price_per_moutput_cost = output_tokens / 1_000_000 * output_price_per_mreturn input_cost + output_cost# Same task on two hypothetical modelssmall_model = cost_per_task(3_000, 4_000, 0.5, 2.0) # multiple retries, longer outputlarge_model = cost_per_task(3_000, 800, 5.0, 15.0) # one-shot completion, concise outputprint(f"Small model cost per task: {small_model:.5f}")print(f"Large model cost per task: {large_model:.5f}")
In this hypothetical example, the model with the higher unit price does not necessarily cost more per task. What matters is whether it reduces wasted consumption. In real selection work, replace the example data with actual task samples from your own business.
3. Intelligence Index: A Ruler for Model Capability
Cost alone is not enough; it needs to be paired with a capability dimension. The Intelligence Index is a quantitative score of a model’s overall capability, typically aggregated from multiple weighted benchmarks covering math reasoning, code generation, logical judgment, and knowledge Q&A.
When using an intelligence index, keep three things in mind:
- The scoring system should be transparent. You should know the weight of each sub-item and whether the test sets are public, to avoid scores that have been optimized against specific benchmarks.
- Scores reflect average capability, not performance in your specific scenario. Financial Q&A, customer service dialogues, and code review have very different emphases.
- Gaps between scores should be interpreted together with confidence intervals. A difference of a few points may not be significant in most scenarios.
An intelligence index is therefore suitable for coarse filtering. Final decisions should still rely on an internal, business-specific evaluation set.
4. The Two-Dimensional View with a Logarithmic Axis
Plotting cost per task on the horizontal axis and the intelligence index on the vertical axis produces a capability-versus-cost distribution chart. Because costs across models can differ by tens of times or more, a linear axis compresses the low-cost region and makes models hard to distinguish. A logarithmic axis spreads out order-of-magnitude differences evenly, making trends easier to observe.
On this chart, two typical distributions emerge. Models in the upper-left corner combine low cost with strong capability—the high-value region. Models in the lower-right corner combine high cost with weak capability and are usually not worth considering. The models that genuinely need comparison are those in the middle, each making different trade-offs between cost and capability.
5. Pareto Frontier: Filtering Candidate Models
The Pareto frontier is the set of points for which no other model offers both lower cost and higher capability at the same time. Models on the frontier are “non-dominated” and deserve further evaluation.
The following code demonstrates how to extract the frontier from a set of candidate models:
import mathdef pareto_frontier(models):"""models: list of (name, cost_per_task, intelligence_index)Returns models on the Pareto frontier, sorted by cost ascending."""ranked = sorted(models, key=lambda m: m[1])frontier = []best_score = -math.inffor name, cost, score in ranked:if score > best_score:frontier.append((name, cost, score))best_score = scorereturn frontiercandidates = [("Model A", 0.02, 42),("Model B", 0.05, 55),("Model C", 0.04, 50),("Model D", 0.30, 58),("Model E", 0.25, 48),]for item in pareto_frontier(candidates):print(item)
After running this, Model E is excluded because Model C achieves a higher intelligence index at a lower cost. Only the remaining models on the frontier are worth further comparison.
6. How Parameter Scale, Post-Training, and Pricing Relate
Understanding why models land where they do on the chart requires some general technical background.
Parameter scale determines how much knowledge a model can store and also affects the compute required for inference. Given equal training quality, models with more parameters usually have an advantage in knowledge coverage, but their inference costs are higher.
Post-training includes instruction tuning, reinforcement learning from human feedback, and task-specific optimization. It can significantly improve a model’s efficiency on specific tasks, allowing it to reach answers with fewer reasoning steps. This directly affects cost per task.
Pricing strategy is influenced by compute utilization, service scale, and market positioning; it is not determined solely by model capability. Unit price can therefore only serve as a reference, not as a proxy for capability or efficiency.
These three factors interact to determine a model’s position on the chart. Understanding them helps explain why some small models offer great value, while some large models hold an advantage on complex tasks.
7. Putting It into Practice: Building a Selection Workflow
The following steps establish a reusable selection process.
Step 1: Define business tasks. Break requirements down into typical task types—such as information extraction, long-document summarization, code repair, and multi-turn dialogue—and prepare standard answers or scoring rules for each type.
Step 2: Build an evaluation set. Prepare at least dozens to hundreds of real samples per task type, covering both common and edge cases. Samples should be isolated from training data to avoid inflated evaluation results.
Step 3: Record actual consumption. Run the evaluation set on each candidate model and record input tokens, output tokens, retry counts, and failure rates. Use these to compute cost per task.
Step 4: Compute capability scores. Apply unified evaluation criteria—such as accuracy, human ratings, or automated test pass rates—to produce comparable capability scores.
Step 5: Plot the frontier and decide. Place the results on the two-dimensional chart, extract the Pareto frontier, and then make the final choice by factoring in non-functional requirements such as latency, data compliance, concurrency capacity, and operational cost.
8. Common Pitfalls and Notes
- Looking only at unit price. This is the most common misjudgment; always use cost per task as the standard.
- Looking only at leaderboards. Public benchmark test sets may not match your business scenario; validate with an internal evaluation set.
- Ignoring stability. The same model’s output can fluctuate across time and temperature settings; sample multiple times and average the results.
- Overlooking hidden costs. Engineering integration, prompt maintenance, error fallbacks, and human review all affect total cost of ownership.
- Chasing the strongest model blindly. If the task itself is simple, a model with sufficient capability and lower cost is often the more reasonable choice.
In summary, model selection is about finding balance among capability, cost, and engineering complexity. Unified metrics and a standardized evaluation process make decisions clearer and make it easier to re-evaluate when business needs change.
