AI State of the Art
MLOps/Data Engineering for AI/34 min
Section 208

Synthetic Data Generation: Techniques and Quality

Listen as a podcast →

The radical idea: why collect data if you can make it up?

Data annotation is expensive. If you need 100,000 labeled examples, that's months and millions of dollars. But what if you ask a powerful LLM to generate them? In one week? For a small fraction of the cost?

That's the idea behind synthetic data: training data written by a model rather than collected from the world or written by people.

Instead of:

  • Showing real-world data to humans
  • Humans label it
  • You train your model

You do:

  • A powerful LLM generates the data
  • A filter (another model, a verification program, humans on a sample) sorts out what is good
  • You train your model on what remains

What was a lab trick in 2023 became a standard ingredient in 2025-2026: nearly every recent model uses synthetic data, especially after pre-training. This page describes how it is made and how its quality is controlled. Its place in training large models and its risks (collapse, contamination, disputes) are covered on synthetic data for training.

Why it's not cheating

You might think "but it's just the generator model's data. My model is just learning imitation."

Yes and no. The generator model is much better than your target model. For example, you use a frontier model to generate the data, and you train a small 7-billion-parameter open model on it. The big model produces high-quality data, and your small model learns from it. It's knowledge distillation: you transfer knowledge from a large model into a small one, like pouring concentrated coffee into a smaller cup (see distillation).

The small models that do incredible things? Many are trained this way. Alpaca (Stanford), Vicuna and Orca back then; today, the "distilled" versions of large reasoning models.

And it is not always mere imitation. Microsoft reports that Phi-4 (14 billion parameters, late 2024), trained with a large share of synthetic data, surpasses its teacher model GPT-4 on science questions. The authors credit the way the data is generated, varied and filtered, not simple copying.

Phi-4 Technical Report (Abdin et al., 2024)
The model distillation revolution

Before: to have a good model, you needed the resources to build a large, high-quality dataset (annotators, time, money). Now: you have a powerful model generate the dataset. You train a small model on it. You have a good specialized model.

This democratizes AI. Small teams with little data and little budget can now create performant models for their use case, provided they respect the generator model's license (see below).

Generation techniques: simple to complex

Technique 1: simple instruction generation

You describe the type of data and the model generates:

Example: "Generate 100 restaurant reviews in French, with a variety of sentiments (positive, negative, neutral). Reviews should be between 50 and 200 words."

The model generates 100 reviews. Synthetic data.

Simple but effective for many cases. The flaw shows up quickly at scale: asked 10,000 times, the same prompt produces 10,000 texts that all look alike.

Technique 2: Self-Instruct

Self-Instruct is cleverer. The idea:

  1. You have a few dozen good initial instructions (seeds)
  2. You ask the model: "generate new instructions that are similar but diverse"
  3. For each new instruction, request a response
  4. Filter out bad responses and instructions too close to ones you already have
  5. Repeat

This is the approach used by Alpaca (Stanford): 175 seed instructions -> 52,000 instruction-response pairs in one week.

The beauty of the approach: it creates diversity. The model invents new questions instead of just copy-pasting old ones.

Flow diagram. A Seed set of tasks box, annotated 175 seed tasks with one instruction and one instance each, feeds a Task pool box. From the pool an arrow goes to Instruction Generation, performed by a model, with the note Instruction Sampling: 6 human-written and 2 model-generated instructions, in batches of 5. Generated instructions return to the pool through an Instruction Filtering step that discards those with a ROUGE-L score above 0.7, those under 3 words and those over 150 words. The pool then feeds Classification Task Identification and Instance Generation, whose results go back to the pool after post-processing that removes examples where the input equals the output.
Self-Instruct in detail. The loop starts from 175 hand-written tasks, draws new instructions in small batches, then has them produce full examples that flow back into the pool. The labels that matter are the filters: a new instruction is kept only if it is different enough from those already in the pool (ROUGE-L overlap below 0.7) and of reasonable length. Without that guardrail, the model would keep circling the same phrasings.Source : Self-Instruct paper (Wang et al., 2022), diagram redrawn by Towards Data Science

Technique 3: Evol-Instruct (WizardLM)

Evol-Instruct is a level above. The idea: progressively complicate the instructions.

  • Start: "What does a cat eat?" (trivial)
  • Deepening: "Compared to other carnivores, what are the unique characteristics of a cat's diet?" (added complexity)
  • Broadening: "Describe the evolution of the cat's diet, from wild ancestors to domestication" (expanded scope)
  • Concretizing: "With specific examples of breeds and environments, show how..."
  • Reasoning: "Provide a critical analysis of common myths about cat diets and explain why they're wrong"

You build a complexity pyramid. Trivial data isn't useful. On data that's too hard, the generator itself gets it wrong. Evol-Instruct creates a balanced distribution from easy to very difficult.

Technique 4: personas

How do you get 100,000 genuinely different examples? By changing the point of view. You ask the model to write as someone: a night-shift nurse, a truck driver who loves astronomy, a high-school student preparing for an exam. Each persona pulls the model toward other topics, other words, other difficulties.

The Persona Hub project (2024) took the idea to the extreme: one billion personas automatically extracted from web pages, about 13% of the world's population. Combined with an instruction ("write a math problem this person might run into"), they are used to produce math problems, user prompts or knowledge-rich texts at scale, with a diversity no single prompt ever reaches.

Scaling Synthetic Data Creation with 1,000,000,000 Personas (Ge et al., 2024)

Technique 5: rephrasing

Instead of inventing from nothing, you start from a real text and ask the model to rephrase it: "like an encyclopedia," "as questions and answers," "as revision notes." The content is anchored in a real document, which limits fabrication; only the form changes.

This has become a major pre-training technique since 2024 (WRAP, Nemotron-CC, REWIRE: see data quality). A telling figure comes from the Kimi K2 technical report (Moonshot AI, 2025): on a factual question test (SimpleQA), rereading the same encyclopedic text 10 times gives 23.8% correct answers; rephrasing it once and rereading it 10 times, 27.4%; rephrasing it 10 different ways and reading each version once, 28.9%. The same information, presented in varied forms, is learned better.

Kimi K2: Open Agentic Intelligence (Kimi Team, 2025)
No silver bullet

Work comparing rephrasing methods (BeyondWeb, 2025, for instance) concludes there is no single answer: which documents to rewrite, in what style, with which model, all of it matters. Naive rephrasing brings a modest gain at high cost; careful rephrasing can speed up training dramatically.

BeyondWeb: Lessons from Scaling Synthetic Data for Trillion-scale Pretraining (DatologyAI, 2025)

Technique 6: verified synthetic reasoning

This is the technique that defined 2025. The goal is to teach a model to reason step by step on math or code problems. The principle, called rejection sampling:

  1. take problems whose answer is known (math) or that can be tested (code);
  2. a strong model produces several detailed solutions for each, with its full reasoning;
  3. an automatic verifier checks the final answer, or runs the code against tests;
  4. keep only the correct solutions, reasoning included, to train the student model.

The idea goes back to STaR (2022), where a model improves by training on its own reasoning that led to the right answer. It changed scale with DeepSeek-R1 (January 2025): about 600,000 reasoning examples obtained by rejection sampling, plus 200,000 examples of other kinds, 800,000 examples in all, used to "distil" reasoning into much smaller models. The open OpenThoughts project (2025) tested every step of this pipeline in more than 1,000 controlled experiments; with 1.2 million examples, its 7-billion-parameter model reaches 53% on the AIME 2025 math exam.

STaR: Bootstrapping Reasoning With Reasoning (Zelikman et al., 2022) DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (DeepSeek-AI, 2025) OpenThoughts: Data Recipes for Reasoning Models (Guha et al., 2025)

Why does it work so well? Because the sorting does not depend on a model's judgement: the verifier says "right" or "wrong." It is the same principle as reinforcement learning with verifiable rewards.

Technique 7: generating preference data

For DPO (Direct Preference Optimization) / RLHF (Reinforcement Learning from Human Feedback), you need pairs of "better response vs worse response." The naive method asks on purpose for a bad answer ("give a vague and incomplete answer"), but the resulting pairs are too easy: the model learns to avoid gross flaws, not to choose between two good answers.

Common practice is rather:

  1. Generate an instruction
  2. Have several responses produced, by several models or with several settings
  3. A judge model (or a reward model, trained to score responses) ranks them
  4. The best and the worst form a preference example

This lets you train models with DPO without humans comparing every pair. NVIDIA reports, for instance, that over 98% of the data used to align Nemotron-4 340B (2024) was synthetic.

Nemotron-4 340B Technical Report (NVIDIA, 2024)

Frameworks: the tools of the trade

distilabel (HuggingFace)

distilabel is HuggingFace's open-source tool for data generation.

Features:

  • Modular pipelines: you define steps (generate, filter, evaluate)
  • Multi-LLM: use multiple models in the same pipeline (one to generate, one to evaluate)
  • Argilla integration: raw data goes into Argilla for human validation
  • Built-in techniques: Self-Instruct, Evol-Instruct, UltraFeedback already available
  • Scalable: runs on Ray for parallelization

A typical workflow:

  1. distilabel generates 10,000 data points
  2. LLM-as-judge scores them
  3. The best 2,000 go to Argilla
  4. Humans validate 20% of those 2,000
  5. Everything ends up on HuggingFace Hub

Bonito

Bonito is a model specialized in generating instruction-response pairs from raw text.

You give it text: "The photosynthesis process converts light energy into chemical energy..."

Bonito automatically generates relevant questions and answers based on that text.

Useful for turning an unstructured corpus (emails, documents, web pages) into training data.

Two-step diagram. Step 1: a stack of Unannotated Text documents, containing a passage about the footballer Walcott, and a stack labelled Task Attribute with the value Natural Language Inference both feed into the Bonito model, drawn as a fish. Bonito outputs a stack of Instruction Tuning Data: an input that quotes the passage and asks whether it follows that Walcott scored 3 goals, with the options yes, no or maybe, and an output, Yes. Step 2: this data is used to fine-tune an LLM, which becomes a Specialized LLM.
What Bonito actually does. You hand it raw text from your target domain plus the kind of task you want, and it returns a question-answer pair usable for training. This is the missing brick when you own plenty of internal documents but no instruction data: the unstructured corpus becomes a training set, then a specialized model.Source : Bonito paper (Nayak et al., 2024), diagram from the BatsResearch/bonito repository

Other tools

  • NeMo Curator (NVIDIA): generation and filtering pipelines, including those used for Nemotron
  • Genstruct (Nous Research): generates structured instructions from documents
  • Cosmopedia (HuggingFace): a set of synthetic textbooks and articles, plus the recipe to produce them, in the spirit of Textbooks Are All You Need (Microsoft)

A risk to know about: model collapse

Training a model generation after generation only on synthetic data, throwing away the real data at each round, leads to model collapse: like photocopies of photocopies, each generation loses some diversity, rare cases disappear, and errors compound.

But the popular version of this warning is too strong. Experiments show that when the real data is kept and synthetic data is added alongside, collapse does not occur. Nor is there any demonstrated "right proportion" (the 70/30-style ratios that circulate have no published source). The details, and the ongoing debate, are on synthetic data for training.

The 100% synthetic trap

If your dataset is 100% synthetic, you inherit all the biases and limitations of the generator model. No new diversity, no new perspectives. The small model becomes an impoverished echo of the large one.

Use synthetic data to augment your real data, not to completely replace it.

Filtering and quality: keep only the good stuff

Automatic filtering

Raw synthetic data contains garbage. You need to filter, and not all filters are equal:

External verification (the best filter when available): run the code against tests, recompute the answer to a math problem, validate a JSON format. The verdict does not depend on a model.

LLM-as-judge: an LLM evaluates each example:

  • "Is this response relevant?" -> score
  • "Is this response factual?" -> score
  • Keep the best scores

Watch out for its known biases: a judge tends to prefer long answers, and answers that resemble its own. And it shares the generator's blind spots.

Deduplication: remove near-identical examples (two responses that say the same thing). A generator repeats itself far more than a human corpus does (see deduplication).

Decontamination: check that the generator has not copied evaluation benchmark questions. A 2023 study found programming benchmark questions inside synthetic data produced by GPT-3.5 and GPT-4; a model trained on it would get an inflated score.

Heuristics:

  • Length: not too short, not too long
  • Lexical diversity: not just "good good good"
  • Format: minimal structure
Diagram with three numbered stages. A developer supplies domain-specific seed data to a first model, stage 1 Generate, which produces raw synthetic data. Stage 2 Critique: that data goes through a panel of several models, a reward model and an agent, which send corrections back to the generator via a Feedback loop. The unfiltered synthetic data then moves to stage 3 Filter, which applies deduplication, a PII and toxicity check, a business domain classifier and a rewrite step based on persona and tone. The output is a High Quality Synthetic Data block.
The full pipeline as it is tooled in production. Generation is only the first stage: a critique layer (a panel of judge models, a reward model) feeds corrections back to the generator, then a filtering layer strips duplicates, personal data and toxic content before letting examples through. That double barrier is what separates the raw output from the set you can actually train on.Source : NVIDIA Technical Blog, Mastering LLM Techniques: Text Data Processing (NeMo Curator)

Human validation

Even with automatic filtering, verify with humans:

  • Sampling: take a small fraction of the data, have humans evaluate
  • Targeted validation: data with ambiguous (borderline) scores goes to validation
  • Iterative feedback: if humans find lots of errors, modify the generation prompt

On organizing the human work that remains essential, see human data for post-training.

Licenses, terms of use and ethics

What generator models allow (or not)

This is the most often forgotten practical point: the right to use a model's outputs to train another model depends on its license or terms of use, and these differ a lot. As of autumn 2026, broadly:

  • OpenAI, Anthropic, Google (models accessed through an API): their terms forbid using outputs to develop models that compete with them. Training a small internal classifier is not the same as training a competing general-purpose assistant, but where the line falls depends on the exact terms.
  • Llama (Meta): since Llama 3.1, the license allows using outputs to improve other models, but if the resulting model is distributed, its name must begin with "Llama" and the Llama license terms apply.
  • Models under Apache 2.0 or MIT licenses (many Mistral AI and Qwen models, or DeepSeek-R1, whose license explicitly allows distillation): no restriction of this kind.

These terms change; reread the ones for the model you use at the time you use it. Recent disputes between labs over distillation are told on synthetic data for training.

Two separate questions. First, a text produced entirely by a machine is generally not protected by copyright, for lack of a human author (that is the US position, confirmed in court in 2025). Second, a generator can copy memorized passages from its own training data, and those passages may well be protected: deduplication and copy detection belong in the filtering stage (see memorization and extraction).

Bias

Synthetic data inherits the biases of the generator model. An LLM that underrepresents women in leadership roles will generate biased data in the same way.

Check the diversity and fairness of your synthetic data.

Transparency

Best practice: document in your model "X% of training data is synthetic, generated by [model], using [technique]." For general-purpose models, the public training-data summary required by the EU AI Act actually includes a section on synthetic data (see data governance).

Best practices

  • Keep real data. Synthetic data augments real data, it does not replace it. There is no universal ratio: it is tuned by experiment, domain by domain.
  • Pick a strong generator AND one whose license allows this use. Quality in = quality out, but a forbidden generator is a problem whatever its quality.
  • Verify whenever possible. Executed code, recomputed answers, validated formats: the most reliable filter.
  • Anchor generation in real documents (rephrasing, Bonito) rather than inventing everything.
  • Diversify generation prompts. Personas, varied seeds, not the same prompt 50,000 times.
  • Filter aggressively. 50,000 good data points > 500,000 with garbage mixed in.
  • Validate with humans on a sample, and decontaminate against evaluation benchmarks.
  • Document. Which model, which technique, which filters, how much synthetic vs real.
Check your understanding0 / 6

1. Isn't training a small model on data generated by a big model just imitation with no added value?

2. Why does Evol-Instruct complicate instructions progressively instead of directly generating hard questions?

3. What does the page say about model collapse?

4. In the rejection sampling used to build synthetic reasoning data (as for DeepSeek-R1), what decides which solutions are kept?

5. What filtering philosophy does the page recommend for raw synthetic data?

6. A startup wants to train a general-purpose assistant on answers produced by a large commercial provider's API model. What does the page point out?