The Basics
🎨 Data Designer Tutorial: The Basics
📚 What you'll learn
This notebook demonstrates the basics of Data Designer by generating a simple product review dataset.
📦 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.
🎲 Getting started with sampler columns
-
Sampler columns offer non-LLM based generation of synthetic data.
-
They are particularly useful for steering the diversity of the generated data, as we demonstrate below.
You can view available samplers using the config builder's info property:
Let's start designing our product review dataset by adding product category and subcategory columns.
Next, let's add samplers to generate data related to the customer and their review.
🦜 LLM-generated columns
-
The real power of Data Designer comes from leveraging LLMs to generate text, code, and structured data.
-
When prompting the LLM, we can use Jinja templating to reference other columns in the dataset.
-
As we see below, nested json fields can be accessed using dot notation.
🔁 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
Now that you've seen the basics of Data Designer, check out the following notebooks to learn more about: