- 1AI training is not one step. It runs through seven stages, data collection, cleaning, labeling, pretraining, fine-tuning, alignment, and evaluation, before a model ever reaches deployment, and training data plays a structurally different role at each one.
- 2Pretraining and fine-tuning sit at opposite ends of a volume spectrum: a compute-optimal 70-billion-parameter model needs roughly 1.4 trillion tokens of mostly unlabeled text, while the fine-tuning and alignment stages that follow run on thousands, not trillions, of curated examples.
- 3Cleaning is not a neutral technical footnote: an audit of the C4 web corpus by Dodge et al. found that blocklist-based filtering, a standard cleaning heuristic, disproportionately removed text written by and about minority groups.
- 4Evaluation only measures real generalization if the held-out test set was never seen during training, and that guarantee is harder to keep than it sounds: Lee et al. found near-duplicate contamination affecting over 4% of the validation sets in standard language modeling benchmarks.
- 5Deployment does not end the pipeline. Sculley et al.'s widely cited paper on machine learning technical debt describes 'hidden feedback loops,' where a live model's own outputs quietly become part of the data used to retrain its next version unless a team deliberately monitors for it.
AI training is the multi-stage pipeline that turns raw examples into a model that behaves usefully in production, and it's a different question from what training data is. Concretely, it runs through seven stages: collecting and sourcing raw data, cleaning and preprocessing it, labeling or annotating it where it needs ground truth, pretraining a model on a huge, largely unlabeled corpus (or starting from a base model someone else already pretrained), fine-tuning it on a much smaller curated dataset for a specific task or domain, aligning its behavior with RLHF or a related preference-tuning method, evaluating it against held-out benchmarks it never saw during training, and deploying it into production, where its real-world outputs quietly become candidate data for the next retraining cycle. Training data isn't one uniform ingredient moving through this pipeline. It changes shape at every stage: trillions of unlabeled tokens at pretraining, thousands of labeled demonstrations at fine-tuning, tens of thousands of ranked comparisons at alignment, and a carefully guarded held-out slice at evaluation. This guide walks through what actually happens at each stage, exactly what role data plays there, a worked end-to-end example, and links to the deep dives on any stage that already has one.
On this page ▾
- What does “AI training” actually mean?
- Stage 1: Data collection and sourcing
- Stage 2: Cleaning and preprocessing
- Stage 3: Labeling and annotation
- Stage 4: Pretraining vs. fine-tuning
- Stage 5: RLHF, preference tuning, and alignment
- Stage 6: Evaluation and benchmarking
- Stage 7: Deployment and the retraining loop
- Worked example: training a customer-support AI assistant end to end
- The pipeline is the point
What does “AI training” actually mean?
Search “what is AI training” and most results answer a different question: what is AI training data. The two are related but not the same thing. Training data is an input, the raw examples a model learns from. AI training is the process that consumes that input: a sequence of distinct stages that starts with raw, uncurated data and ends with a model running in production, serving real requests, and quietly generating the data its next version will train on.
That process has a fairly stable shape across the industry, even though the tools and scale vary enormously between a startup fine-tuning an open-weight model and a frontier lab pretraining one from scratch. Seven stages cover essentially all of it, and training data plays a structurally different role in each one, moving from trillions of raw, mostly unlabeled tokens at the start to a small, carefully curated set of human judgments near the end. It's also worth knowing this isn't a static target: Stanford's AI Index reports that training datasets are doubling roughly every 8 months, with the compute used to train on them doubling roughly every 5. [2]
| Stage | What happens | Training data's role |
|---|---|---|
| Data collection & sourcing | Raw examples are gathered from web crawls, licensed archives, platform logs, or purchased datasets | The largest, least-processed pool of material in the pipeline |
| Cleaning & preprocessing | Duplicate, low-quality, and unsafe content is filtered or normalized | Determines how much of the raw pool is actually usable |
| Labeling & annotation | Humans, or a validated pipeline, attach ground-truth labels to examples that need them | Turns raw examples into supervised training signal |
| Pretraining | A model learns general patterns from a huge, mostly unlabeled corpus | Trillions of tokens; volume dominates over per-example curation |
| Fine-tuning | A pretrained model is adjusted on a small, curated dataset for a specific task or domain | Hundreds to tens of thousands of labeled demonstrations |
| Alignment (RLHF / preference tuning) | The model is optimized against human judgments about which outputs are better | Tens of thousands of ranked comparisons, not single answers |
| Evaluation & benchmarking | The trained model is scored against held-out tests it never saw during training | A protected slice of data whose only job is measuring, not teaching |
| Deployment & the feedback loop | The model ships into production; its real-world outputs become candidate data for the next cycle | Live usage becomes raw material for the next round |
Stage 1: Data collection and sourcing
Every pipeline starts with raw examples, and where they come from sets a ceiling on everything that follows. Broadly, four pools feed the industry: public web crawls and open corpora, proprietary and licensed archives, user-generated data produced inside a platform, and purchased or brokered datasets. Our map of the AI data supply chain↗ covers all four in depth, including real licensing deal sizes; this section stays at the level a training pipeline actually needs: what gets pulled in, and why the source matters downstream.
That matters more than it used to, because the cheapest and most familiar source, the open web, is finite. Epoch AI estimates the usable stock of high-quality, human-generated public text at roughly 300 trillion tokens, and projects that current scaling trends could exhaust it sometime between 2026 and 2032. [4] The sourcing decision made at this stage also shows up two stages later as a labeling bill. A dataset scraped from the open web arrives with no labels, no consent record, and no guarantee of quality, all of which later stages have to fix at real cost. A dataset licensed directly from a platform, or purchased through a marketplace, often arrives closer to trainable: better provenance, sometimes partial structure already attached, and a documented legal basis for use.
Stage 2: Cleaning and preprocessing
Raw collected data is rarely trainable as-is. Web crawls in particular carry enormous amounts of boilerplate, duplicate text, machine-generated spam, and content that's actively harmful to train on. Cleaning is the stage that turns a raw dump into a corpus a model can learn useful patterns from, and it typically runs through a documented set of heuristic filters rather than one single step.
The Colossal Clean Crawled Corpus (C4), built to pretrain Google's T5 model, is a well-documented example of what this looks like in practice: filtering out lines that don't end in terminal punctuation, discarding pages containing words from an offensive-word blocklist, dropping documents shorter than a handful of sentences, and deduplicating any three-sentence span that appears more than once. Dodge and colleagues later audited that exact pipeline and found the cleaning choices weren't neutral: blocklist-based filtering, one of the most common cleaning heuristics in the industry, disproportionately removed text written by and about minority groups, while still missing large amounts of the machine-generated and benchmark-evaluation text it was meant to catch. [2]
“The use of these [blocklists] disproportionately removes text from and about minority individuals.”
Preprocessing also normalizes format: converting documents into a consistent encoding, tokenizing text into the units a model actually trains on, and, for non-text modalities, resizing images, resampling audio, or extracting frames from video. None of this adds new information to the dataset. It makes the information already there usable at scale.
Stage 3: Labeling and annotation
Not every stage needs labels. Pretraining runs almost entirely on unlabeled text, learning structure by predicting a missing piece of an example from the rest of it. But every stage after pretraining, fine-tuning, alignment, and evaluation, depends on some form of human-supplied ground truth, and producing that ground truth is annotation.
ImageNet is the clean textbook case of what labeling at scale looks like: roughly 14.2 million images, hand-sorted by human annotators into more than 21,000 categories drawn from the WordNet hierarchy, a labeling effort large enough that it took a crowdsourced workforce years to complete. [2] Most annotation work happening today looks nothing like that in scale, domain experts labeling a few thousand support tickets, clinical notes, or legal documents rather than millions of generic images, but the underlying job is the same: attach a ground-truth answer to an example so a model has something concrete to learn from.
This stage has its own extensive coverage on this blog, because how labeling gets done (in-house, outsourced, or through a managed marketplace), what actually separates annotation from labeling as terms, and how human review fits into a modern pipeline all deserve more space than a couple of paragraphs. See What Is Data Labeling?↗, Data Annotation vs. Data Labeling↗, and What Is Human-in-the-Loop AI Training?↗ for the deep dives this section deliberately doesn't repeat.
Stage 4: Pretraining vs. fine-tuning
Once data is clean and labeled where it needs to be, it feeds one of two very different training regimes, and almost nobody outside a handful of AI labs does the first one from scratch.
Pretraining is where a model acquires its general competence in a modality, running on the largest, least-curated dataset in the entire pipeline, almost always unlabeled. Hoffmann and colleagues' Chinchilla paper found that model size and training-token count should scale together under a fixed compute budget, and trained a 70-billion-parameter model compute-optimally on roughly 1.4 trillion tokens, about 20 tokens for every parameter. [6] That's the order of magnitude pretraining operates at: trillions of tokens, sourced almost entirely from the collection and cleaning stages above, with no per-example human judgment attached.
Fine-tuning takes an already-pretrained model, whether built in-house or downloaded as an open-weight base, and narrows its behavior toward a specific task or domain using a dataset that's orders of magnitude smaller and, unlike most pretraining data, usually labeled. A team building a support-ticket assistant might fine-tune on a few thousand (ticket, ideal response) pairs rather than trillions of tokens of general text. Exactly how many examples a given fine-tuning technique needs varies widely by task and method; our dedicated guide to fine-tuning data volume↗ breaks that down technique by technique.
| Pretraining | Fine-tuning | |
|---|---|---|
| Typical data volume | Trillions of tokens | Hundreds to tens of thousands of examples |
| Labeled? | No, self-supervised | Usually yes, curated demonstrations |
| Who actually does this | A small number of AI labs with the compute to justify it | Almost any team building on an existing model |
| What it teaches the model | General language, vision, or audio competence | Task-specific or domain-specific behavior |
Stage 5: RLHF, preference tuning, and alignment
A model that's fluent and factually competent isn't automatically useful. It might refuse reasonable requests, ramble past the point of being helpful, or produce two equally correct answers with no sense of which one a person would actually prefer. Alignment is the stage that fixes this, and it needs a different kind of training data than anything that came before it: not a demonstration of the right answer, but a human judgment about which of several answers is better.
OpenAI's InstructGPT recipe set the template the industry still uses: supervised fine-tuning on curated demonstrations, then a reward model trained on human preference comparisons, then reinforcement learning, commonly PPO, to optimize the policy against that reward model. The result was striking: human raters preferred a 1.3-billion-parameter InstructGPT model over the 175-billion-parameter base GPT-3 roughly 70% of the time, despite it being more than 100 times smaller. [6] Direct Preference Optimization (DPO) has since become the more common variant in production, keeping the same preference-pair data but skipping the separate reward model and RL loop in favor of a simpler training objective.
This stage is where “training data” stops meaning demonstrations and starts meaning rankings: a prompt, two or more candidate responses, and a record of which one a person preferred. That structural shift, and why it makes preference data one of the scarcest and most valuable assets in AI, is its own deep topic. See RLHF vs. Fine-Tuning: What's the Difference, and Which Do You Need?↗ for the mechanics and decision framework, and RLHF & Preference Data Explained↗ for how preference pairs are collected, labeled, and priced.
Stage 6: Evaluation and benchmarking
A model that scores well on its own training objective hasn't proven it generalizes. Evaluation is the stage that actually checks, by scoring the trained model against a held-out set of examples it never saw during pretraining, fine-tuning, or alignment. The entire measurement only means something if that boundary held.
Broad capability benchmarks like MMLU, which tests models across 57 academic and professional subjects from elementary mathematics to law, exist precisely to give the industry a shared, repeatable yardstick rather than letting every lab grade its own homework on a private test. [4] But a benchmark is only as trustworthy as its isolation from the training set, and that isolation is harder to maintain than it sounds. Lee and colleagues found that near-duplicate text contaminates over 4% of the validation sets in standard language modeling benchmarks, which means some of what gets reported as model accuracy actually reflects memorized text rather than genuine generalization. [8]
“Train-test overlap... affects over 4% of the validation set of standard datasets.”
In practice, evaluation covers more than one axis. Capability benchmarks like MMLU test what a model knows. Task-specific held-out sets test whether a fine-tuned model actually performs the narrow job it was built for. Red-teaming and adversarial testing, a specific human-in-the-loop practice covered in depth elsewhere on this blog, tests where a model's guardrails break under deliberate pressure. All three answer different questions, and a model that passes one can still fail another.
Stage 7: Deployment and the retraining loop
A model that clears evaluation ships into production, and this is where a subtle but important shift happens: the model stops being purely a consumer of training data and starts being a producer of it. Every response it generates, and every action a user takes in reaction, accepting, editing, rejecting, ignoring, is a new data point about how the model actually performs in the world, richer in some ways than anything the evaluation stage could simulate.
Sculley and colleagues' widely cited paper on machine learning technical debt names the risk directly: systems that quietly develop hidden feedback loops, where a live model's own outputs influence the data that later gets used to retrain it, sometimes without any engineer noticing the loop exists. [4] Left unmanaged, that loop can degrade a model across successive retraining cycles rather than improve it, a dynamic closely related to what's formally studied as model collapse↗ when synthetic or model-generated content displaces real data across generations.
Two practical paths handle new knowledge after deployment, and it isn't the same decision as the fine-tuning-versus-pretraining choice above. Retraining or fine-tuning again bakes new knowledge into the model's weights, at the cost of a new labeling and training cycle every time the facts change. Retrieval-augmented generation (RAG) instead keeps the model frozen and looks up current information at query time from an external, editable document index. Which one fits depends heavily on how fast the underlying facts move; see Fine-Tuning vs. RAG↗ for the full decision framework.
Worked example: training a customer-support AI assistant end to end
Here's how all seven stages play out on one concrete build: a company training an AI assistant to draft responses to inbound customer support tickets.
- 1Collection. The team pulls eighteen months of resolved support tickets, about 400,000 conversations, from its own helpdesk platform, and starts from an open-weight LLM someone else already pretrained.
- 2Cleaning. Tickets with no resolution, duplicate auto-replies, and any conversation containing unredacted payment details get filtered out, cutting the usable set to roughly 310,000 conversations.
- 3Labeling. Senior support agents review 6,000 of those tickets and write the ideal response for each one, the demonstration set the next stage needs.
- 4Fine-tuning. The 6,000 (ticket, ideal response) pairs fine-tune the pretrained base model, teaching it the company's format, tone, and policy constraints. Pretraining itself, the trillions of tokens of general language ability, was never touched directly; it came bundled with the base model.
- 5Alignment. Reviewers sample two to three draft replies per ticket from the fine-tuned model and rank which is better on 1,200 tickets, producing roughly 3,000 preference comparisons used to sharpen tone and helpfulness.
- 6Evaluation. A held-out slice of 500 tickets, checked for near-duplicates against every other set above, measures whether the model's drafts actually get accepted by agents without heavy editing.
- 7Deployment. The model ships as a draft-suggestion tool. Every agent edit or rejection gets logged and reviewed monthly, and the cleanest examples feed the next fine-tuning round, closing the loop deliberately rather than letting it happen unmonitored.
| Stage | Data used | Size |
|---|---|---|
| Collection | Resolved support tickets (raw) | ~400,000 conversations |
| Cleaning | Filtered ticket set | ~310,000 conversations |
| Labeling | Agent-written ideal responses | 6,000 (ticket, response) pairs |
| Fine-tuning | Same 6,000 labeled pairs | 6,000 examples |
| Alignment | Ranked response comparisons | ~3,000 preference pairs |
| Evaluation | Held-out, deduplicated tickets | 500 tickets |
| Deployment | Logged agent edits/rejections | Ongoing, reviewed monthly |
The pipeline is the point
AI training was never one step, and treating it like one is how teams underinvest in the stages that actually determine whether a model works: cleaning that's audited rather than assumed neutral, evaluation that's genuinely isolated from training, and a deployment loop that's monitored instead of left to feed on its own output. Each of the seven stages above needs a different shape of data, trillions of raw tokens at one end, a few thousand ranked human judgments at the other, and getting that shape wrong at any single stage is enough to undermine the stages that follow it.
For a startup or team holding proprietary data, this pipeline view answers a practical question: which stage does your data actually feed? Raw, unlabeled logs feed pretraining-scale problems that few buyers have. Labeled, resolution-tagged interactions feed fine-tuning. Ranked comparisons and preference judgments feed alignment, currently the scarcest and most valuable of the three. Knowing which stage your data fits is most of the work of knowing what it's worth.
Know which stage your data fits. Find out what it's worth.
Whether you're sitting on raw platform logs, labeled support interactions, or preference judgments from human review, Dayda can help you work out where your data fits in the pipeline and what qualified buyers would pay for it.
List your data on Dayda→