How to Evaluate AI Models: A Practical Engineering Framework
1. Constructing a Golden Evaluation Dataset
Public benchmarks (like MMLU or GSM8K) are irrelevant for evaluating whether an LLM can classify your proprietary customer support tickets or generate valid SQL queries for your internal Postgres schema.
Build an internal “golden dataset” containing 100 to 500 representative historical examples, including tricky edge cases, malformed user inputs, and adversarial prompts. Grade models deterministically against known unit tests whenever possible.
2. Latency Metrics: TTFT vs. Generation Speed
Evaluate API latency along two distinct vectors:
- Time-to-First-Token (TTFT): How long before the user or service receives the first character? High TTFT destroys conversational interactivity.
- Tokens-Per-Second (TPS): How rapidly does the model stream the remaining generation? Essential for high-throughput background processing.
3. Cost Modeling: Input Tokens vs. Output Tokens
Output tokens are typically priced 3x to 5x higher than input tokens across frontier providers. When designing agent workflows, measure the total token amplification ratio (how many output tokens are generated per input prompt token) to forecast operational budgets accurately.
Start with your task, not a leaderboard
Public leaderboards measure general performance on fixed tests. What matters to you is performance on your work. A private evaluation, run on your own examples, is the most reliable way to choose a model, and it does not need to be complicated.
A practical evaluation in six steps
- Define the task. Write down exactly what the model must do, for whom, and what a good result looks like.
- Collect real examples. Gather 20 to 50 representative inputs from your own work, including difficult and unusual cases.
- Write the scoring rule before you run anything. Decide how you will judge each output: a checklist, a rubric, a unit test, or a comparison against a known-good answer.
- Run every candidate under the same conditions. Use the same prompts, the same inputs, and record the exact model or product version and the date.
- Repeat the runs. Outputs vary, so run each example more than once and look at the spread, not just the best result.
- Count the full cost. Record time, price per completed task, and how much human review each output needed.
Choosing what to measure
| Measure | How to capture it |
|---|---|
| Correctness | Pass rate against your scoring rule or tests |
| Consistency | Variation across repeated runs of the same input |
| Failure behavior | How often it fails silently versus signals uncertainty |
| Speed | Time to a usable result, including retries |
| Cost | Price per completed task, including human review time |
| Data fit | Whether the plan's data-handling terms suit your information |
Metrics for a private evaluation
Avoiding common mistakes
- Testing on examples the vendor has seen. Public benchmark questions may have appeared in training data. Prefer your own, unpublished examples. See benchmark contamination.
- Changing the prompt for the model you like. Keep conditions identical across candidates.
- Judging a single output. One good answer proves little. Look across many.
- Ignoring version changes. A model can be updated; record versions and re-test when it changes.
- Skipping human review. For consequential work, have a person check outputs, and measure how long that takes.
Documenting what you find
Write down the task, the examples, the scoring rule, the versions, the date, and the results, including failures. This is the standard we apply to our own hands-on tests. See our methodology and evaluation records for the fields we require.
Frequently asked questions
How do I test an AI model for my own use?+
Collect 20 to 50 real examples from your work, define how you will score outputs before running anything, run each candidate under identical conditions more than once, and record versions, dates, time, and cost.
Are public benchmark scores enough to choose a model?+
No. Benchmarks measure specific tasks under specific conditions, and results may not match your work. Use them as a starting point and test on your own examples.
How many test examples do I need?+
A set of 20 to 50 representative examples is a practical starting point for many tasks. More helps if the results are close or the stakes are high.
Why run each test more than once?+
Model outputs vary between runs, so a single result can mislead. Repeating runs shows how consistent a model is.
References
- Holistic Evaluation of Language Models (HELM) — Liang et al., arXiv:2211.09110 (accessed October 18, 2026). Background on evaluating models across many scenarios and metrics.
- AI Risk Management Framework — NIST (accessed October 18, 2026). Background on measuring and managing AI risk.