Seeding with an External Dataset
🎨 Data Designer Tutorial: Seeding Synthetic Data Generation with an External Dataset
📚 What you'll learn
In this notebook, we will demonstrate how to seed synthetic data generation in Data Designer with an external dataset.
If this is your first time using Data Designer, we recommend starting with the first notebook in this tutorial series.
📦 Import Data Designer
-
data_designer.configprovides access to the configuration API. -
DataDesigneris the main interface for data generation.
⚙️ Initialize the Data Designer interface
-
DataDesigneris the main object responsible for managing the data generation process. -
When initialized without arguments, the default model providers are used.
🎛️ Define model configurations
-
Each
ModelConfigdefines a model that can be used during the generation process. -
The "model alias" is used to reference the model in the Data Designer config (as we will see below).
-
The "model provider" is the external service that hosts the model (see the model config docs for more details).
-
By default, we use build.nvidia.com as the model provider.
🏗️ Initialize the Data Designer Config Builder
-
The Data Designer config defines the dataset schema and generation process.
-
The config builder provides an intuitive interface for building this configuration.
-
The list of model configs is provided to the builder at initialization.
🏥 Prepare a seed dataset
-
For this notebook, we'll create a synthetic dataset of patient notes.
-
We will seed the generation process with a symptom-to-diagnosis dataset.
-
The notebook downloads the source CSV before generation.
🌱 Why use a seed dataset?
Seed datasets let you steer the generation process by providing context that is specific to your use case.
Seed datasets are also an excellent way to inject real-world diversity into your synthetic data.
During generation, prompt templates can reference any of the seed dataset fields.
🎨 Designing our synthetic patient notes dataset
- The prompt template can reference fields from our seed dataset:
{{ diagnosis }}- the medical diagnosis from the seed data{{ patient_summary }}- the symptom description from the seed data
🔁 Iteration is key – preview the dataset!
-
Use the
previewmethod to generate a sample of records quickly. -
Inspect the results for quality and format issues.
-
Adjust column configurations, prompts, or parameters as needed.
-
Re-run the preview until satisfied.
📊 Analyze the generated data
-
Data Designer automatically generates a basic statistical analysis of the generated data.
-
This analysis is available via the
analysisproperty of generation result objects.
🆙 Scale up!
-
Happy with your preview data?
-
Use the
createmethod to submit larger Data Designer generation jobs.
⏭️ Next Steps
Check out the following notebook to learn more about: