๐จ 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.
import data_designer.config as dd
from data_designer.interface import DataDesigner
โ๏ธ 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.
data_designer = DataDesigner()
๐๏ธ 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.
# This name is set in the model provider configuration.
MODEL_PROVIDER = "nvidia"
# The model ID is from build.nvidia.com.
MODEL_ID = "nvidia/nemotron-3-nano-30b-a3b"
# We choose this alias to be descriptive for our use case.
MODEL_ALIAS = "nemotron-nano-v3"
model_configs = [
dd.ModelConfig(
alias=MODEL_ALIAS,
model=MODEL_ID,
provider=MODEL_PROVIDER,
inference_parameters=dd.ChatCompletionInferenceParams(
temperature=1.0,
top_p=1.0,
max_tokens=2048,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
),
)
]
๐๏ธ 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.
config_builder = dd.DataDesignerConfigBuilder(model_configs=model_configs)
๐ฅ 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.
We already have the dataset downloaded in the data directory of this repository.
๐ฑ 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.
# Download sample dataset from Github
import urllib.request
url = "https://raw.githubusercontent.com/NVIDIA/GenerativeAIExamples/refs/heads/main/nemo/NeMo-Data-Designer/data/gretelai_symptom_to_diagnosis.csv"
local_filename, _ = urllib.request.urlretrieve(url, "gretelai_symptom_to_diagnosis.csv")
# Seed datasets are passed as reference objects to the config builder.
seed_source = dd.LocalFileSeedSource(path=local_filename)
config_builder.with_seed_dataset(seed_source)
DataDesignerConfigBuilder()
๐จ 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
config_builder.add_column(
dd.SamplerColumnConfig(
name="patient_sampler",
sampler_type=dd.SamplerType.PERSON_FROM_FAKER,
params=dd.PersonFromFakerSamplerParams(),
)
)
config_builder.add_column(
dd.SamplerColumnConfig(
name="doctor_sampler",
sampler_type=dd.SamplerType.PERSON_FROM_FAKER,
params=dd.PersonFromFakerSamplerParams(),
)
)
config_builder.add_column(
dd.SamplerColumnConfig(
name="patient_id",
sampler_type=dd.SamplerType.UUID,
params=dd.UUIDSamplerParams(
prefix="PT-",
short_form=True,
uppercase=True,
),
)
)
config_builder.add_column(dd.ExpressionColumnConfig(name="first_name", expr="{{ patient_sampler.first_name }}"))
config_builder.add_column(dd.ExpressionColumnConfig(name="last_name", expr="{{ patient_sampler.last_name }}"))
config_builder.add_column(dd.ExpressionColumnConfig(name="dob", expr="{{ patient_sampler.birth_date }}"))
config_builder.add_column(
dd.SamplerColumnConfig(
name="symptom_onset_date",
sampler_type=dd.SamplerType.DATETIME,
params=dd.DatetimeSamplerParams(start="2024-01-01", end="2024-12-31"),
)
)
config_builder.add_column(
dd.SamplerColumnConfig(
name="date_of_visit",
sampler_type=dd.SamplerType.TIMEDELTA,
params=dd.TimeDeltaSamplerParams(dt_min=1, dt_max=30, reference_column_name="symptom_onset_date"),
)
)
config_builder.add_column(dd.ExpressionColumnConfig(name="physician", expr="Dr. {{ doctor_sampler.last_name }}"))
config_builder.add_column(
dd.LLMTextColumnConfig(
name="physician_notes",
prompt="""\
You are a primary-care physician who just had an appointment with {{ first_name }} {{ last_name }},
who has been struggling with symptoms from {{ diagnosis }} since {{ symptom_onset_date }}.
The date of today's visit is {{ date_of_visit }}.
{{ patient_summary }}
Write careful notes about your visit with {{ first_name }},
as Dr. {{ doctor_sampler.first_name }} {{ doctor_sampler.last_name }}.
Format the notes as a busy doctor might.
Respond with only the notes, no other text.
""",
model_alias=MODEL_ALIAS,
)
)
data_designer.validate(config_builder)
[00:03:18] [INFO] โ Validation passed
๐ 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.
preview = data_designer.preview(config_builder, num_records=2)
[00:03:18] [INFO] ๐ธ Preview generation in progress
[00:03:18] [INFO] โ Validation passed
[00:03:18] [INFO] โ๏ธ Sorting column configs into a Directed Acyclic Graph
[00:03:18] [INFO] ๐ฉบ Running health checks for models...
[00:03:18] [INFO] |-- ๐ Checking 'nvidia/nemotron-3-nano-30b-a3b' in provider named 'nvidia' for model alias 'nemotron-nano-v3'...
[00:03:19] [INFO] |-- โ Passed!
[00:03:19] [INFO] ๐ฑ Sampling 2 records from seed dataset
[00:03:19] [INFO] |-- seed dataset size: 820 records
[00:03:19] [INFO] |-- sampling strategy: ordered
[00:03:19] [INFO] ๐ฒ Preparing samplers to generate 2 records across 5 columns
[00:03:19] [INFO] (๐พ + ๐พ) Concatenating 2 datasets
[00:03:19] [INFO] ๐งฉ Generating column `first_name` from expression
[00:03:19] [INFO] ๐งฉ Generating column `last_name` from expression
[00:03:19] [INFO] ๐งฉ Generating column `dob` from expression
[00:03:19] [INFO] ๐งฉ Generating column `physician` from expression
[00:03:19] [INFO] ๐ llm-text model config for column 'physician_notes'
[00:03:19] [INFO] |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[00:03:19] [INFO] |-- model alias: 'nemotron-nano-v3'
[00:03:19] [INFO] |-- model provider: 'nvidia'
[00:03:19] [INFO] |-- inference parameters:
[00:03:19] [INFO] | |-- generation_type=chat-completion
[00:03:19] [INFO] | |-- max_parallel_requests=4
[00:03:19] [INFO] | |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[00:03:19] [INFO] | |-- temperature=1.00
[00:03:19] [INFO] | |-- top_p=1.00
[00:03:19] [INFO] | |-- max_tokens=2048
[00:03:19] [INFO] โก๏ธ Processing llm-text column 'physician_notes' with 4 concurrent workers
[00:03:19] [INFO] โฑ๏ธ llm-text column 'physician_notes' will report progress after each record
[00:03:24] [INFO] |-- ๐ธ llm-text column 'physician_notes' progress: 1/2 (50%) complete, 1 ok, 0 failed, 0.20 rec/s, eta 5.0s
[00:03:25] [INFO] |-- ๐ฆ llm-text column 'physician_notes' progress: 2/2 (100%) complete, 2 ok, 0 failed, 0.31 rec/s, eta 0.0s
[00:03:26] [INFO] ๐ Model usage summary:
[00:03:26] [INFO] |-- model: nvidia/nemotron-3-nano-30b-a3b
[00:03:26] [INFO] |-- tokens: input=267, output=2198, total=2465, tps=357
[00:03:26] [INFO] |-- requests: success=2, failed=0, total=2, rpm=17
[00:03:26] [INFO] ๐ Measuring dataset column statistics:
[00:03:26] [INFO] |-- ๐ฒ column: 'patient_sampler'
[00:03:26] [INFO] |-- ๐ฒ column: 'doctor_sampler'
[00:03:26] [INFO] |-- ๐ฒ column: 'patient_id'
[00:03:26] [INFO] |-- ๐งฉ column: 'first_name'
[00:03:26] [INFO] |-- ๐งฉ column: 'last_name'
[00:03:26] [INFO] |-- ๐งฉ column: 'dob'
[00:03:26] [INFO] |-- ๐ฒ column: 'symptom_onset_date'
[00:03:26] [INFO] |-- ๐ฒ column: 'date_of_visit'
[00:03:26] [INFO] |-- ๐งฉ column: 'physician'
[00:03:26] [INFO] |-- ๐ column: 'physician_notes'
[00:03:26] [INFO] ๐ Preview complete!
# Run this cell multiple times to cycle through the 2 preview records.
preview.display_sample_record()
Seed Columns โโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Name โ Value โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ diagnosis โ cervical spondylosis โ โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ patient_summary โ I've been having a lot of pain in my neck and back. I've also been having trouble with my โ โ โ balance and coordination. I've been coughing a lot and my limbs feel weak. โ โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Generated Columns โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ Name โ Value โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ patient_sampler โ { โ โ โ 'uuid': '622c395a-f0c6-4a88-ab7c-c5c1593bf4e4', โ โ โ 'locale': 'en_US', โ โ โ 'first_name': 'Danielle', โ โ โ 'last_name': 'Everett', โ โ โ 'middle_name': None, โ โ โ 'sex': 'Female', โ โ โ 'street_number': '092', โ โ โ 'street_name': 'Eric Station', โ โ โ 'city': 'North Barbaraview', โ โ โ 'state': 'Alaska', โ โ โ 'postcode': '04373', โ โ โ 'age': 76, โ โ โ 'birth_date': '1950-02-08', โ โ โ 'country': 'New Zealand', โ โ โ 'marital_status': 'separated', โ โ โ 'education_level': 'associates', โ โ โ 'unit': '', โ โ โ 'occupation': 'Designer, graphic', โ โ โ 'phone_number': '001-794-498-7296', โ โ โ 'bachelors_field': 'no_degree' โ โ โ } โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ doctor_sampler โ { โ โ โ 'uuid': 'bab9af0f-f034-493d-8013-0ef733807880', โ โ โ 'locale': 'en_US', โ โ โ 'first_name': 'Shannon', โ โ โ 'last_name': 'Murphy', โ โ โ 'middle_name': None, โ โ โ 'sex': 'Female', โ โ โ 'street_number': '02938', โ โ โ 'street_name': 'Rodriguez Bridge', โ โ โ 'city': 'Heatherfurt', โ โ โ 'state': 'Arizona', โ โ โ 'postcode': '63419', โ โ โ 'age': 56, โ โ โ 'birth_date': '1969-04-07', โ โ โ 'country': 'France', โ โ โ 'marital_status': 'widowed', โ โ โ 'education_level': 'associates', โ โ โ 'unit': '', โ โ โ 'occupation': 'Secretary, company', โ โ โ 'phone_number': '587.817.6591x2043', โ โ โ 'bachelors_field': 'no_degree' โ โ โ } โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ patient_id โ PT-C84D9E64 โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ symptom_onset_date โ 2024 โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ date_of_visit โ 2024 โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ first_name โ Danielle โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ last_name โ Everett โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ dob โ 1950-02-08 โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ physician โ Dr. Murphy โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ physician_notes โ **Visit Summary โ Danielle Everett (DOB: 05/12/1988) | 2024-10-15** โ โ โ **Provider:** Dr. Shannon M. Murphy, MD โ Internal Medicine/Neurology โ โ โ โ โ โ **Reason for Visit:** New onset worsening cervical spine discomfort, gait instability, โ โ โ generalized weakness, cough exacerbation. โ โ โ โ โ โ --- โ โ โ โ โ โ **Chief Complaint:** โ โ โ - Neck & upper back pain (radiates to shoulders) โ 7/10, constant, worsens with movement. โ โ โ - Lower back pain โ intermittent, dull, improves with rest. โ โ โ - Recent episodes of dizziness + unsteady gait when walking outdoors. โ โ โ - Progressive weakness in both arms (~3/5 strength) and mild hand clumsiness. โ โ โ - Chronic dry cough (non-productive) for 6โฏmonths, now more frequent. โ โ โ - Reports occasional numbness in fingers. โ โ โ โ โ โ **History of Present Illness:** โ โ โ - Prior diagnosis of cervical spondylosis (MRI 2022) โ managed conservatively. โ โ โ - No prior vertebral fracture or surgery. โ โ โ - Recent decline in functional status over past 4โ5โฏmonths. โ โ โ - No recent infections, fevers, or weight loss. โ โ โ โ โ โ **Past Medical History:** โ โ โ - Cervical spondylosis (chronic) โ โ โ - Hypertension (controlled on lisinopril 10โฏmg daily) โ โ โ - Hyperlipidemia (atorvastatin 20โฏmg daily) โ โ โ - No diabetes, thyroid disease, or autoimmune disorders. โ โ โ โ โ โ **Medications:** โ โ โ - Lisinopril 10โฏmg PO daily โ โ โ - Atorvastatin 20โฏmg PO daily โ โ โ - Occasional ibuprofen 400โฏmg PO q6h PRN for pain โ โ โ โ โ โ **Allergies:** โ โ โ - NKDA โ โ โ โ โ โ **Physical Exam (Office):** โ โ โ - Vitals: BP 126/78, HR 72, RR 16, Temp 98.4ยฐF, SpOโ 98% RA. โ โ โ - General: Alert, oriented ร3, appears mildly uncomfortable when seated. โ โ โ - HEENT: No nasal congestion, oropharynx clear. โ โ โ - Neck: Limited flexion/extension due to pain; mild tenderness at C4โC5 paraspinals; no โ โ โ crepitus. โ โ โ - Musculoskeletal: Decreased grip strength (right 3/5, left 4/5); mild hyperreflexia in โ โ โ lower extremities; positive Romberg sign. โ โ โ - Neurologic: โ โ โ - Cranial nerves IIโXII intact. โ โ โ - Motor: Spastic pattern noted in upper extremities; strength 4/5 proximally, 3/5 โ โ โ distally. โ โ โ - Sensory: Decreased vibration sense in bilateral index fingers. โ โ โ - Reflexes: 2+ throughout; Babinski negative. โ โ โ - Gait: Assisted, widy stance, unsteady on turns. โ โ โ โ โ โ **Assessment / Differential Diagnosis:** โ โ โ 1. Progressive cervical spondylosis with resulting spinal cord irritation โ myelopathy โ โ โ features (balance, weakness, hyperreflexia). โ โ โ 2. Primary gait instability with suggestive signs of vestibular or proprioceptive โ โ โ involvement. โ โ โ 3. Chronic cough likely multifactorial (postโnasal drip, GERD) โ may be exacerbated by โ โ โ coughing strain on cervical spine. โ โ โ 4. Rule out secondary causes of myopathy/neuropathy (thyroid, inflammatory) โ currently โ โ โ low suspicion. โ โ โ โ โ โ **Plan:** โ โ โ - **Imaging:** โ โ โ - Cervical spine MRI with and without contrast (urgent) to evaluate for cord โ โ โ compression. โ โ โ - Consider lumbar spine MRI if low back pain persists or neuro signs extend distally. โ โ โ - **Neurology Referral:** For formal evaluation of possible cervical myelopathy and gait โ โ โ assessment. โ โ โ - **Physical Therapy:** Initiate supervised PT focusing on cervical stabilization, gait โ โ โ training, and balance exercises. โ โ โ - **Medication Review:** โ โ โ - Continue NSAID PRN for pain; limit to โค3 days/week. โ โ โ - Maintain antihypertensive and lipid-lowering therapy. โ โ โ - **Lifestyle/Discussion:** โ โ โ - Ergonomic modifications at work/home (monitor height, chair support). โ โ โ - Avoid prolonged neck flexion; use cervical pillow at night. โ โ โ - Monitor cough frequency; consider trial of OTC antitussive if bothersome; assess for โ โ โ reflux. โ โ โ - **Followโup:** โ โ โ - Return in 2โฏweeks after imaging results are reviewed; sooner if new neurologic โ โ โ deficits (e.g., urinary retention, worsening weakness) develop. โ โ โ - Contact clinic immediately for any new numbness, severe weakness, or falls. โ โ โ โ โ โ **Patient Education Provided:** โ โ โ - Explained nature of cervical spondylosis and how degenerative changes can affect spinal โ โ โ cord function. โ โ โ - Emphasized importance of early imaging to prevent irreversible cord injury. โ โ โ - Reviewed redโflag symptoms (new bladder/bowel dysfunction, marked weakness, falls) and โ โ โ instructed to seek emergent care if they occur. โ โ โ โ โ โ **Orders:** โ โ โ - MRI Cervical Spine โ STAT (radiology department) โ โ โ - PT referral (neuromuscular/orthopedic focus) โ โ โ - Lab panel (TSH, CBC, CMP, Vitamin B12) to rule out metabolic contributors (pending โ โ โ results) โ โ โ - Prescription: Ibuprofen 400โฏmg PO q6h PRN (max 1200โฏmg/day) for pain; continue current โ โ โ meds. โ โ โ โ โ โ **Signature:** โ โ โ Dr. Shannon M. Murphy, MD โ โ โ Internal Medicine / Neurology โ โ โ [Electronic Health Record โ Patient Chart] โ โ โ --- End of Note --- โ โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [index: 0]
# The preview dataset is available as a pandas DataFrame.
preview.dataset
| diagnosis | patient_summary | patient_sampler | doctor_sampler | patient_id | symptom_onset_date | date_of_visit | first_name | last_name | dob | physician | physician_notes | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | cervical spondylosis | I've been having a lot of pain in my neck and ... | {'uuid': '622c395a-f0c6-4a88-ab7c-c5c1593bf4e4... | {'uuid': 'bab9af0f-f034-493d-8013-0ef733807880... | PT-C84D9E64 | 2024 | 2024 | Danielle | Everett | 1950-02-08 | Dr. Murphy | **Visit Summary โ Danielle Everett (DOB: 05/12... |
| 1 | impetigo | I have a rash on my face that is getting worse... | {'uuid': '52f2d7bd-5924-4983-a907-f0fd693e4d87... | {'uuid': 'dee740fc-ce9f-4f7b-9467-179d0644a844... | PT-12CE0893 | 2024 | 2024 | Erin | Morgan | 1997-12-12 | Dr. Lopez | **Patient:** Erin Morgan \n**DOB:** 03/12/199... |
๐ 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.
# Print the analysis as a table.
preview.analysis.to_report()
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐จ Data Designer Dataset Profile โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Dataset Overview โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ number of records โ number of columns โ percent complete records โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ 2 โ 10 โ 100.0% โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฒ Sampler Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ sampler type โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ patient_sampler โ dict โ 2 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ doctor_sampler โ dict โ 2 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ patient_id โ string โ 2 (100.0%) โ uuid โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ symptom_onset_date โ string โ 1 (50.0%) โ datetime โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ date_of_visit โ string โ 1 (50.0%) โ timedelta โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ LLM-Text Columns โโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ prompt tokens โ completion tokens โ โ column name โ data type โ number unique values โ per record โ per record โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ physician_notes โ string โ 2 (100.0%) โ 114.0 +/- 4.0 โ 1061.5 +/- 119.5 โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ ๐งฉ Expression Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ first_name โ string โ 2 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ last_name โ string โ 2 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ dob โ string โ 2 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ physician โ string โ 2 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Table Notes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. โ โ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Scale up!ยถ
Happy with your preview data?
Use the
createmethod to submit larger Data Designer generation jobs.
results = data_designer.create(config_builder, num_records=10, dataset_name="tutorial-3")
[00:03:26] [INFO] ๐จ Creating Data Designer dataset
[00:03:26] [INFO] โ Validation passed
[00:03:26] [INFO] โ๏ธ Sorting column configs into a Directed Acyclic Graph
[00:03:26] [INFO] ๐ฉบ Running health checks for models...
[00:03:26] [INFO] |-- ๐ Checking 'nvidia/nemotron-3-nano-30b-a3b' in provider named 'nvidia' for model alias 'nemotron-nano-v3'...
[00:03:26] [INFO] |-- โ Passed!
[00:03:26] [INFO] โณ Processing batch 1 of 1
[00:03:26] [INFO] ๐ฑ Sampling 10 records from seed dataset
[00:03:26] [INFO] |-- seed dataset size: 820 records
[00:03:26] [INFO] |-- sampling strategy: ordered
[00:03:26] [INFO] ๐ฒ Preparing samplers to generate 10 records across 5 columns
[00:03:26] [INFO] (๐พ + ๐พ) Concatenating 2 datasets
[00:03:26] [INFO] ๐งฉ Generating column `first_name` from expression
[00:03:26] [INFO] ๐งฉ Generating column `last_name` from expression
[00:03:26] [INFO] ๐งฉ Generating column `dob` from expression
[00:03:26] [INFO] ๐งฉ Generating column `physician` from expression
[00:03:27] [INFO] ๐ llm-text model config for column 'physician_notes'
[00:03:27] [INFO] |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[00:03:27] [INFO] |-- model alias: 'nemotron-nano-v3'
[00:03:27] [INFO] |-- model provider: 'nvidia'
[00:03:27] [INFO] |-- inference parameters:
[00:03:27] [INFO] | |-- generation_type=chat-completion
[00:03:27] [INFO] | |-- max_parallel_requests=4
[00:03:27] [INFO] | |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[00:03:27] [INFO] | |-- temperature=1.00
[00:03:27] [INFO] | |-- top_p=1.00
[00:03:27] [INFO] | |-- max_tokens=2048
[00:03:27] [INFO] โก๏ธ Processing llm-text column 'physician_notes' with 4 concurrent workers
[00:03:27] [INFO] โฑ๏ธ llm-text column 'physician_notes' will report progress after each record
[00:03:30] [INFO] |-- ๐ง๏ธ llm-text column 'physician_notes' progress: 1/10 (10%) complete, 1 ok, 0 failed, 0.27 rec/s, eta 33.4s
[00:03:31] [INFO] |-- ๐ง๏ธ llm-text column 'physician_notes' progress: 2/10 (20%) complete, 2 ok, 0 failed, 0.47 rec/s, eta 17.0s
[00:03:31] [INFO] |-- ๐ฆ๏ธ llm-text column 'physician_notes' progress: 3/10 (30%) complete, 3 ok, 0 failed, 0.67 rec/s, eta 10.5s
[00:03:33] [INFO] |-- ๐ฆ๏ธ llm-text column 'physician_notes' progress: 4/10 (40%) complete, 4 ok, 0 failed, 0.65 rec/s, eta 9.2s
[00:03:35] [INFO] |-- โ llm-text column 'physician_notes' progress: 5/10 (50%) complete, 5 ok, 0 failed, 0.61 rec/s, eta 8.2s
[00:03:35] [INFO] |-- โ llm-text column 'physician_notes' progress: 6/10 (60%) complete, 6 ok, 0 failed, 0.73 rec/s, eta 5.5s
[00:03:36] [INFO] |-- โ llm-text column 'physician_notes' progress: 7/10 (70%) complete, 7 ok, 0 failed, 0.73 rec/s, eta 4.1s
[00:03:38] [INFO] |-- ๐ค๏ธ llm-text column 'physician_notes' progress: 8/10 (80%) complete, 8 ok, 0 failed, 0.68 rec/s, eta 3.0s
[00:03:39] [INFO] |-- ๐ค๏ธ llm-text column 'physician_notes' progress: 9/10 (90%) complete, 9 ok, 0 failed, 0.74 rec/s, eta 1.4s
[00:03:39] [INFO] |-- โ๏ธ llm-text column 'physician_notes' progress: 10/10 (100%) complete, 10 ok, 0 failed, 0.79 rec/s, eta 0.0s
[00:03:40] [INFO] ๐ Model usage summary:
[00:03:40] [INFO] |-- model: nvidia/nemotron-3-nano-30b-a3b
[00:03:40] [INFO] |-- tokens: input=1434, output=9198, total=10632, tps=810
[00:03:40] [INFO] |-- requests: success=10, failed=0, total=10, rpm=45
[00:03:40] [INFO] ๐ Measuring dataset column statistics:
[00:03:40] [INFO] |-- ๐ฒ column: 'patient_sampler'
[00:03:40] [INFO] |-- ๐ฒ column: 'doctor_sampler'
[00:03:40] [INFO] |-- ๐ฒ column: 'patient_id'
[00:03:40] [INFO] |-- ๐งฉ column: 'first_name'
[00:03:40] [INFO] |-- ๐งฉ column: 'last_name'
[00:03:40] [INFO] |-- ๐งฉ column: 'dob'
[00:03:40] [INFO] |-- ๐ฒ column: 'symptom_onset_date'
[00:03:40] [INFO] |-- ๐ฒ column: 'date_of_visit'
[00:03:40] [INFO] |-- ๐งฉ column: 'physician'
[00:03:40] [INFO] |-- ๐ column: 'physician_notes'
# Load the generated dataset as a pandas DataFrame.
dataset = results.load_dataset()
dataset.head()
| diagnosis | patient_summary | patient_sampler | doctor_sampler | patient_id | symptom_onset_date | date_of_visit | first_name | last_name | dob | physician | physician_notes | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | cervical spondylosis | I've been having a lot of pain in my neck and ... | {'age': 103, 'bachelors_field': 'no_degree', '... | {'age': 32, 'bachelors_field': 'no_degree', 'b... | PT-13FEF457 | 2024-01-09 | 2024-01-16 | Robert | Franklin | 1922-09-14 | Dr. Wood | **Patient:** Robert Franklin | **DOB:** 01/15/... |
| 1 | impetigo | I have a rash on my face that is getting worse... | {'age': 71, 'bachelors_field': 'stem_related',... | {'age': 75, 'bachelors_field': 'no_degree', 'b... | PT-2EE0C674 | 2024-05-21 | 2024-05-28 | Rebecca | Calhoun | 1955-02-02 | Dr. Shepard | [Patient: Rebecca Calhoun] [DOB: 1985-09-12] [... |
| 2 | urinary tract infection | I have been urinating blood. I sometimes feel ... | {'age': 79, 'bachelors_field': 'no_degree', 'b... | {'age': 64, 'bachelors_field': 'no_degree', 'b... | PT-2B11684C | 2024-04-26 | 2024-05-18 | Tanya | Thomas | 1946-06-20 | Dr. Macias | **Note - Dr. C. Macias, MD** **Date:** 2024-... |
| 3 | arthritis | I have been having trouble with my muscles and... | {'age': 84, 'bachelors_field': 'business', 'bi... | {'age': 57, 'bachelors_field': 'no_degree', 'b... | PT-782CCD3C | 2024-09-07 | 2024-09-25 | Hannah | Garza | 1941-03-31 | Dr. Miller | **Patient:** Hannah Garza **DOB:** 03/14/199... |
| 4 | dengue | I have been feeling really sick. My body hurts... | {'age': 92, 'bachelors_field': 'no_degree', 'b... | {'age': 102, 'bachelors_field': 'no_degree', '... | PT-394D5C6C | 2024-09-30 | 2024-10-24 | Timothy | Johnson | 1933-06-26 | Dr. Sims | **Progress Notes - 2024-10-24** **Patient:**... |
# Load the analysis results into memory.
analysis = results.load_analysis()
analysis.to_report()
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐จ Data Designer Dataset Profile โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Dataset Overview โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ number of records โ number of columns โ percent complete records โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ 10 โ 10 โ 100.0% โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ฒ Sampler Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ sampler type โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ patient_sampler โ dict โ 10 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ doctor_sampler โ dict โ 10 (100.0%) โ person_from_faker โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ patient_id โ string โ 10 (100.0%) โ uuid โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ symptom_onset_date โ string โ 10 (100.0%) โ datetime โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ date_of_visit โ string โ 10 (100.0%) โ timedelta โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ LLM-Text Columns โโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ โ โ prompt tokens โ completion tokens โ โ column name โ data type โ number unique values โ per record โ per record โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ physician_notes โ string โ 10 (100.0%) โ 119.0 +/- 5.5 โ 835.0 +/- 129.1 โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ ๐งฉ Expression Columns โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ column name โ data type โ number unique values โ โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ โ first_name โ string โ 9 (90.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ last_name โ string โ 10 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ dob โ string โ 10 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ physician โ string โ 10 (100.0%) โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Table Notes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ โ โ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. โ โ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญ๏ธ Next Stepsยถ
Check out the following notebook to learn more about: