Testing (in Data & AI): Checking how well a trained model performs on data it hasn't seen before, to judge whether it will work in the real world. It also includes checking data quality and the behaviour of AI features.
Example
Your model scores 99% on the data it was trained on, but only 71% on a held-out test set. That gap tells you the model has memorised the training data instead of learning general patterns.
Testing a Model Fairly
- Split the dataset before training, and never train on the test set.
- Use cross-validation when data is limited.
- Measure suitable metrics, such as accuracy, precision, recall, or error size.
- Compare against a simple baseline, such as always predicting the most common answer.
Overfitting and Underfitting
| Problem | Sign | Usual fix |
|---|---|---|
| Overfitting | Great on training data, poor on test data | More data, simpler model, regularisation |
| Underfitting | Poor on both | Better features, more capable model |
Beyond the Model
Real projects also test the data (missing values, wrong ranges, changes over time), the pipeline that prepares it, and the AI feature as users see it. For LLM features, teams keep a set of sample questions and check answers for correctness, safety, and format whenever the prompt or model changes.
Related terms
- Training: the step testing evaluates.
- Accuracy: a common test measure.
- Dataset: split into training and test sets.
- Model: what is being tested.
Previous term: Test Scenario | Next term: Testing Environment
Related guides
- AI/ML vs Software Development
- Software Development vs Testing
- How to Explain Your College Project in an Interview
Frequently asked questions
How do you test a machine learning model?
Measure its performance on a held-out test set it never saw during training, using suitable metrics.
What is overfitting?
When a model performs very well on training data but poorly on new data, because it memorised instead of learning general patterns.
What is a train-test split?
Dividing a dataset so the model learns from one part and is evaluated on another.
How are generative AI features tested?
With a set of sample inputs whose outputs are checked for correctness, safety, and format whenever something changes.
Explore more internship terms
The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.
Browse all 199 terms