Evaluating Large Language Models: Capability, Cost, and Reliability

    A practical framework for evaluating large language models along three dimensions. Capability: why public leaderboards mislead, how to build a business-specific evaluation set of 50–200 real requests, and how to layer automated metrics, model-as-judge scoring, and human spot checks. Cost: how token billing works, why inputs and outputs are priced separately, how conversation history quietly inflates spend, and four habits that stop quota from being wasted. Reliability: separating time-to-first-token from generation throughput, handling concurrency limits and rate limiting, and which metrics to monitor. The article closes with a six-step selection and evaluation workflow that turns one-off decisions into a repeatable process.

    1. Why Evaluating an LLM Is Harder Than It Looks

    Most people’s first judgment of a language model comes down to a gut feeling about whether the answer “sounds good.” That feeling is unreliable: the same model can behave completely differently with a rephrased prompt, a different context window, or a different use case. The practical problem is usually not that the model “isn’t capable enough” — it’s that the quota gets burned quietly, requests spend too long in a queue, and cost can’t be predicted.

    A professional, reusable evaluation framework therefore needs at least three dimensions: capability (is the answer correct), cost (is the spend justified), and service reliability (does it hold up in use). Each is covered below.

    2. Dimension 1: Capability — From Gut Feeling to Reproducible Benchmarks

    2.1 The Limits of Public Leaderboards

    Public benchmarks are a useful horizontal reference, but they have two inherent weaknesses. First, data contamination: the training corpus may already contain the test set, which inflates scores. Second, scenario mismatch: general-purpose leaderboards measure broad ability, while your business may only care about narrow tasks such as structured extraction, code completion, or long-document summarization.

    2.2 Building a Scenario-Specific Evaluation Set

    The more reliable approach is to build an evaluation set grounded in your own workload. A few principles:

    • Sample 50–200 representative requests from real traffic, covering high-frequency, long-tail, and edge cases.
    • For each sample, define a “reference output” or a set of “scoring criteria” rather than a single correct answer.
    • Keep a small number of trap samples (ambiguity, missing information, easily confused concepts) to probe robustness.

    2.3 Combining Automated and Human Evaluation

    Scoring can be organized in three layers:

    1. Evaluation pipeline
    2. ├── Automated metrics: format compliance, key-information hit rate, JSON parseability
    3. ├── Model review: pairwise scoring of outputs by a stronger model (low-cost first pass)
    4. └── Human spot checks: manual review of high-score, low-score, and disputed samples to calibrate the automated review

    Automated metrics scale well for filtering, model review supports fast iteration, and human spot checks provide final calibration. Combining the three balances cost against trustworthiness.

    3. Dimension 2: Cost — Understanding Tokens and Quotas

    This is the core of the original complaint: credits expire unused, so teams invent make-work tasks to burn them off, which wastes money. Rational usage starts with understanding how billing works.

    3.1 The Billing Model Behind Tokens

    Language models are typically metered by token, not by character or by request count. Token counts vary a lot by language: Chinese often maps to roughly 1–2 tokens per character, while English and code are closer to one token per 3–4 characters. A rough estimate:

    1. def rough_token_estimate(text: str, is_chinese: bool = True) -> int:
    2. """Minimal token estimation for budgeting only, not an exact count"""
    3. if is_chinese:
    4. chinese_chars = sum(1 for c in text if '\u4e00' <= c <= '\u9fff')
    5. # ~1.5 tokens per Chinese character; approximate the rest per character
    6. return int(chinese_chars * 1.5 + (len(text) - chinese_chars) * 0.3)
    7. return int(len(text) / 3.5)

    Note that the real token count is determined by the specific model’s tokenizer. The logic above is only for order-of-magnitude estimation and budget planning, and cannot replace actual usage reporting.

    3.2 Inputs and Outputs Are Usually Billed Separately

    Most services price input tokens (prompt) and output tokens (completion) separately, and output is often the more expensive side. As a result:

    • Long system prompts and repeatedly pasted context continuously inflate input cost.
    • Optimizing for verbose, lengthy responses can grow cost far beyond expectations.

    3.3 The Hidden Cost of Context Length

    In conversational scenarios, stuffing the entire history into the context makes cost grow roughly linearly with the number of turns, and sometimes faster. Common engineering mitigations include sliding-window truncation, summarizing older history, and retrieving only relevant snippets on demand (RAG) — carrying more useful information with fewer tokens.

    3.4 Practices That Avoid Wasting Quota

    “Credits are expiring, so let’s just spend them” is a classic irrational move. More mature alternatives:

    • Build a usage dashboard: track remaining quota and average daily consumption as monitored metrics, instead of discovering the problem right before expiry.
    • Call on demand: don’t consume for the sake of consuming; apply the model where it genuinely improves productivity.
    • Tiered routing: send simple tasks to smaller or lower-cost tiers and reserve high-capability models for complex ones.
    • Cache and reuse: cache results for frequent, repeated questions to avoid paying twice.

    4. Dimension 3: Reliability — Latency, Concurrency, and Queuing

    The original complaint about “not surviving the queue” is really a service-quality problem, which needs to be broken into measurable indicators.

    4.1 Two Kinds of Latency

    • Time to first token (TTFT): the interval from sending the request to receiving the first token, which determines whether the experience feels laggy.
    • Generation throughput (tokens/s): how fast the model keeps producing text, which determines how long a long answer takes.

    Many complaints about “long queues” are actually about inflated TTFT during peak hours.

    4.2 Concurrency and Rate Limits

    Services typically enforce concurrency limits and rate limits (QPS/TPM). When instantaneous demand exceeds the allowance, requests queue up or get throttled. Common countermeasures include exponential backoff retries on the client, peak shaving on the request side (buffering via a message queue), and asynchronous batch processing for non-real-time work.

    1. Handling queues and rate limits
    2. ├── Client side: backoff retries + timeout control + circuit breaking
    3. ├── Middle layer: message queue buffering to smooth peaks, request batching
    4. └── Service side: allocate quota by business priority, protect critical paths

    4.3 Protecting Reliability with Monitoring and Alerts

    In production, set up monitoring for call volume, success rate, latency percentiles (P95/P99), and token consumption, with threshold-based alerts. Logging services that retain per-call detail help locate problems and feed back into cost analysis.

    5. Putting It Together: An Executable Selection and Evaluation Flow

    Combining these dimensions into a closed loop supports continuous decisions rather than a single upfront call:

    1. Define the scenario: clarify the core task and acceptance criteria (accuracy, latency, cost ceiling).
    2. Build the evaluation set: sample real requests and annotate scoring criteria.
    3. Evaluate candidates in parallel: compare different models and tiers on the same evaluation set.
    4. Model the cost: estimate per-request and monthly spend from projected token volume.
    5. Roll out gradually: validate real behavior with a small traffic share.
    6. Monitor continuously: usage dashboard plus alerting plus periodic re-evaluation to close the loop.

    6. Conclusion

    Evaluating a language model is not only about whether its answers seem smart. Capability defines what it can do, cost defines what it can keep doing, and reliability defines whether it holds up when it matters. Treat quota as an asset to manage, evaluation as an engineering process, and monitoring as a daily habit — that is how you avoid wasted credits and repeated queueing, and turn the model into dependable business productivity.