What counts as synthetic
Synthetic data means text produced by a model for the purpose of training another model. The label covers a wide spectrum. At one end is fully generated data: a model invents the prompt and the response from a topic list. In the middle is seed expansion, where a human writes a few hundred examples and a model generates variations. At the other end is human-seeded, model-verified data, where people write the instructions and a model drafts responses that humans review. All three are called synthetic, and they have very different quality profiles.
The lineage starts with Self-Instruct in 2022, which bootstrapped an instruction dataset from 175 hand-written seed tasks. A model was shown a handful of seeds and asked to write new instructions, then to produce inputs and outputs for them, with filtering for similarity and format. That produced roughly 52,000 instructions and demonstrated that a model could meaningfully expand its own training distribution. Alpaca applied the recipe to a stronger teacher and showed that a small model trained on 52,000 such examples could behave like an assistant, at least superficially.
Later methods attacked diversity. Evol-Instruct rewrote instructions to be deeper or broader, adding constraints, requiring multi-step reasoning or shifting domains. Magpie exploited the fact that aligned chat models have a fixed prompt template, so prompting them with only the opening turn causes them to generate a user request. Persona-driven generation samples from a large pool of described users so that instructions cover occupations and contexts a single prompt writer would never think of. Each method is a different answer to the same question: how do you get coverage without writing everything by hand?
Anatomy of a reasoning triple
A reasoning triple has three fields. The instruction states the task, ideally self-contained and realistic. The reasoning field records the work: decomposition, intermediate results, alternatives considered, dead ends and correction. The answer is the clean final response a user would see. Keeping them separate is the design decision that makes the format useful, because it lets you train on the answer alone, on the trace plus the answer, or on the trace as a target for a reasoning model.
Consider a question about whether a particular dataset is large enough to fine-tune a 7B model. The instruction is the question. The reasoning field works through the parameters: how many examples per behaviour, what the token budget implies, what the failure mode of too little data looks like, and where the estimate is uncertain. The answer states a range and the conditions under which it holds. A reader can check the reasoning without the answer, and check the answer without reading the reasoning, which is exactly what makes the triple auditable.
Variants are common. Some pipelines add a critique field written by a separate model, or a verifier score, or the tool calls that were made along the way. Some store the reasoning as a list of steps rather than a single string, which makes it easier to filter individual steps but harder to train on. Some store a difficulty label and a topic label for curriculum work. Whatever the schema, document it, because a triple with undocumented fields becomes unusable the moment the person who designed it leaves.
Generating prompts with real coverage
The most common defect in synthetic datasets is not bad answers but a narrow, repetitive prompt distribution. If every instruction begins with a request to explain something, the student learns to explain and little else. Coverage has to be engineered rather than hoped for: define topic buckets, difficulty tiers and task types, allocate a budget to each, and measure the achieved distribution against the plan before generating any responses.
A practical approach is to combine three sources. Seed tasks written by domain experts anchor realism. Persona or role descriptions push the generator into contexts you would not invent yourself, such as a municipal engineer in a mid-sized city or a first-year law student. Systematic perturbation, adding constraints, removing context, changing the audience, produces controlled variation. Deduplicate at the prompt level with MinHash and again with embedding similarity, because near-identical prompts produce near-identical traces that inflate the apparent dataset size without adding information.
Keep the prompt set separate from the response set. Prompts are cheap to generate and expensive to curate; responses are the opposite. Curating a few thousand excellent prompts and generating several candidate responses for each is usually a better use of budget than generating a hundred thousand prompts and taking the first response to each.
Generation settings that matter
Sampling temperature controls the trade-off between diversity and reliability. Low temperature produces clean, repetitive data; high temperature produces variety and more errors. A workable pattern is to sample several candidates per prompt at moderate temperature, score them, and keep the best. This costs more generation but substantially improves the yield of the filter, and generation is usually the cheapest part of the pipeline.
Long traces need explicit structure. Ask for a specific format, such as a short plan followed by numbered steps followed by the answer, and validate it. Unstructured traces drift into essays that are expensive to train on and hard to verify. Cap the trace length in the prompt and enforce it in the filter; an unbounded trace will grow until it consumes the context window.
Record the generator's identity and version for every sample. The same prompt on a different model version produces different data, and a dataset that mixes versions without recording it cannot be reproduced or debugged. This is also a licensing question, since different providers have different terms about using outputs to train models.
Quality gates
A gate is a function that decides whether a sample enters the dataset. Gates should be cheap-first: format validation and length checks run on everything, structural checks next, expensive judge scoring only on what survives. Logging the rejection reason for every discarded sample is not optional; the rejection histogram is the most useful diagnostic you will have when the dataset underperforms.
Verification beats judging wherever it is available. For code, execute the tests. For mathematics, check the final answer symbolically or against a computed solution. For structured extraction, validate the JSON against a schema and check the values against the source. A verifier gives a binary, defensible signal; a judge model gives a number that may correlate with quality and may simply reward length. Use judges for the residual, such as style, coherence and whether the reasoning supports the answer, and calibrate them against a few hundred human labels before trusting their scores.
Calibrate the gates themselves, not just the judge. Take three hundred samples the pipeline accepted and three hundred it rejected, label them by hand, and compute how often each gate agrees with you. Gates that reject almost nothing are decorative; gates that reject a third of good data are costing you yield for no reason. Re-run this check whenever you change the generator, because a filter tuned for one model's failure modes will not catch the next model's.
- Format: valid JSON, required fields present, reasoning and answer non-empty, no template artefacts or placeholder text.
- Answer verification: unit tests for code, symbolic or numeric checks for maths, schema and span checks for extraction.
- Consistency: the final answer must follow from the reasoning, and the reasoning must not contradict itself or the question.
- Deduplication: exact hashes first, then MinHash for near-duplicates, then embedding similarity above a threshold you have inspected by hand.
- Length: reject traces below a floor, which usually indicates the model skipped the work, and above a ceiling, which usually indicates padding.
- Contamination: n-gram overlap against every evaluation set you intend to report on, with a hard reject above a small threshold.
- Language and safety: detect the wrong language, personal data, and content that violates your own policy before it reaches training.
Reasoning traces are not automatically faithful
A model's written reasoning is generated text, not a log of its computation. Studies that add biasing cues to prompts have found models changing their answers while producing explanations that never mention the cue, which is strong evidence that the trace is at least partly post-hoc. A trace can be coherent, well formatted and completely unrelated to how the answer was reached.
This matters for distillation because a student trained on unfaithful traces learns to produce plausible-sounding justifications, not to reason. The symptom is a model that writes confident derivations and arrives at wrong answers, with the error buried in a step that looks reasonable. It is harder to detect than a model that simply answers wrongly, because the output looks like work.
The practical mitigations are unglamorous. Prefer tasks where the answer is verifiable, so the trace is anchored to a correct result. Reject traces whose intermediate steps can be checked and fail. Use a separate model to critique the derivation, and treat its objections as a filter rather than a verdict. And keep a share of examples where the trace is short or absent, so the model does not learn that every question requires a page of throat-clearing.
Diversity collapse and the case for real data
Training repeatedly on model-generated data can narrow the distribution. The documented mechanism is recursive: each generation loses a little of the tail, the next model trained on it loses a little more, and after several rounds the output becomes bland and repetitive. The extreme version of this argument claims model collapse is inevitable; the more careful reading is that it happens when generated data replaces real data entirely, and that mixing in fresh human text largely prevents it.
The engineering implication is simple. Treat synthetic data as an expansion of a real core, not a replacement for it. Keep human-written examples in every batch, keep a held-out set drawn from real traffic, and measure diversity explicitly: distinct n-gram ratio, topic entropy, and the share of outputs that begin with the same three phrases. Those metrics catch homogenisation long before a benchmark score moves.
There is a second, subtler collapse: style collapse. A dataset generated by one teacher carries that teacher's habits, its favourite connectives, its paragraph rhythm. Students trained on it sound like the teacher, which may be exactly what you want for a product voice and is a problem if you wanted a neutral one. Mixing teachers, or mixing teacher output with human writing, is the usual fix.
Provenance, licensing and dataset cards
Every synthetic dataset has a provenance chain: which models generated the prompts, which generated the responses, which judged them, and under what terms. Provider terms differ on whether outputs may be used to train competing models, and open-weight licences may require attribution or impose naming conditions on derivatives. Checking this after building the dataset is expensive; checking it before is a thirty-minute read.
A dataset card should state the intended use, the generation models and versions, the prompt distribution and how it was sampled, the filters and their rejection rates, the known failure modes, the languages covered, and what was deliberately excluded. It should also state the evaluation results the dataset has actually produced, not the results you hope for. Cards are not bureaucracy; they are how the next person avoids repeating your mistakes, and how a reviewer decides whether to trust a benchmark number.
A pipeline that holds up
A realistic yield calculation keeps expectations honest. Start with 100,000 generated prompts, deduplicate to 60,000, generate three candidates each at 180,000 responses, pass forty percent through format and verification gates for 72,000, and pass sixty percent of those through judge and consistency filters for roughly 43,000 training samples. That is a good dataset. It is also a week of generation, a meaningful API bill and a filtering pipeline that needs its own tests.
Then evaluate properly. Hold out prompts before generation, not after, and never let a held-out prompt's paraphrase enter training. Compare a model trained on the synthetic set against one trained on human data of similar size, on the same evaluation, and report both. If the synthetic set wins on coverage but loses on factuality, that is the expected trade and you should say so. If it loses on both, the problem is usually the judge, not the generator.