Module 3 · Lesson 7

If a language model learns statistical structure from text, the material it trains on matters enormously. That collection of training material is often called a corpus.

A corpus may contain books, web pages, reference material, code, academic writing, conversations, or other licensed, public, synthetic, or specially collected data, depending on the model and its training design.

A corpus is important, but it is not the whole model

You will sometimes hear that an AI model is only as intelligent as the data it consumes. Data quality matters, but capability does not depend on the corpus alone.

Model behavior emerges from the interaction of several things:

  • training data and how it is sampled;
  • model architecture and parameter count;
  • the training objective;
  • optimization choices and compute;
  • post-training and preference shaping;
  • the context, tools, and retrieval available at inference time.

Raw data usually goes through a curation pipeline

Raw sources
   ↓
source selection
   ↓
quality filtering
   ↓
deduplication
   ↓
privacy / safety processing
   ↓
tokenization and sampling
   ↓
training corpus

Deduplication is especially important. If the same material appears repeatedly, the training distribution can become distorted and the chance of memorizing repeated passages can increase.

Large public datasets illustrate different approaches. Common Crawl provides broad web crawl data that can be filtered into training material. The Pile was assembled as a more deliberately curated research dataset containing multiple kinds of text. Neither example means that simply collecting more bytes automatically produces a better model.

Coverage, quality, and provenance all matter

A useful corpus should represent the kinds of language and knowledge the model is expected to encounter. Poorly balanced or low-quality data can create blind spots and unwanted behavior. Provenance and usage rights also matter because training data is an engineering, legal, and governance concern as well as a machine-learning concern.

The better mental model is this: the corpus supplies experience; the training process determines how that experience is transformed into model parameters.


Demystifying AI series

← Artificial Neural Networks   ·   How Transformers Predict the Next Token →