How to generate synthetic data

By the Ground team

Generate synthetic data by defining what each record represents, which relationships must hold and how you will check the output. Start from a prompt when you need new records, or start from existing data when you need to retain patterns from a source.

Choose how to generate your data

Decide what the data needs to do before choosing a generator. Test fixtures need stable cases, analytics data needs plausible distributions, and training data needs examples that teach the model a task.

Starting pointWhat to specifyHow to validate
A prompt or schemaTables, keys, row counts, business rules and required casesLoad the export and check keys, totals and case counts
Existing dataFields and relationships to preserve, plus the gaps you want to fillCheck the new rows against source patterns. For training, evaluate on a real holdout.
A task for a modelInputs, reference outputs, examples of hard cases and the trainer’s formatCheck the labels or answers and evaluate on a separate test set

Write a prompt Ground can turn into a dataset

Name the entities, how they join and the conditions the rows must satisfy. Review the generated tables and compare the output with your requirements before you export CSV, JSON Lines or Parquet.

Ground’s bike-share example has 200,000 rides, 10,000 members and 60 stations. Open the tables to see how rides link to members and stations, or download them to check aggregate ride patterns.

Example request

Generate a month of bike-share rides with tables for stations, members and rides. Each ride links to its starting station. Member rides link to existing members. Make weekend rides longer on average.

Generate synthetic data for training

For a tabular model, generate examples of the classes or scenarios you need more of. For an LLM, generate task inputs paired with reference answers, or pairs of preferred and rejected answers. Set aside your evaluation data before you generate new examples.

Common questions

Can I generate synthetic data without real records?

Yes. Describe the entities, schema and scenarios you need, then check the generated data against those requirements. Use reference data when matching a real population is part of the task.

How do I reuse exactly the same data?

Save the export by version and keep its checksum alongside your code. Use that same artifact for subsequent runs.

Try it with your own dataset

Get started, see pricing or use the API.

Review security and privacy when evaluating Ground for your team.

Read the Markdown guide

Related guides