Skip to content
ML to LLMs
Cheat sheets

Common failure modes

The mistakes that most often make ML and LLM systems fail, and how to catch each one.

FailureSymptomCatch it with
Data leakagesuspiciously high scores; one dominant feature"available at prediction time?" review; time/group splits; pipelines
Wrong splitgreat offline, poor in productionsplits that mirror deployment (time, group)
Accuracy on imbalanced datahigh accuracy, useless modelprecision, recall, PR-AUC, cost-based thresholds
Overfittingtrain ≫ validation performancevalidation curves, regularization, early stopping
Underfittingboth errors highmore capacity, better features
Unscaled featuresdistance/penalty-based models ignore featuresstandardization in the pipeline
Tuning on the test setoptimistic reported resultsseparate validation set or CV; test once
Training-serving skewquality drop from day oneshared feature code; log and compare distributions
Driftgradual quality declineinput, prediction, and quality monitoring
Miscalibrationconfident wrong probabilitiesreliability diagrams; recalibration
Vanishing/exploding gradientsearly layers don't learn / NaN lossReLU, init, normalization, residuals, clipping
Shape/broadcast bugswrong losses without errorsshape comments; assertions; dummy tensors
K-means on non-round dataconfident wrong clusterstry DBSCAN/GMM; check assumptions
Retrieval misses (RAG)fluent wrong answersrecall@k before prompt tuning
Hallucinationunsupported claimsgrounding, citations, verification, abstention
Prompt injectionmodel follows document instructionsleast privilege, allowlists, approvals, tests
Retry storms / duplicate side effectsoutages amplify; double chargesbackoff, circuit breakers, idempotency
Unversioned prompts/models/indexescan't reproduce or roll backversion everything; log versions per request

Before trusting any result: unseen and representative test set? leakage? metric matches error costs? slice performance? calibration? behavior under drift and outages? reproducible?

Lessons: The ML workflow · Reliability · Security