What it is
A dataset is a collection of examples that an AI model learns from. It might be millions of web pages, a folder of photos with a label on each one, thousands of hours of recorded speech, a mountain of computer code, or a spreadsheet of past sales. Whatever the format, the idea is the same: the model looks at a very large number of examples and picks up the patterns in them, so that it can handle new cases it has never seen.
It helps to compare it with how a person learns a skill. A child learns what a dog is by seeing lots of dogs, with an adult saying "dog" often enough. Nobody hands the child a definition. A model learns in a similar way, except that it needs far more examples, and it has no adult nearby to point out when the examples are misleading. It takes the data as the truth about the world. Whatever is in the dataset, good or bad, becomes part of what the model "knows".
Datasets come in a few broad kinds, and you'll meet all of them:
- Labelled datasets. Each example comes with an answer attached: this photo is a cat, this email is spam, this X-ray shows a fracture. The labels are usually added by people, one example at a time. Learning from labelled examples is called supervised learning.
- Unlabelled datasets. Raw material with no answers attached, such as a huge pile of text scraped from the web. The model finds the structure on its own, which is the idea behind unsupervised learning. Today's chatbots start this way: during pretraining they read enormous amounts of text and learn to predict the next word.
- Preference and instruction datasets. Smaller, carefully made collections showing the model how to behave: good answers to questions, or pairs of answers where a person marked the better one. These are used in fine-tuning and RLHF to turn a raw text predictor into a helpful assistant.
- Test datasets. Examples held back from training on purpose, so you can check whether the model really learned the skill or just memorised its homework. Public test sets that everyone uses to compare models are called benchmarks.
Two terms come up constantly. "Training data" means the examples the model learns from. A "test set" is the set you keep aside to grade it. Mixing them up is like giving students the exam paper as revision material: the scores look wonderful and mean nothing.
One more thing surprises most people. A large AI dataset is often not a neat folder of files that someone owns. It can be a list of web addresses pointing to images hosted elsewhere, a copy of pages collected by an automated program called a crawler, or a mixture of dozens of smaller datasets glued together. That's why questions like "what exactly is in it?" and "who gave permission?" can be surprisingly hard to answer, even for the people who built it.
Why it matters
The data decides what the model can do. A model can only learn patterns that are present in its examples. A speech recogniser trained mostly on one accent struggles with others. A chatbot trained mostly on English is weaker in other languages. Google's free machine learning course puts it bluntly: the quality and size of the dataset matters much more than which algorithm you use. Engineers have an older, shorter way of saying the same thing: garbage in, garbage out.
Datasets carry the biases of their sources. Bias in AI rarely comes from someone deciding to be unfair. It usually comes from the data quietly reflecting the past. If most of the photos in a face dataset show lighter-skinned men, the model gets good at lighter-skinned men. In 2018 the researchers Joy Buolamwini and Timnit Gebru published "Gender Shades", which found that two widely used face datasets were 79.6 percent and 86.2 percent lighter-skinned people. When they tested commercial face-analysis products on a more balanced set, error rates reached up to 34.7 percent for darker-skinned women, against a maximum of 0.8 percent for lighter-skinned men. The software wasn't told to treat anyone differently. It had simply seen far fewer examples of some people.
Errors in the data become errors in the answers. If the training text contains wrong facts, outdated advice, or confident nonsense, the model absorbs those too. That's one of the reasons chatbots sometimes state false things fluently, a problem covered under hallucination. Mislabelled examples matter as well: if a few hundred cat photos are labelled "dog", the model learns a slightly blurrier idea of both.
What's in the data raises legal and ethical questions. A dataset scraped from the internet can include copyrighted books, personal photos, private details, or harmful material that nobody meant to collect. When that happens, the problem doesn't stay in the dataset. It travels into every model trained on it. This is why privacy, consent, and copyright have become some of the biggest questions in AI, and why several of the examples below ended in public apologies or in court.
For you, it explains a lot of AI behaviour. Once you think in terms of datasets, many oddities make sense. A tool is brilliant at popular topics and vague on niche ones, because the internet has more text about popular topics. An image generator draws "a CEO" as one type of person, because that's what most of its example photos showed. A model doesn't know about last month's news, because its training data stopped before then. None of that is mysterious. It's the dataset showing through.
It matters when you build something of your own. If you run a business and want an AI tool to sort support tickets, write product descriptions in your style, or answer questions from your documents, the examples you give it are a dataset too. The same rules apply at small scale: real examples beat invented ones, a few wrong examples can teach the wrong lesson, and you need some examples held back to check the result.
Real-world examples
ImageNet: the dataset that kick-started modern AI, and its clean-up
In June 2009, a team led by Fei-Fei Li, then a computer science professor, presented a paper at CVPR, the main computer vision conference, introducing ImageNet. The goal was to collect clean, labelled photos for tens of thousands of everyday concepts. At the time of the paper it held 3.2 million images in 5,247 categories, and the team aimed for around 50 million. Labelling at that scale was impossible for a single lab, so the team used Amazon Mechanical Turk, an online marketplace where people are paid small amounts to do short tasks. Several workers voted on whether each photo really showed the named thing, and a photo was accepted only when enough of them agreed. Today ImageNet lists more than 14 million images across nearly 22,000 categories.
ImageNet changed AI because of a yearly competition built on a slice of it, with 1,000 categories. In 2012 a neural network from Alex Krizhevsky, Ilya Sutskever and Geoffrey Hinton, later known as AlexNet, won with a top-5 error rate of 15.3 percent, against 26.2 percent for the next best entry. Top-5 error means the right answer wasn't among the model's five best guesses. That leap persuaded much of the field that deep learning worked, and it was only possible because a big enough, clean enough dataset finally existed.
The dataset's second chapter is just as instructive. ImageNet's categories came from WordNet, an older dictionary-like database of English words, and that included thousands of categories for people, some of them offensive or judgemental. In September 2019, the researcher Kate Crawford and the artist Trevor Paglen published "Excavating AI" and an online project called ImageNet Roulette, which showed visitors the labels a model trained on those categories would give their selfies. Some labels were racist or misogynistic. That same month the ImageNet team published a review of the people categories: of 2,832 categories, it flagged 1,593 as offensive or sensitive, and removing them meant deleting 600,040 images. A dataset built with care by respected researchers still carried the prejudices of its source material for ten years before anyone looked closely.
Amazon's hiring tool that learned to prefer men
In 2014, a team at Amazon began building a system to score job applicants' résumés automatically, so recruiters could find the best candidates faster. The training data was obvious: the résumés the company had received over the previous ten years, and who had been hired. The trouble was that most of those applicants, like most of the tech industry at the time, were men.
On 10 October 2018, Reuters reported what happened next. By 2015 the company had realised the system was not rating candidates for software and other technical jobs in a gender-neutral way. It had learned to penalise résumés containing the word "women's", as in "women's chess club captain", and it downgraded graduates of two all-women's colleges. Engineers edited the system to ignore those particular terms, but there was no guarantee it wouldn't find other ways to sort candidates unfairly. The team was disbanded by the start of 2017. Amazon told Reuters its recruiters had looked at the tool's recommendations but never relied solely on them.
Nobody at Amazon wrote a rule saying "prefer men". The dataset said it for them. Ten years of past decisions contained a pattern, and the model faithfully learned it. This is the clearest everyday lesson about datasets: if you train on history, you get history back, including the parts you would rather leave behind.
LAION-5B: when a giant dataset contains things nobody checked
LAION is a German non-profit that released LAION-5B in 2022, a free dataset of about 5.8 billion image-and-caption pairs gathered from the public web. Note what that means: the dataset itself is a list of links to images hosted on other sites, with the text that appeared alongside them. It became one of the most important resources for training image generators, and the Stanford researchers who later studied it noted that models such as Stable Diffusion had been trained on it.
On 20 December 2023, the Stanford Internet Observatory published a report by David Thiel. Using a combination of automated detection methods, the team identified 3,226 entries in the dataset suspected of being child sexual abuse material, much of it confirmed by outside child-protection organisations. Nobody had put it there on purpose. The collection process simply gathered whatever was on the web, at a scale no person could review. LAION took its datasets offline. On 30 August 2024 it released a cleaned version, Re-LAION-5B, after removing 2,236 links matched against lists supplied by partners including the Internet Watch Foundation and the Canadian Centre for Child Protection.
The lesson reaches well beyond this one case. "Bigger is better" has been the rule in AI data for years, and bigger datasets are harder to check. When a collection is too large for any person to look through, its contents are partly unknown, and so is what the models trained on it have absorbed.
Bartz v. Anthropic: where the books came from
In 2024, the authors Andrea Bartz, Charles Graeber and Kirk Wallace Johnson sued Anthropic, the company that makes Claude, over the books used to train its models. On 23 June 2025, Judge William Alsup of the federal court in San Francisco issued a split ruling. He found that using books to train a language model was fair use, describing it as "exceedingly transformative". He also found that buying print books, scanning them and destroying the paper copies was fair use. But he found that downloading roughly seven million pirated copies from sites such as Library Genesis, and keeping them in a permanent central library, was not, and sent that part of the case towards trial.
Before the trial, the parties settled for $1.5 billion, the largest copyright settlement in US history, covering about 482,460 books at roughly $3,000 per book. At the time of writing (September 2026), the court had granted final approval to the settlement in July 2026, and payments to the authors and publishers who filed claims were due to follow. Other lawsuits over AI training data were still working their way through the courts, and the law is still developing, so check current reporting if this matters to you.
For anyone thinking about datasets, the key point is that the ruling turned on where the data came from, not only on what was done with it. Provenance, meaning the documented origin of each piece of data, has gone from an academic nicety to a very expensive question.
An everyday case: the bakery's review sorter
Imagine Tom, who runs three bakeries and wants an AI tool to sort online reviews into "praise", "complaint" and "question" so his staff can reply faster. He gives a tool 200 old reviews he has labelled himself. It works well in testing, then keeps filing polite complaints as praise. When he looks back, he sees why: nearly all the complaints in his examples were angry, so the model learned that complaints sound angry. He adds forty mild, courteous complaints, such as "lovely staff, but the sourdough was stale", and the problem mostly goes away. Nothing about the tool changed. The dataset did.
Try it yourself
You don't need to train a model to get a feel for datasets. These steps take about an hour and need only a web browser and a chatbot.
- Open a real dataset. Go to the Hugging Face Datasets page (huggingface.co/datasets), a free public library of AI datasets. Search for something that interests you, such as "recipes", "movie reviews" or "customer support". Click on one.
- Read the dataset card. The page usually opens with a description called a dataset card. Look for four things: where the data came from, who labelled it, what language it's in, and what licence it has (the rules for using it). Many cards leave some of these blank. Notice which ones.
- Scroll through the examples. Most datasets have a preview you can browse. Read twenty rows. Look for typos, wrong labels, duplicates, and examples that are odd or offensive. You're doing what data scientists call a quality check, and you'll likely find problems within minutes.
- Ask who is missing. Think about who or what the dataset doesn't represent. Reviews only in English? Photos only from certain countries? Customer messages only from people who complained? Write down one gap.
- Build a tiny dataset of your own. Pick a small sorting task from your own work, such as sorting emails into "urgent", "can wait" and "no reply needed". Collect 30 real examples and label them yourself in a spreadsheet, one per row, with the text in column A and your label in column B.
- Hold ten back. Move ten rows to a separate sheet. Those are your test set. Don't show them to the AI while you set things up.
- Teach and test. Paste the 20 remaining examples into a chatbot with the prompt below, then give it your ten held-back examples one at a time and compare its labels with yours.
- Look at the mistakes. When it gets one wrong, ask whether your examples taught the wrong lesson. Were all your "urgent" emails from one person? Did you only include long messages? Add a few examples that cover the gap and try again. You've just done the work that dataset builders do all day, at a small scale.
A prompt you can copy:
Below are labelled examples of how I sort my emails.
Each line has the email text, then a label.
[paste your 20 examples here]
Using only the patterns in these examples, label the next email
as urgent, can wait, or no reply needed.
Then explain in one sentence which examples guided your choice.
Email: [paste one held-back example]
A second prompt, for checking a dataset you've found:
I'm going to paste 20 rows from a dataset.
Point out any rows that look mislabelled, duplicated, offensive,
or out of place, and describe any group or situation that seems
missing or underrepresented. Don't fix anything, just list problems.
[paste rows here]
Common mistakes and misunderstandings
"More data always means a better model." Size helps, up to a point, but quality and balance matter at least as much. A million messy or one-sided examples can teach a worse lesson than ten thousand careful ones. The LAION case shows the other cost of scale: the bigger the pile, the less anyone knows what's in it.
"The data is neutral, it's just facts." Every dataset reflects choices: where it was collected, what was left out, who wrote the labels and what categories they were given. Amazon's hiring tool learned from real historical decisions, and that's exactly why it was unfair. Real data is a record of the past, not a picture of how things should be.
"The model looks things up in its dataset." A trained model doesn't keep its training data like a library it searches. It keeps compressed patterns in its parameters. That's why it can't reliably tell you where a fact came from, and why it can mix up details. If you want an AI to answer from specific documents and cite them, that's a different technique called RAG.
"If it's on the internet, it's free to use." Public isn't the same as permitted. Copyright, website terms, and privacy law can all apply to material you can see for free, and the rules differ between countries and are still being tested in court. If you're building a dataset for business use, check the licence of every source, and get advice for anything important.
Testing on your training examples. If you check a model with the same examples it learned from, it will look far better than it is. Always keep some examples aside that the model has never seen, as in the steps above.
Ignoring the rare cases. Datasets are naturally full of the common case. The unusual customer, the rare medical condition, the regional accent are all thin on the ground, and those are exactly where models fail. Good dataset work deliberately goes looking for them.
Thinking synthetic data solves everything. Some teams now use AI to generate training examples, known as synthetic data. It helps fill gaps, but a model generating examples passes on its own blind spots and errors, so synthetic data still needs checking by people.
Forgetting to document it. A dataset without notes on where it came from, how it was labelled, and what it shouldn't be used for is a trap for whoever uses it next, including you in six months. In 2018 a group of researchers led by Timnit Gebru proposed "datasheets for datasets", a standard set of questions every dataset should answer. Even a one-page note in your own spreadsheet follows the same idea.
Related elements
- Machine Learning: the broad idea of computers learning from examples, which datasets make possible.
- Supervised Learning: learning from labelled datasets, where each example comes with the right answer.
- Unsupervised Learning: finding patterns in datasets with no labels at all.
- Pretraining: the first, largest stage of training a language model, run on huge text datasets.
- Fine-tuning: further training on a smaller, targeted dataset to teach a model a specific job or style.
- RLHF: training on datasets of human preferences to make a model more helpful.
- Synthetic Data: training examples generated by AI rather than collected from the world.
- Benchmarks: shared test datasets used to compare models with each other.
- Bias: the unfair patterns that datasets can pass on to models.
- Privacy: why personal information in training data is a growing concern.
- Deep Learning: the approach that took off once datasets like ImageNet were big enough.
- Hallucination: one way errors and gaps in training data show up in a model's answers.