AI Foundations0% complete
0%

Chapter 6 of 2525 chapters remaining

Saved on this device. Mark a chapter complete after reading.

MODULE 2 · LESSON 6 · 13 MIN

Training Data: What Models Learn From and Why It Matters

By Siten Sanghvi · Published · Updated

A language model's training data sets the edges of what it can have learned: which topics and languages it saw often, which it barely saw, the date its reading stopped, and the patterns in its text. It is not the only factor; the training method, later tuning and the surrounding application also matter, and the next lessons cover them. The model is also not a lookup table of its documents, although it can reproduce some passages. But when an answer is thin, stale or skewed, the data is one of the first things to check, alongside whether the application supplies fresh context.

By the end you should be able to read a model's data description, predict where it is likely to be strong, thin or out of date, and decide when to verify an answer or supply the missing material yourself.


What training data is

For a large language model, the data for pre-training (the first large-scale training stage, covered in the next lesson) is mostly text, plus source code. Some models also train on images or audio; this lesson stays with text. Developers usually count it in tokens, the pieces a tokenizer splits text into (Tokens, Embeddings, and Context Windows Explained), not in words or documents.

Scale and sources differ by model. The GPT-3 paper describes a filtered Common Crawl snapshot (45 TB of compressed plaintext reduced to 570 GB, roughly 400 billion tokens) mixed with an expanded WebText, two book collections and English Wikipedia. The Llama 3 paper reports about 15 trillion multilingual tokens with knowledge through the end of 2023. These are two documented examples, not a recipe every model follows.

A common starting point is Common Crawl, a public repository of web-crawl data collected since 2008. Being in a crawl does not mean being in any particular model's training set, and the web is only one source.


From crawl to training set

Raw web text is not training-ready. The GPT-3 authors found that unfiltered or lightly filtered Common Crawl tended to be lower quality than curated sources. Teams make their own choices, but common steps include:

  • Extraction and cleaning: pulling readable text out of HTML and dropping boilerplate such as menus and cookie notices.
  • Deduplication: removing repeated copies. Llama 3 de-duplicated at the URL, document and line level. Repeats matter because models trained on standard datasets emitted memorized text, and deduplicated training cut that roughly tenfold. Verbatim reproduction also grows with how often a passage was duplicated. Deduplication targets repetition, not truth: a false claim written once passes straight through.
  • Quality and safety filtering: heuristics and classifiers. GPT-3's team kept web text similar to reference corpora; Llama 3 removed domains with high volumes of personal information or adult content.
  • Mixing: deciding how much of each source, language and domain goes in, and how often each is sampled. GPT-3 sampled sources it judged higher-quality more often, so mix weights were not proportional to size. Llama 3's final mix was roughly 50% general knowledge, 25% math and reasoning, 17% code and 8% multilingual tokens.

Filters are judgments, not neutral cleaning. The Llama 3 authors note that their line-level deduplication also removed some frequent high-quality text, though results improved overall. A documentation study of the C4 corpus found that its blocklist filtering removed a disproportionate amount of text from and about minority individuals. What is removed and what is up-weighted shapes what the model finds easy to learn.

EXHIBIT 06 / CURATION

Explore the mechanism

Data is a design decision.

Follow what survives a training-data pipeline.

Data is a design decision.Raw1000Deduplicate740Quality filter605Safety filter530UsableDuplicatesBoilerplateUnsafeWrong / biased40 wrong / biased documents survive every filter. No stage checks truth.
Documents now1000
Wrong or biased40
Usable mistakenly removed0

Raw: 1000 documents

No stage here checks truth. Toggle a filter to inspect its removals, including usable text discarded by mistake.

Inspect the example data and reasoning
Data is a design decision. — current illustrative state
ElementWhat to notice
Usable520
Duplicates250
Boilerplate120
Unsafe / personal70
Wrong or biased40

Invented corpus and independent removal rules. No stage here checks truth.

Read the mechanism without interacting
Coverage
Sources and cutoff bound what could have been learned. A corpus is not a verified lookup table.
Curation
Filters remove unwanted text and can also discard usable documents.
Mixing
Sampling weights change emphasis without adding documents.

Toy corpus: 1,000 documents become 530 after three filters. Forty wrong or biased documents survive every stage.

Try explaining it: Which fact your task needs is likely missing from training, and how will you supply or verify it?


How the data shows up in answers

Coverage. A 2022 study of factual question answering found that accuracy tracks how many pre-training documents relate to the question. Larger models handled rare facts better, but the authors estimated that scale alone would need many orders of magnitude to close the gap, and suggested retrieval to reduce the dependence. Languages follow the same logic. GPT-3's data was about 93% English by word count, and Llama 3 reports 8% multilingual tokens in its mix. In a 2023 benchmark of generative models across 70 languages, performance gaps persisted between high-resource languages and under-resourced ones, and the authors examined tokenizer quality as well as data size. Newer models may differ, so test the one you use.

Cutoff. Pre-training data stops at a date, and later events are largely absent from the weights. Anthropic's models overview (checked 2026-11-09) lists two separate entries per model: a "reliable knowledge cutoff", described as the date through which knowledge is most extensive and reliable, and a "training data cutoff". Read both rather than a single date. An application can still supply newer information at request time through search or retrieval (RAG: Retrieval-Augmented Generation Explained), which is also the usual way to supply non-public company documents, since those are typically absent from pre-training data. That changes the input, not the weights.

Bias. Patterns in text can become patterns in a model. Researchers found that word embeddings trained on ordinary web text reproduced human biases measured in psychology, including race and gender associations, and that occupation-gender associations tracked real-world statistics. That second finding is the trap: matching the world as it is does not make an association appropriate for, say, a hiring screen. Data is also not the only source. A survey of bias in machine learning describes a loop between data, algorithms and users, and discusses mitigation before, during and after training. Test your own use case rather than assuming one fix.

Wrong answers. Several things can contribute, and no single one is the explanation. The corpus can contain errors; rare facts have little support; and one analysis of hallucination argues that when a model cannot reliably tell true from false plausible statements, errors follow from training statistics, and benchmarks that reward guessing over "I don't know" reinforce it. Training text can also resurface: researchers extracted verbatim passages from GPT-2, including publicly available personal details, using queries alone.

A confident tone is not verification, but confidence is not pure noise either. One study of pretrained models found that probability estimates tracked accuracy on well-formatted multiple-choice and true/false questions, while a trained predictor of whether the model knew an answer was poorly calibrated on new tasks. The study did not test chat-style wording, and it found that its own models tuned with human feedback looked miscalibrated until their probabilities were adjusted (Pre-Training, Fine-Tuning, and RLHF returns to this). Treat a model sounding certain as a prompt to check, not proof.


Synthetic data: training on model-generated text

Synthetic data is text generated by models and used for training. It is used in practice: Llama 3's authors generated over 2.7 million synthetic coding examples for their fine-tuning stage. Training on model-generated content can make the rare parts of the original distribution gradually vanish, which the authors call model collapse, seen in language models and other generative models. Another study found that replacing real data with each generation's outputs degrades models, while accumulating synthetic data alongside the original real data avoided collapse in their experiments. The risk depends on how synthetic data is used, not on whether it appears.


Try it: audit a model's data

  1. Read the documentation. Open a model's technical report or model card. Write down sources, token count, cutoff date, languages, filtering and deduplication. Write "not disclosed" wherever it is silent.
  2. Probe coverage. Pick two topics you know well, one widely documented and one narrow (your city's rules, an internal tool, a minority-language subject). Ask the same detailed question about each and check the answers against a primary source. Expect variation; one test is an anecdote, not a measurement.
  3. Probe the cutoff. Ask about something published after the model's stated cutoff, with and without search or retrieval if your product lets you toggle it.

Then apply a rule: lightly spot-check widely documented, stable topics (common misconceptions are widely documented too); for narrow, recent or consequential ones, verify against a source or supply the source text yourself.


The takeaway

Training data bounds what a model can have learned: its coverage, its stopping date and the patterns in its text. Curation decisions about what to remove and what to up-weight shape those bounds, and none of them is a guarantee of truth or fairness. Read the data description, test the model where your work lives, and verify or supply what the data cannot contain.



Up next

Pre-Training, Fine-Tuning, and RLHF — The Three Phases →

You now know what goes into a pre-training corpus and why curation choices matter. Next we follow the training phases that turn that text into an assistant, including the different data each phase uses.

VISUAL FIELDNOTES / 06

Keep the big picture.

A one-page visual companion. Save it, print it, or explain it to someone else.

Follow what survives a training-data pipeline. Invented corpus and independent removal rules. No stage here checks truth.View the full-size sheet ↗

Data is a design decision.

Follow what survives a training-data pipeline.

One US Letter page · Vector artwork · Fits A4 when printed to fit

Read the key points as text
Coverage
Sources and cutoff bound what could have been learned. A corpus is not a verified lookup table.
Curation
Filters remove unwanted text and can also discard usable documents.
Mixing
Sampling weights change emphasis without adding documents.

Remember: Sources and cutoff bound what could have been learned. A corpus is not a verified lookup table.

Try it: Toy corpus: 1,000 documents become 530 after three filters. Forty wrong or biased documents survive every stage.

Recall: Which fact your task needs is likely missing from training, and how will you supply or verify it?

OPTIONAL CHECK

Check your understanding.

The optional check requires JavaScript. You can continue reading the lesson.

YOUR LEARNING

Keep your place.

Your progress is saved on this device.