AI glossary: Training and models

What Is Training Data in AI? Training, Validation and Testing Data Explained

Satvik ParamkushamUpdated October 5, 20266 min read

Definition

Training data is the set of examples an AI or machine learning model learns from. The model studies patterns in this data, such as labelled photos or text, and adjusts itself so it can make predictions on new data.

In Hindi: Training data woh examples hain jinse AI model seekhta hai, jaise student practice questions se seekhta hai.

What is training data in AI?

Training data in AI is the collection of examples a model learns from during training.

A machine learning model does not come with rules written by a programmer. Instead, it looks at thousands or millions of examples and finds patterns on its own. Those examples are the training data. Some everyday cases:

  • Spam filter: emails marked "spam" or "not spam".
  • Crop disease app: leaf photos tagged with the disease name or "healthy".
  • House price model: past sales with area, location, number of rooms and final price.
  • Chatbots and LLMs: huge amounts of text, such as web pages, books and code, plus smaller sets of human written example conversations.

If the training data is wrong, incomplete or one-sided, the model will copy those problems, which is how AI bias often starts.

What is training data and testing data?

Training data is the part of your dataset the model learns from, and testing data is a separate part kept hidden until the end to check how well the model works on examples it has never seen.

Most projects also keep a third part, validation data, for tuning while training is still going on.

PointTraining dataValidation dataTesting data
PurposeTeach the modelTune settings and pick the best versionGive a final, honest score
Does the model learn from it?YesNo, only used to checkNo
When usedEvery epochDuring training, after each epochOnce, at the very end
Exam analogyTextbook and practice questionsMock testsThe real board exam
Typical share (rule of thumb)About 70 to 80 percentAbout 10 to 15 percentAbout 10 to 15 percent

The golden rule: testing data must stay unseen. If it leaks into training, your test score becomes meaningless, like a student who saw the question paper a day early.

Why do we split data into training and testing sets?

We split data so we can measure how well a model handles new data, not just data it has already memorised.

A model can score nearly 100 percent on its own training data and still fail in the real world. That problem is called overfitting. The only way to catch it is to test on examples the model never trained on.

The split also keeps you honest. If you keep changing your model until the test score looks good, the test set slowly turns into another training set. That is why the validation set exists: you tune on validation data and touch the test set only once.

A few practical rules help:

  1. Shuffle before splitting, so each part has a fair mix of examples.
  2. Keep classes balanced across splits (called stratified splitting) when some labels are rare.
  3. For time based data, like sales or stock prices, train on older data and test on newer data instead of shuffling.
  4. Remove duplicates that appear in both training and testing data.

What is a good train test split ratio?

A common rule of thumb is 80 percent training and 20 percent testing, or 70 percent training, 15 percent validation and 15 percent testing when you need a validation set.

These numbers are starting points, not laws:

  • Very large datasets: even 1 or 2 percent of a million examples is plenty for testing, so splits like 98, 1 and 1 are used.
  • Small datasets: a single split can be unlucky. Use k-fold cross-validation, where the data is split into k parts and each part takes a turn as the test set.
  • Imbalanced data: make sure rare classes appear in every split.

I suggest you decide the split before you look closely at the results, write it down, and never change the test set to make your model look better. Interviewers for data scientist roles often probe exactly this habit.

What makes good training data?

Good training data is accurate, correctly labelled, large enough and representative of the real situations the model will face.

  • Correct labels: in labelled training data, every example carries the right answer, such as "cat" on a cat photo. Wrong labels teach wrong lessons.
  • Representative: a face detection model trained mostly on one skin tone, or a speech model trained only on one accent, will work worse for everyone else.
  • Enough variety: different lighting, angles, languages, regions and edge cases.
  • Clean: duplicates, blank rows and corrupted files removed.
  • Legal and ethical: collected with permission, respecting privacy and copyright.

Labelling is often done by people, which is slow and costly, so teams write clear labelling guidelines and check samples for agreement between labellers.

For LLM fine-tuning, training data often looks like simple question and answer pairs, one example per line, in a format called JSONL:

{"prompt": "What is the capital of India?", "completion": "New Delhi"}
{"prompt": "Translate to Hindi: Good morning", "completion": "Suprabhat"}

The exact format changes from provider to provider, so always follow the current documentation.

Training data and testing data for Class 10 AI students

For CBSE Class 10 AI, remember this: training data is used to teach the model, and testing data is used to check how well the model learned.

In the AI project cycle you study, collecting data happens in the Data Acquisition stage, and testing data is used in the Evaluation stage. A simple exam friendly example:

  • You want an AI that tells apples from oranges.
  • You collect 1,000 labelled fruit photos.
  • You use 800 photos as training data so the model learns colour, shape and texture.
  • You keep 200 photos as testing data and ask the model to identify them.
  • If it gets 180 right, its accuracy on testing data is 180 out of 200, which is 90 percent.

The testing photos must be different from the training photos, otherwise the test is not fair.

Frequently asked questions

What is the difference between training data and testing data?

Training data is used to teach the model, while testing data is kept aside and used only at the end to check its performance on unseen examples. The model never learns from the testing data.

What is labelled training data?

Labelled training data is data where each example comes with the correct answer attached, such as an email marked spam or a photo tagged dog. Supervised learning models need labelled data to learn the link between input and answer.

What is biased training data?

Biased training data does not fairly represent the real world, for example a hiring dataset made mostly of past male hires. A model trained on it tends to repeat that unfairness in its predictions.

Where does ChatGPT get its training data?

OpenAI says its models are trained on a mix of publicly available information, data accessed through partnerships, and data provided or created by users and human trainers. The exact datasets are not fully public and can change between model versions.

Can the same data be used for training and testing?

No, not if you want an honest result. Testing on training data only shows how well the model memorised, not how well it works on new data.

References