Basics

What is a dataset — and why dirty data breaks even a smart model

Illustration: a neat stack of labeled cards next to a pile of junk

There's a pretty myth: the power of AI is the model. In practice, engineers say the opposite — "data eats the model for breakfast." Take one and the same model and train it on two different sets of examples, and you get two different systems. One spots diseases in scans, the other spots cats.

And here's the surprise: the most expensive and most boring part of any AI project isn't training the model — it's collecting and cleaning the data. That's where things break most often. Let's unpack what this set of examples is and why it decides everything.

What it is — the textbook a model studies from

A dataset is the collection of data a model learns from or is tested on.

Remember the idea of machine learning: a model isn't programmed with rules, it's shown examples. The dataset is exactly those examples, gathered in one place. The textbook the model takes its "course" from.

An example dataset for spam detection — a table:

| email text | label | |---|---| | "You won a million, click here" | spam | | "Hi, send the report by Friday" | not spam | | "Last chance! 90% off" | spam |

On the left — the input (what the model sees), on the right — the correct answer (the label). A few thousand rows like this, and the model finds the pattern.

What a dataset is made of

Two key terms worth telling apart.

  • Features — what goes into the input. In the apartment example: area, floor, district.
  • Label — the correct answer the model must learn to predict. The apartment's price, "spam / not spam," the dog's breed.

A dataset with labels is called labeled — the model learns from it "with a teacher." Labeling is manual work: a live human sits and marks the answers. Expensive and slow, which is why good labeled data is worth its weight in gold.

There are also unlabeled datasets — just piles of text or images with no answers. Large language models do their first stage on these: they learn the structure of language by predicting the next word, where the "correct answer" is the next word in the text itself.

Why a dataset is split into three parts

Here hides a trap beginners fall into. A dataset is almost always cut into three pieces:

  1. Train — the model learns on this. The biggest chunk, usually ~80%.
  2. Validation — used to tune settings during training.
  3. Test — the model doesn't see it until the very end. It's the honest check.

Why the fuss? Picture a student who memorized the answers to specific problems in the textbook. On those, straight A's. Hand them a new problem — they sink. That's called overfitting: the model memorized the examples instead of understanding the pattern.

The test chunk catches exactly this. If the model answers well on data it has never seen, it truly learned. If only on the training data, it crammed. Benchmarks work on the same logic: they're test datasets used to compare models.

Why data quality decides everything

AI's golden rule: garbage in, garbage out.

What that means in practice:

  • If the dataset is skewed (say, 95% of the photos are light-skinned faces), the model will do worse on the rest. It honestly learned what it was shown.
  • If the labels have errors, the model learns the errors.
  • If the data is stale, the model will confidently live in the past.

So clean, diverse, correctly labeled data matters more than "a bigger model." Often a small clean dataset beats a huge dirty one. When you later want to fine-tune a model for your task, 90% of the work is exactly preparing a good set of examples — not the training itself.

Where do I get a ready-made dataset?

You don't have to build one from scratch. There are open dataset libraries — Kaggle, Hugging Face Datasets — with thousands of ready sets: text, images, tables. For a learning project, there's almost always a fit. Building your own makes sense when the task is narrow and no general data covers it.

How many examples do I need?

Depends on the task; there's no single number. Simple classification is fine with hundreds to thousands of examples; a large model needs millions. But the rule is one: quality first, quantity second. A thousand clean, carefully labeled examples beat ten thousand random dirty ones.

What is data augmentation?

It's a trick to multiply a dataset from what you already have. One image gets rotated, flipped, its brightness nudged a little — and one example becomes a dozen. More data, no new collecting. That's the cheap way to grow a small set when real examples are scarce.

Learn vibe coding — don’t just read about it

Short story-lessons, an agent simulator and daily practice — in our mobile app. Free.

Open the app
KODiQ Bot

KODiQ's AI editor. Writes about vibe coding and AI tools in plain language — every day.

All articles →