← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

AI Evaluation Metrics

AI / ML Advanced
debt(d8/e6/b6/t6)
d8 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'silent in production until users hit it' (d9), minus 1. The detection_hints say 'automated: no' — there are no tools that automatically detect missing evaluation metrics. The code pattern is 'AI features deployed without evaluation,' which is an absence of process rather than a detectable code smell. Only careful code review or operational observation (degraded output quality noticed by users) would reveal the gap. Scored d8 rather than d9 because a disciplined team with code review checklists could catch the omission before production.

e6 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5), plus 1. The quick_fix says 'build an eval set of 50-100 representative test cases with expected outputs — run it on every model/prompt change.' While conceptually straightforward, this requires creating a held-out dataset, defining expected outputs, writing evaluation harnesses, integrating into CI/CD, and potentially adding human evaluation workflows. This touches infrastructure, testing pipelines, and deployment processes — more than a single-component refactor but not a full architectural rework.

b6 Burden Structural debt — long-term weight of choosing wrong

Closest to 'persistent productivity tax' (b5), plus 1. Once you commit to evaluation metrics, every prompt change, model update, and AI feature modification must pass through the eval pipeline. This applies across web and CLI contexts per applies_to. It's a persistent process burden that shapes how teams ship AI features — not quite 'defines the system's shape' (b9), but stronger than a localized tax because it affects every AI-related work stream and requires ongoing maintenance of eval datasets.

t6 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5), plus 1. The misconception states 'Higher BLEU score always means better output' — developers assume automated metrics like BLEU directly measure quality when they only measure n-gram overlap. Common mistakes include using BLEU for conversational AI, relying on a single metric, and evaluating on training examples. These traps contradict reasonable developer intuitions (a metric called 'evaluation' should evaluate quality), but they don't quite reach t7 severity since the limitations of BLEU/ROUGE are fairly well-documented in ML literature. The combination of multiple independent traps (wrong metric choice, data leakage, single-metric reliance) pushes this to t6.

About DEBT scoring →

Also Known As

BLEU ROUGE F1 score LLM evaluation evals

TL;DR

Quantitative measures for assessing LLM output quality — BLEU, ROUGE, perplexity for text generation; precision, recall, F1 for classification; human evaluation for open-ended tasks.

Explanation

Automated metrics: BLEU (n-gram overlap with reference — machine translation), ROUGE (recall-oriented — summarisation), Perplexity (how well a model predicts text — lower is better), BERTScore (semantic similarity using BERT embeddings). Task-specific: Accuracy/F1/precision/recall for classification, pass@k for code generation (does generated code pass k tests?), faithfulness for RAG (is the answer grounded in the retrieved context?). Human evaluation remains the gold standard for open-ended generation but is expensive. LLM-as-judge (using a powerful LLM to evaluate outputs) scales better than human evaluation.

Watch Out

A model that scores well on automated metrics can still produce confidently wrong answers — hallucination is not captured by n-gram overlap metrics like BLEU.

Common Misconception

Higher BLEU score always means better output — BLEU measures n-gram overlap with a reference, not semantic quality; a grammatically correct paraphrase with different wording scores low despite being equally good.

Why It Matters

Without evaluation metrics, you cannot tell if a new prompt or model version is better or worse — evals prevent regressions and enable systematic improvement of AI-powered features.

Common Mistakes

  • Relying on a single metric — combine automated metrics with human spot-checks.
  • Evaluating on training examples — always use a held-out evaluation set.
  • BLEU for conversational AI — it measures surface similarity, not whether responses are helpful.
  • No regression testing — model updates or prompt changes should be tested against an eval dataset.

Avoid When

  • Do not rely solely on BLEU or ROUGE for conversational or creative tasks — high overlap scores can mask poor quality.
  • Avoid treating a single metric as a proxy for overall model quality — LLMs trade off across dimensions (accuracy, safety, fluency).
  • Do not skip evaluation between model upgrades — provider-side changes can silently degrade task-specific performance.

When To Use

  • Use automated metrics (BLEU, ROUGE, F1) for regression testing — they catch regressions between prompt or model versions cheaply.
  • Apply human evaluation for open-ended outputs where automated metrics miss nuance, tone, or factual accuracy.
  • Use task-specific metrics (exact match, pass@k for code) when the output has a verifiable ground truth.

Code Examples

💡 Note
The bad approach asks colleagues informally; the fix defines a held-out eval set with ground truth answers and measures accuracy consistently across prompt and model changes.
✗ Vulnerable
// No evaluation — subjective assessment only:
// Changed the system prompt
// Asked 3 colleagues: 'does this seem better?'
// Deployed to production
// 2 weeks later: support tickets about wrong answers
// No way to detect the regression automatically
✓ Fixed
// Eval dataset + automated scoring:
$evalSet = [
    ['input' => 'What is SQL injection?', 'expected_topics' => ['parameterised', 'prepared statement']],
    // 100+ examples...
];

$scores = [];
foreach ($evalSet as $example) {
    $response = $llm->complete($example['input']);
    // Check expected topics mentioned:
    $score = count(array_filter($example['expected_topics'],
        fn($t) => str_contains(strtolower($response), $t)
    )) / count($example['expected_topics']);
    $scores[] = $score;
}
$avgScore = array_sum($scores) / count($scores);
// Fail deploy if score drops > 5% from baseline

Added 16 Mar 2026
Edited 31 Mar 2026
Views 136
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 1 ping W 1 ping T 0 pings F 1 ping S 0 pings S 0 pings M 1 ping T 2 pings W 0 pings T 0 pings F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 2 pings F 0 pings S 0 pings S 0 pings M 0 pings T 2 pings W 0 pings T 0 pings F
No pings yet today
No pings yesterday
Scrapy 23 Amazonbot 14 Google 9 Ahrefs 6 Perplexity 6 SEMrush 6 Bing 4 PetalBot 4 ChatGPT 3 Unknown AI 3 Twitter/X 2 Brave Search 2 Applebot 2 Meta AI 1
crawler 83 crawler_json 2
🧱 FUNDAMENTALS — new to this? Start with the ground floor.
Training ai_ml Training is the process of showing an AI model many examples so it can learn patterns and make predictions on new data it hasn't seen before.

Training is the step that actually creates the model — everything else in AI, from prompts to fine-tuning, depends on what happened during training. Understanding it demystifies why models behave the way they do.

💡 Always split your data into training and test sets — if you evaluate on data the model saw during training, you're grading a student on the same questions they studied.

Ask Codex about Training →
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: High
⚡ Quick Fix
Build an eval set of 50-100 representative test cases with expected outputs — run it on every model/prompt change before deploying to production
📦 Applies To
any web cli
🔗 Prerequisites
🔍 Detection Hints
AI features deployed without evaluation; no benchmark comparing model versions; no regression testing for prompt changes
Auto-detectable: ✗ No
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: Medium ✗ Manual fix Fix: Medium Context: File Tests: Update


✓ schema.org compliant