The AI Testing Cheat Sheet Nobody Told You About Evergreen Reference

The AI Testing Cheat Sheet Nobody Told You About

AR
Alex Rivera · Apr 7,2026 · 10 min read

TL;DR

Keep this page bookmarked. It's a Practical glossary of AI testing metrics, methodologies, and evaluation frameworks. From semantic similarity (BLEU, BERTScore) to behavioral testing to drift detection. Organized for quick reference, find what you need, understand when to use it, and move on.

You're building an AI product. Someone asks, "What's our test strategy?" You realize you're using five different evaluation metrics and none of you agree on what they mean.

This happens because AI testing terminology is overloaded, evolving, and scattered across research papers, tool documentation, and Slack conversations. There's no single source of truth.

I built this glossary to fix that. It's organized by category, covers 50+ terms, and tells you when to use each one. Bookmark it. Refer to it. Use it to align your team.

Semantic Similarity & Text Quality Metrics

BLEU (Bilingual Evaluation Understudy)

Measures overlap between generated text and reference text using n-gram precision. Range: 0-1 (higher is better). Penalizes length mismatches.

Use when: Evaluating machine translation, summarization, or any task with fixed reference outputs.

Don't use when: There are multiple valid correct answers. BLEU hates paraphrasing.

Classic, fast, but outdated for modern LLMs. Supplement with semantic metrics.
ROUGE (Recall-Oriented Understudy for Gisting Evaluation)

Variant of BLEU that emphasizes recall instead of precision. ROUGE-1 (unigrams), ROUGE-2 (bigrams), ROUGE-L (longest common subsequence).

Use when: Evaluating summarization. ROUGE-L is particularly good for factual consistency.

Don't use when: You need semantic understanding. ROUGE is pure overlap-based.

Better than BLEU for abstractive summarization. Still n-gram obsessed.
BERTScore

Uses contextual embeddings from BERT to measure semantic similarity between generated and reference text. Computes precision, recall, and F1. Range: 0-1.

Use when: You care about meaning, not surface-level n-gram overlap. Works well for summarization and paraphrase detection.

Don't use when: You need to know if specific entities were preserved (use NER-based metrics instead).

Modern, semantic, but slower than BLEU. Worth the compute.
METEOR (Metric for Evaluation of Translation with Explicit Ordering)

Aligns words using exact match, stem match, and synonymy. Penalizes reordering. Often correlates better with human judgment than BLEU.

Use when: Translating, paraphrasing, or anything where word reordering is acceptable but penalizable.

Don't use when: Speed matters (METEOR is slow due to synonym lookup).

Underrated. Better human correlation than BLEU in many domains.
Cosine Similarity (Embedding-based)

Embeds both generated and reference text, computes cosine distance between vectors. Range: -1 to 1 (higher is better). Fast, lightweight.

Use when: You need a quick semantic check. Real-time monitoring. Continuous evaluation.

Don't use when: You need fine-grained semantic analysis. Embeddings lose detail.

Perfect for continuous monitoring. Pair with deeper evaluations in CI/CD.

Faithfulness & Factuality Metrics

Factual Consistency Score

Measures whether generated output is consistent with source documents. Typically binary (consistent/inconsistent) or scaled (0-1). Can use NLI models, semantic similarity, or question generation.

Use when: Your LLM must not hallucinate. Critical for RAG, summarization, question-answering.

Don't use when: You're generating creative content (poetry, fiction).

Essential for production RAG systems. Invest in robust evaluation here.
Natural Language Inference (NLI)

Uses a model trained on entailment tasks to check if generated text is logically consistent with reference text. Scores entailment, contradiction, or neutral.

Use when: You need semantic-level fact-checking. Works across domains without retraining.

Don't use when: You need domain-specific fact verification (medical claims, legal citations).

Broadly applicable. Models like DeBERTa-based NLI are strong.
Token Overlap / Citation Matching

Measures how much of the generated text is directly copied or closely paraphrased from source documents. Simple but effective.

Use when: You want to know if the model is grounded in your sources (not hallucinating).

Don't use when: You need to measure abstractive quality (this penalizes good summaries).

Quick, interpretable, but crude. Pair with semantic checks.

Behavioral & Robustness Testing

Behavioral Testing (CheckLists)

Systematically tests model behavior across predefined scenarios: negation, argument reversal, numeric variation, etc. Framework popularized by Ribeiro et al. (2020).

Use when: You want Practical coverage of edge cases. Catching adversarial inputs. Stress testing.

Don't use when: You don't have domain-specific scenarios (hard to write good checks).

Highly recommended. Creates a living test suite that grows with discovered bugs.
Adversarial Robustness

Tests how the model behaves under intentional perturbations: typos, paraphrasing, noise injection, or semantic attacks.

Use when: You're concerned about adversarial inputs or distribution shift in production.

Don't use when: Your deployment is controlled (enterprise internal tool).

More important for public-facing APIs. Test your threat model.
Prompt Sensitivity Analysis

Measures how much the output changes with minor prompt variations. High sensitivity = fragile model. Low sensitivity = robust.

Use when: You're building user-facing systems (users will vary their inputs).

Don't use when: Your prompts are fixed and controlled.

Underutilized. Quick way to find unstable behavior.

Data Quality & Drift Metrics

Data Drift Detection

Monitors whether production input distributions differ significantly from training data. Uses statistical tests (KS test, MMD) or distributional distance metrics.

Use when: You're monitoring production models continuously.

Don't use when: Your inputs are known to vary (intentional domain shift).

Critical for production. Set alerts at 2-3 sigma drift.
Performance Degradation Monitoring

Tracks changes in evaluation metrics over time. Alerts when performance drops below baseline. Rolling window comparison.

Use when: You need early warning of model performance issues.

Don't use when: You're okay with discovering problems reactively.

Pair this with drift detection. Degradation often follows drift.
Label Quality Assessment

Evaluates confidence in human-provided labels. Flags low-quality labels, disagreement patterns, and outliers.

Use when: You're building labeled datasets (especially crowdsourced).

Don't use when: Your labels come from single expert (already high confidence).

Often underestimated. Bad labels invalidate your entire evaluation.

Task-Specific Evaluation Metrics

Exact Match (EM)

Binary metric: generated answer matches reference answer exactly (case-sensitive or case-insensitive). Range: 0-1.

Use when: The answer must be precise. QA tasks with single correct answer.

Don't use when: Multiple answers are valid (use F1 instead).

Strict but clear. Pair with F1 for nuance.
F1 Score

Harmonic mean of precision and recall. Ranges 0-1. Good for comparing overlapping answers.

Use when: Multiple valid answers exist or partial credit is meaningful (extractive QA).

Don't use when: You need binary success/failure (use EM).

Standard for QA. Compute token-level and entity-level F1.
Mean Reciprocal Rank (MRR)

For ranking tasks. Measures position of first correct item. Rewards putting correct answers high.

Use when: Evaluating search, retrieval, or ranking systems.

Don't use when: You don't care about ranking order (use recall instead).

Essential for search/RAG. Complements recall metrics.
NDCG (Normalized Discounted Cumulative Gain)

Measures ranking quality. Discounts items lower in the ranking. Normalized to 0-1. More sophisticated than MRR.

Use when: Evaluating recommendation systems or search results where position matters.

Don't use when: You just need simple recall metrics.

Industry standard for ranking. Use NDCG@10, NDCG@5 for different depths.

Model-Specific Evaluation

Hallucination Rate

Percentage of outputs containing factually incorrect information not in the source. Measured manually or with NLI models.

Use when: You need to track how often your model makes things up.

Don't use when: You're evaluating creative tasks (hallucination is expected).

Critical KPI for RAG and fact-dependent systems. Track this closely.
Confidence Calibration

Measures whether model's stated confidence matches actual correctness. Well-calibrated model: 90% confidence = 90% correct.

Use when: You're using model confidence for decisions (rejection thresholds, routing).

Don't use when: You're not using confidence scores operationally.

Often neglected but important. Bad calibration breaks downstream systems.
Token Probability Distribution

Examines entropy or probability mass of generated tokens. High entropy = uncertain. Low entropy = confident.

Use when: You want fine-grained understanding of model uncertainty.

Don't use when: You just need pass/fail metrics.

Advanced technique. Useful for uncertainty-aware systems.

The Quick Reference Table

For Summarization: ROUGE-L, BERTScore, Factual Consistency
For QA: EM, F1, MRR
For Translation: BLEU, METEOR, chrF
For RAG: Retriever Precision, Generator Faithfulness, End-to-End Hallucination Rate
For Production Monitoring: Data Drift, Performance Degradation, Confidence Calibration

How to Choose Your Metrics

Start here: Define your task. What does success look like?

Pick primary metrics: 1-3 metrics that directly measure success. Not proxies. Actual outcomes.

Add secondary metrics: 2-4 diagnostic metrics that help you understand failures. Why did it fail?

Measure human agreement: Before you ship, verify that your metrics correlate with human judgment.

Set baselines: Know what acceptable performance looks like. Don't chase perfect.

Monitor continuously: Track your metrics in production. Alert on degradation.

The best metric is the one you actually use to make decisions. Everything else is noise.

Ready to measure what matters?

alt.qa helps you build Practical evaluation frameworks tailored to your AI system.

Explore evaluation tools
Alex Rivera is a Senior AI Engineer at alt.qa. He's spent 5+ years evaluating everything from machine translation systems to LLM-powered agents. He's obsessed with the gap between vanity metrics and actual performance.