How to Calculate LLM Cost-Effectiveness: A Dual-Dimension Evaluation of Answer Quality and Unit Cost

    When teams benchmark large language models on scores alone, they often pick a model they cannot afford at scale. This article makes the case for evaluating LLMs on two dimensions at once—answer quality and unit cost—and shows how to do it rigorously. It walks through how to build a credible evaluation set (unified environment, a sufficiently diverse question set, and a reproducible scoring rubric), how to quantify answer quality, and how to compute the effective cost per usable answer. Along the way it explains why a ~30B model can match much larger models on relative quality at roughly a fraction of the cost, and closes with practical recommendations for enterprises, including CI-integrated evaluation, tiered routing, and cost observability.

    1. Problem Background: From “Who’s Smarter” to “Who’s More Cost-Effective”

    Historically, model evaluation focused on benchmark scores and the question of “who is smarter.” But once a model reaches production, teams run into a more practical problem: a model that is marginally smarter, but whose per-question cost is an order of magnitude higher, will blow the budget under million-scale call volumes.

    A recent, widely discussed enterprise study offers a useful approach. The researchers connected models of different sizes to the same set of financial documents and search environment, then had them complete more than two hundred structured research questions. The result: a model with roughly 30 billion parameters scored nearly identically to larger models on “relative answer quality,” while its median cost per completed question was about 1/40th that of the larger models.

    The value of this finding isn’t which specific model won. It’s the methodology it reveals: evaluating LLMs on a single quality axis is not enough—you must place “unit cost” on equal footing with “answer quality” and assess them jointly. That is the core of this article.

    2. What LLM Cost-Effectiveness Means: Two Dimensions You Must Evaluate Together

    In an engineering context, “cost-effectiveness” is never a single metric; it’s an intuitive expression of a ratio. For model selection, it means constraining at least two dimensions at the same time:

    • Quality dimension: Is the answer accurate, complete, traceable, and correctly formatted? Can it be trusted directly by downstream systems or people on real business tasks?
    • Cost dimension: What is the inference overhead of completing one full task? This includes input/output token consumption, retrieval calls, number of retries, and the additional engineering overhead needed to reach usable quality (such as multiple sampling, voting, or secondary verification).

    Talking about quality alone leads you to pick the option with the highest capability ceiling but one you can’t afford. Talking about cost alone leads you into the trap of “cheap but wrong.” The question that actually matters is: Among the options that meet the quality bar, which one has the lowest unit cost per usable result?

    The word “usable” deserves emphasis. If a model is cheap per question but needs to be run three times with majority voting to reach usable accuracy, its true cost is multiplied by three. If its answers often require manual rework, that rework time should also be folded into the cost. Many options that “look cheap” give back their advantage precisely in these hidden steps.

    3. How to Build the Evaluation Set: Three Elements That Make Results Credible

    The study above is persuasive largely because its design followed several core principles of evaluation methodology. To reproduce the approach, focus on three elements.

    1. Unified environment (controlled variables)
    Every model under evaluation must be connected to the same knowledge corpus and the same search/retrieval environment. This is critical: enterprise research tasks depend heavily on the quality of external-document retrieval. If different models face different indexes or different retrieval tools, the gap you measure mixes in “environment differences” rather than “model differences.”

    2. A sufficiently large and diverse question set
    The number of questions must be large enough to cover the task distribution. Two hundred-plus questions is a pragmatic scale—large enough for the statistics to stabilize, yet not so expensive that you can’t rerun frequently. Questions should be designed to reflect real business work: include both fact-based questions whose answers can be located directly in the documents, and analytical questions that require synthesizing across documents and multi-step reasoning. Avoid concentrating everything on easy “gimme” questions, which artificially inflates scores.

    3. A reproducible scoring rubric
    A figure like “relative answer quality 1.34” must rest on a fixed scoring rubric and judging method (human review or a judge-model score). Only when the criteria are consistent and traceable can scores across models be compared horizontally.

    4. How to Quantify Answer Quality

    There are usually two technical routes for quality evaluation, and in practice they are often combined:

    • Rule-based / metric-based evaluation: For question types with a standard answer, use objective metrics such as exact match or key-element hit rate.
    • Model-based / human-review evaluation: For open-ended analytical questions, use a “judge model” to score, or expert review, producing an aggregate score across dimensions such as accuracy, completeness, logical coherence, and traceability.

    Either way, define the scoring dimensions explicitly. A practical quality profile can be organized like this:

    1. # Illustrative: structuring a single-question quality score (not a specific vendor API)
    2. quality_schema = {
    3. "answer_correctness": 0.0, # Whether the answer is correct
    4. "completeness": 0.0, # Whether key elements are all present
    5. "traceability": 0.0, # Whether it can be traced back to the cited source
    6. "format_compliance": 0.0, # Whether the output format complies
    7. "overall": 0.0, # Weighted overall score
    8. }

    In enterprise research, “traceability” is an often-underrated but extremely important dimension—an answer must point back to a specific source in the documents, or even a “correct” answer won’t be trusted by professional users.

    5. How to Calculate Unit Cost

    The rigor of your cost accounting directly determines whether your cost-effectiveness conclusion holds. Start with the median cost per question, which resists interference from a few unusually long questions better than the average. A complete cost list should include at least:

    • Token cost: Input tokens (including retrieved context that gets concatenated) and output tokens are billed separately, and their unit prices often differ.
    • Retrieval cost: The overhead of each search/retrieval call.
    • Retry and sampling cost: Multiple rounds of calls made to improve accuracy.
    • Engineering amortization: The additional infrastructure overhead required to support the approach.

    A reusable cost-estimation framework looks like this (a general logic example, not a specific product’s pricing rules):

    1. def estimate_cost_per_question(cfg, run):
    2. """Estimate the effective cost per question (illustrative logic)"""
    3. token_cost = (
    4. run.input_tokens * cfg.input_price
    5. + run.output_tokens * cfg.output_price
    6. )
    7. retrieval_cost = run.num_retrievals * cfg.retrieval_price
    8. retry_cost = (run.num_retries) * (token_cost + retrieval_cost)
    9. # Effective cost: include the extra price paid to meet the quality bar
    10. effective_cost = (token_cost + retrieval_cost + retry_cost)
    11. return effective_cost / cfg.quality_gate_pass_rate

    The last line is the key: dividing by the “quality gate pass rate” yields the true cost of each usable answer. This effectively penalizes options that are “cheap but frequently fail.”

    6. Why Small Models Can “Win with Less”

    Once you understand this methodology, the phenomenon of “a 31B model approaching larger models at 1/40th the cost” makes sense. The reasons usually come down to three points:

    1. Retrieval augmentation “reduces the dimensionality” of the task
    In enterprise research scenarios like this—i.e., RAG setups—the model’s role is more to “read and organize the retrieved material into an answer” than to “recall world knowledge from its parameters.” When the context already provides enough information, the model’s reliance on internalized world knowledge drops, and so does the marginal benefit of more parameters.

    2. Cost rises non-linearly with scale
    Inference cost is determined jointly by parameter count, context length, and output length. A larger model faces clear disadvantages in per-token cost, memory footprint, and concurrency. When quality is close between two models, the smaller one’s cost advantage gets amplified into an order-of-magnitude gap.

    3. The leverage effect of high-quality fine-tuning
    Targeted training for a vertical domain can often let a smaller model match or even exceed an un-optimized general-purpose larger model on a specific task distribution. This means “strongest in general” and “most cost-effective for this scenario” are often not the same model.

    7. Practical Recommendations for Enterprises

    Turning the methodology into engineering practice, here are some actionable recommendations:

    • Build an internal evaluation set and integrate it into CI: Turn this “quality + cost” evaluation into a pipeline that can be rerun regularly, so any model or prompt change triggers a comparison. This avoids gut-feel decisions.
    • Tiered routing: Send easy questions to a small model and hard questions to a larger model or trigger an escalation policy. This is the key architectural pattern for making cost-effectiveness real—it lowers cost while preserving the quality ceiling.
    • Use observability to support cost governance: With general cloud capabilities such as logging and monitoring/alerting, capture metrics like token consumption, pass rate, and per-question cost into observability dashboards, so cost optimization is grounded in data.
    • Prioritize retrieval quality over blindly switching to bigger models: In many scenarios, improving recall and reranking quality and optimizing context organization boosts cost-effectiveness more than upgrading to a larger model.
    • Watch for elasticity and concurrency: Beyond per-question cost, evaluate stability and scaling under high concurrency during selection, and validate with load testing using infrastructure such as container platforms.

    8. Conclusion

    The takeaway from a result like “a model matches on quality while costing 1/40th” isn’t the ranking of any specific model. It’s a reusable evaluation paradigm: first fix the environment and question set, then quantify quality and effective cost at the same time, and finally make selection with data rather than intuition. When a team turns “cost-effectiveness” from a slogan into a reproducible ratio, it can keep finding that “good enough and affordable” optimum under a budget constraint.