In this glossary topic:

What is overfitting?
Overfitting happens when a machine learning model matches its training data so closely that it fails to make correct predictions on new data. Instead of learning the general pattern, the model memorizes the specific examples it was shown, including their quirks.
It's like a student who learns last year's exam answers by heart. That student scores well on last year's paper and then struggles with a new one, because they never learned the subject itself. Google's Machine Learning Crash Course uses a similar picture: an overfit model is like an invention that works well in the lab but is worthless in the real world.
The opposite quality is called generalization: a model's ability to make correct predictions on new, previously unseen data. A model that generalizes well is the goal of training.
What causes overfitting?
Google's crash course names 2 main causes:
- The training data doesn't represent real-life data well. If every example comes from a narrow group of users, situations, or devices, the model learns that narrow slice and little else.
- The model is too complex for the problem. A very flexible model can bend itself around every training example, noise included, instead of finding the simpler pattern underneath.
In Google's tree example, a complex model did a great job on the training set and a poor job on the test set. A test set is separate data held back to check how the model handles examples it hasn't seen. That gap between the 2 scores is the typical sign of overfitting.
How does overfitting differ from underfitting?
Underfitting is the opposite problem. An underfit model doesn't even make good predictions on its training data, because it's too simple or hasn't learned enough. In Google's analogy, it's like a product that doesn't even do well in the lab.
So the 2 failures look different in testing:
- An overfit model scores high on the examples it trained on and low on new ones.
- An underfit model scores low on both.
A well-fitted model sits between them. It does well on the training data and almost as well on data it has never seen.
Why does overfitting matter for product teams?
An overfit model can pass internal testing and still disappoint real users. If the people, phrasing, or situations in real use look a little different from the training data, accuracy drops, and the team may not notice until complaints arrive. A model trained mostly on a single region's users, for example, may stumble on other accents, spellings, or shopping habits.
That's why a single average accuracy score can mislead. Product and design teams can ask what data a model was trained and tested on, and whether that data looks like the full range of people who will use the feature. Testing with realistic inputs from different groups catches problems that a lab score hides.
The AI Fundamentals for UX course covers overfitting alongside the other limits designers need to plan for when working with AI.





