Evaluating AI & ML Models: Why 'Looks Good to Me' Breaks in Prod
November 11, 2026 · 6 min read
In normal software, if `calculateTotal(100, 0.18)` passes once, it passes forever. With ML and LLMs, changing one line in a prompt or upgrading a model version can silently fix three cases while breaking ten others.
Classical ML: stop looking only at accuracy
If only 1% of transactions are fraud, a dummy model that predicts "not fraud" every single time gets 99% accuracy — and catches zero fraud. Track **Precision** (how many flagged cases were truly positive), **Recall** (how many real positives you caught), and **F1 score**.
GenAI & LLMs: build a 50-case golden evaluation set
- Collect 30–50 real user queries (including tricky edge cases and out-of-scope prompts).
- Run deterministic checks first: valid JSON schema, citation presence, latency, and token budget.
- Score answer faithfulness and relevance automatically before every prompt or model change.
Once you have a repeatable eval script, improving an AI feature stops being guesswork and starts feeling like real engineering again.