How do you generate synthetic training data with an LLM, and what are the pitfalls?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
The standard recipes: self-instruct-style generation (seed tasks → LLM generates instruction variations → LLM generates responses), distillation from a stronger teacher (real or synthetic prompts, teacher writes gold responses), evol-instruct-style complexity evolution (iteratively rewrite prompts to be harder/deeper), persona/scenario conditioning for diversity (generate as-if from many user types), and backtranslation-style flips (generate the prompt for an existing high-quality document). For verifiable domains, add rejection sampling: generate k candidates, keep only those passing a checker (tests, math answer, schema validator) - this is the workhorse for reasoning data.
Full worked answer with diagram
The standard recipes: self-instruct-style generation (seed tasks → LLM generates instruction variations → LLM generates responses), distillation from a stronger teacher (real or synthetic prompts, teacher writes gold responses), evol-instruct-style complexity evolution (iteratively rewrite prompts to be harder/deeper), persona/scenario conditioning for diversity (generate as-if from many user types), and backtranslation-style flips (generate the prompt for an existing high-quality document). For verifiable domains, add rejection sampling: generate k candidates, keep only those passing a checker (tests, math answer, schema validator) - this is the workhorse for reasoning data.
Pitfalls, the part interviewers care about:
- Mode collapse / low diversity: LLMs produce a narrow slice of the true distribution - same openings, same structure, favourite phrasings. Templated-feeling data teaches the template. Counter with explicit diversity conditioning (personas, topics, difficulty knobs), high temperature for prompts, and dedup with near-duplicate detection; measure diversity (n-gram stats, embedding dispersion), don't assume it.
- Error amplification: teacher mistakes become ground truth the student learns with full confidence, and in iterative loops (model trained on its own outputs) errors compound - the model-collapse failure mode. Counter with verifiers where possible, LLM-judge + human-audit filtering where not, and keeping a fraction of human data in the mix.
- Bias inheritance: the student absorbs the teacher's stylistic tics, refusal patterns, and sycophancy along with its skills.
- Distribution mismatch: synthetic prompts drift from real user traffic - clean, well-formed, polite - so the model underperforms on messy production inputs. Seed generation from real (privacy-scrubbed) traffic.
- Contamination: synthetic data can reproduce benchmark items the teacher memorised - decontaminate against your evals.
- Licensing: many API providers' terms restrict using outputs to train competing models - a legal check, not just a technical one.
Worth sketching. it shows where a verifier changes the economics and where you are stuck with judges.
flowchart LR
A["Seed from real,<br/>scrubbed traffic"] --> B["Generate with persona and<br/>difficulty conditioning"]
B --> C["k candidates per prompt"]
C --> D{"Verifier exists?"}
D -->|"yes"| E["Rejection sample:<br/>keep only passing"]
D -->|"no"| F["Judge filter plus<br/>a human audit slice"]
E --> G["Dedup, measure diversity,<br/>decontaminate"]
F --> G
G --> H["Keep human data<br/>in the mix"]
What a good answer covers
- The standard recipes: self-instruct-style generation (seed tasks → LLM generates instruction variations…
- Mode collapse / low diversity
- Error amplification: teacher mistakes become ground truth the student learns with full confidence, and…
- Bias inheritance: the student absorbs the teacher's stylistic tics, refusal patterns, and sycophancy…
- Distribution mismatch: synthetic prompts drift from real user traffic - clean, well-formed, polite - so…
Key terms: self-instruct-style generation · distillation from a stronger teacher · evol-instruct-style complexity evolution · persona/scenario conditioning for diversity · backtranslation-style flips · rejection sampling · Mode collapse / low diversity · Error amplification · Bias inheritance · Distribution mismatch
In the glossary: Distillation · Mode collapse · Temperature · Sycophancy · Drift · Contamination
Interviewer follow-ups to expect
How would you measure whether a synthetic dataset is diverse enough?
Why does rejection sampling change the quality economics for math/code but not for creative writing?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep