Synthetic Test Data
Generate diverse eval cases with models, then filter and validate carefully.
In plain words
You ask an AI to invent lots of realistic test questions (and answers), then check a sample by hand to make sure they're good.
Think of it like…
Crash-test dummies and simulators: they let you test thousands of scenarios cheaply, including dangerous ones, but you still validate against real road data because the simulator may miss how real drivers behave.
Where you’ve seen it
For a new HR-policy assistant with no traffic, the team defines generation dimensions: 4 intents (leave, benefits, payroll, conduct) × 5 personas (new hire, manager, contractor, remote employee, non-native speaker) × 3 difficulty levels = 60 combinations, and asks an LLM for 8 questions per combination grounded in the actual policy documents: 480 candidates. Embedding deduplication (cosine similarity above 0.92) removes 90, leaving 390; an LLM validity filter (answerable from the policy, one clear intent) removes 40, leaving 350. A human reviews a random 70 and finds 9 flawed (12.9%), mostly questions answerable by common sense; they tighten the generator prompt, regenerate, and keep 330 usable cases, tagged "synthetic" so results can be reported separately from the 120 real tickets collected after launch.
Words you’ll hear
- Generation dimensions
- Attributes (intent, persona, difficulty, language) combined to force diverse cases.
- Deduplication
- Removing near-identical cases using embedding similarity or n-gram overlap.
- Evolving / complicating
- Rewriting a simple question to be multi-hop, ambiguous, longer or adversarial.
- Synthetic-to-real gap
- Differences between generated and real user inputs that make scores unrepresentative.
Visual diagram
Theory & deep dive
Generating useful data
Don't just ask "give me 100 test questions": results cluster around the same easy phrasings. Use structured generation: enumerate dimensions (intent, persona, difficulty, language, input length, tone), generate for each combination, and ground questions in real documents or schemas so answers can be checked (the generator also writes the reference answer and the supporting passage). Add evolution steps: make a question multi-hop, add irrelevant detail, remove key information to test clarification, translate it, or rewrite it with typos and slang. Create adversarial cases (prompt injections, requests for forbidden actions) with templates and attack catalogues.
For agents and chat, simulate users with personas, goals and constraints ("impatient customer who wants a refund, only has an order number") and let a user-simulator model converse with the system; record the transcript and check the outcome. Use a different, strong model for generation than for the system under test where possible, to avoid inflated scores from shared style and knowledge, and set a higher temperature (or vary seeds) for diversity.
"Given this policy excerpt, write 8 questions an employee in the role of [persona] might ask about [intent] at [difficulty] level, in their own words (varied length, some informal). For each give: the question, the reference answer quoting the excerpt, and the excerpt id. Do not reuse phrasing from the excerpt."
Quality control and limits
Filter aggressively. Deduplicate with embeddings or MinHash, drop cases the generator couldn't ground, and use an LLM or rule filters to check that each case is answerable, has one clear intent, and that the reference answer is supported by the cited passage. Then audit by humans: review a random sample (50 to 100), measure the defect rate, fix the generator prompt and repeat. Compare difficulty with real data: if every model passes 98% of synthetic cases while real traffic shows 80%, the synthetic set is too easy; adding evolution steps and hard negatives raises it.
Keep the provenance (generator model, prompt version, date, source document) and tag synthetic cases so reports show real and synthetic results separately, and weight decisions toward real traffic once you have it. Synthetic data can't replicate genuine user messiness, hidden needs or unusual intents, may leak generator biases (and the generator's knowledge) into evaluation, and may contaminate training if the same data is used for fine-tuning and evaluation. Treat it as scaffolding that you gradually replace with sampled production cases.
The system scores 97% on the 330 synthetic cases but 81% on 120 real tickets. After adding multi-hop and missing-information evolutions, synthetic scores fall to 86%, closer to what real traffic shows, so the set becomes a more useful regression guard.
How it works, step by step
Step 1 of 41. Define dimensions and sources
Choose intents, personas, difficulty and languages, and gather the real documents to ground questions.
- Ground
- in real documents
When to use it & trade-offs
What it is
Synthetic test data means using an LLM (plus templates and rules) to generate evaluation inputs and, where possible, expected outputs instead of collecting them all by hand: questions generated from your documents, simulated users with personas and goals, paraphrases and typo variants, multilingual versions and adversarial attacks. It's a way to bootstrap an eval set before you have traffic and to scale coverage of edge cases. Its weaknesses are homogeneity, unrealistic difficulty and label errors, so it needs structured generation, filtering and deduplication, and human review of a sample.
Why it matters: New products have no production logs, domain experts are expensive, and failure modes such as injections, long inputs or unusual phrasings are rare in real data. Synthetic data fills those gaps quickly and cheaply. Used carelessly, though, it produces easy, repetitive questions that every model aces, giving false confidence; used well, it extends (never replaces) the real-traffic cases in your golden set.
When to reach for it
- Bootstrapping evals before launch
- Covering rare edge cases and adversarial scenarios
- Simulating users for agent testing
When to avoid or be careful
- Asking for 100 questions in one unstructured prompt
- Reporting synthetic and real results as one number
- Using the same data for training and evaluation
Sources of test data
Strengths: Fast, cheap, scalable, controllable.
Watch out: Can be easy, repetitive or mislabelled.
Strengths: True distribution and phrasing.
Watch out: Needs traffic, privacy handling and labeling.
Strengths: High precision.
Watch out: Slow and costly.
Interview signals & numbers to know
When this topic comes up
- “We have no data yet”
- “Generate test questions from our documents”
- “Our evals are too easy”
- User simulators
- Evolved and adversarial prompts
Benchmarks & rules of thumb
- 480 → 330
- candidates to usable cases after filtering and audit
- 12.9%
- defect rate found in the human sample
- 97% vs 81%
- synthetic vs real score revealing an easy set
Common mistakes & follow-ups
Common interview mistakes
- Trusting generated reference answers without checking them.
- Using the system-under-test model to generate its own test set.
- Never replacing synthetic cases with real production samples.
Likely interviewer follow-ups
- How would you create an eval set for a new product with no traffic?
- How do you make synthetic data diverse and hard enough?
- What are the risks of synthetic test data?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Synthetic Test Data with generative AI interview Q&A and hands-on practice.