Machine Learning
Overfitting and Underfitting Explained
Overfitting and Underfitting Explained
Overfitting and underfitting are the two fundamental failure modes in machine learning. They explain why a model might ace every internal benchmark yet disappoint real users — or why it might seem too simplistic to be useful. Recognizing these patterns in model outputs makes you a more diagnostic evaluator.
Underfitting
An underfit model is too simple to capture the patterns in the data. It performs poorly on both training data and new inputs. Imagine fitting a straight line to data that curves — the model misses the signal entirely.
Signs in AI outputs:
- Generic, vague responses that miss the specifics of the prompt
- Consistent failure on a task regardless of how the prompt is phrased
- Inability to handle even moderate complexity
Overfitting
An overfit model memorizes training data, including its noise and errors, rather than learning generalizable patterns. It performs excellently on familiar inputs but poorly on new ones. Imagine a student who memorized exam answers but cannot solve a slightly rephrased question.
Signs in AI outputs:
- Excellent performance on common topics but sudden failure on rephrased or edge-case prompts
- Reproduction of specific errors or phrasing from training data
- Overly confident wrong answers on niche topics (the model "remembers" incorrect training examples)
- Strange fixation on particular formats or styles seen frequently in training
The Sweet Spot
Good models find the balance — complex enough to capture real patterns, constrained enough to generalize. Achieving this balance is why teams invest heavily in data quality, regularization techniques, and human evaluation.
How Evaluators Help
Your evaluations reveal overfitting and underfitting in production:
- Test variations. If a task provides multiple phrasings of the same question, compare results. Large performance gaps suggest overfitting to specific formulations.
- Test difficulty levels. Simple and complex versions of a task reveal whether the model has adequate capacity.
- Note systematic vs. random errors. Underfitting produces consistently poor output. Overfitting produces a mix of excellent and bizarre results.
Connection to Your Ratings
When you rate a response poorly, specify whether the failure seems broad (the model does not understand the task — underfitting) or narrow (the model handles similar cases well but fails this specific variation — possible overfitting or data gap). This distinction helps engineers choose the right fix: more training data, different architecture, or better regularization.
Key Takeaways
- Underfitting: model too simple, fails everywhere
- Overfitting: model memorizes training data, fails on new variations
- Test prompt variations to detect overfitting in evaluation tasks
- Describe whether failures are broad or narrow to guide engineering fixes