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.
-
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.
DataDesignerConfigBuilder( seed_dataset: local seed )
🎨 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
[13:23:38] [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.
[13:23:38] [INFO] 🔭 Preview generation in progress
[13:23:38] [INFO] |-- 🔒 Jinja rendering engine: secure
[13:23:38] [INFO] ✅ Validation passed
[13:23:38] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[13:23:38] [INFO] 🩺 Running health checks for models...
[13:23:38] [INFO] |-- 👀 Checking 'nvidia/nemotron-3-nano-30b-a3b' in provider named 'nvidia' for model alias 'nemotron-nano-v3'...
[13:23:38] [INFO] |-- ✅ Passed!
[13:23:38] [INFO] ⚡ DATA_DESIGNER_ASYNC_ENGINE is enabled - using async task-queue preview
[13:23:38] [INFO] 📝 llm-text model config for column 'physician_notes'
[13:23:38] [INFO] |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[13:23:38] [INFO] |-- model alias: 'nemotron-nano-v3'
[13:23:38] [INFO] |-- model provider: 'nvidia'
[13:23:38] [INFO] |-- inference parameters:
[13:23:38] [INFO] | |-- generation_type=chat-completion
[13:23:38] [INFO] | |-- max_parallel_requests=4
[13:23:38] [INFO] | |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}[13:23:38] [INFO] | |-- temperature=1.00
[13:23:38] [INFO] | |-- top_p=1.00
[13:23:38] [INFO] | |-- max_tokens=2048
[13:23:38] [INFO] ⚡️ Async generation: 1 column(s) (physician_notes), 2 tasks across 1 row group(s)
[13:23:38] [INFO] 🚀 (1/1) Dispatching with 2 records
[13:23:38] [INFO] 🎲 (1/1) Preparing samplers to generate 2 records across 5 columns
[13:23:38] [INFO] 🌱 (1/1) Sampling 2 records from seed dataset
[13:23:38] [INFO] |-- seed dataset size: 820 records
[13:23:38] [INFO] |-- sampling strategy: ordered
[13:23:38] [INFO] 🧩 (1/1) Generating column `dob` from expression
[13:23:38] [INFO] 🧩 (1/1) Generating column `first_name` from expression
[13:23:38] [INFO] 🧩 (1/1) Generating column `last_name` from expression
[13:23:38] [INFO] 🧩 (1/1) Generating column `physician` from expression
[13:23:44] [INFO] 📊 Progress [6.2s]:
[13:23:44] [INFO] |-- 😸 physician_notes: 1/2 (50%) 0.2 rec/s
[13:23:47] [INFO] 📊 Progress [9.4s]:
[13:23:47] [INFO] |-- 🦁 physician_notes: 2/2 (100%) 0.2 rec/s
[13:23:47] [INFO] ✅ Async generation complete [9.4s]: 2 ok, 0 failed across 1 column(s)
[13:23:47] [INFO] 📊 Model usage summary:
[13:23:47] [INFO] |-- model: nvidia/nemotron-3-nano-30b-a3b
[13:23:47] [INFO] |-- tokens: input=327, output=1986, total=2313, tps=245
[13:23:47] [INFO] |-- requests: success=2, failed=0, total=2, rpm=12
[13:23:47] [INFO] 📐 Measuring dataset column statistics:
[13:23:47] [INFO] |-- 🎲 column: 'patient_sampler'
[13:23:47] [INFO] |-- 🎲 column: 'doctor_sampler'
[13:23:47] [INFO] |-- 🎲 column: 'patient_id'
[13:23:47] [INFO] |-- 🧩 column: 'first_name'
[13:23:47] [INFO] |-- 🧩 column: 'last_name'
[13:23:47] [INFO] |-- 🧩 column: 'dob'
[13:23:47] [INFO] |-- 🎲 column: 'symptom_onset_date'
[13:23:47] [INFO] |-- 🎲 column: 'date_of_visit'
[13:23:47] [INFO] |-- 🧩 column: 'physician'
[13:23:47] [INFO] |-- 📝 column: 'physician_notes'
[13:23:48] [INFO] ☀️ Preview complete!
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': '32d53fb4-e167-4b05-b72a-264ce68ca1bc', │ │ │ 'locale': 'en_US', │ │ │ 'first_name': 'Alex', │ │ │ 'last_name': 'Carey', │ │ │ 'middle_name': None, │ │ │ 'sex': 'Male', │ │ │ 'street_number': '9481', │ │ │ 'street_name': 'Chris Avenue', │ │ │ 'city': 'Normanfurt', │ │ │ 'state': 'New Jersey', │ │ │ 'postcode': '41752', │ │ │ 'age': 51, │ │ │ 'birth_date': '1975-02-07', │ │ │ 'country': 'Comoros', │ │ │ 'marital_status': 'never_married', │ │ │ 'education_level': 'secondary_education', │ │ │ 'unit': '', │ │ │ 'occupation': 'Designer, textile', │ │ │ 'phone_number': '7222201851', │ │ │ 'bachelors_field': 'no_degree' │ │ │ } │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ doctor_sampler │ { │ │ │ 'uuid': 'b5a79a26-6309-418c-b245-1b7ad2270181', │ │ │ 'locale': 'en_US', │ │ │ 'first_name': 'Steven', │ │ │ 'last_name': 'Greene', │ │ │ 'middle_name': None, │ │ │ 'sex': 'Male', │ │ │ 'street_number': '7081', │ │ │ 'street_name': 'Harris Tunnel', │ │ │ 'city': 'Skinnerland', │ │ │ 'state': 'Tennessee', │ │ │ 'postcode': '01039', │ │ │ 'age': 102, │ │ │ 'birth_date': '1923-12-12', │ │ │ 'country': 'San Marino', │ │ │ 'marital_status': 'married_present', │ │ │ 'education_level': 'bachelors', │ │ │ 'unit': '', │ │ │ 'occupation': 'Social researcher', │ │ │ 'phone_number': '001-779-332-7392x6244', │ │ │ 'bachelors_field': 'education' │ │ │ } │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ patient_id │ PT-08B1FC79 │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ symptom_onset_date │ 2024-05-16T00:00:00 │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ date_of_visit │ 2024-06-09T00:00:00 │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ physician_notes │ **Visit Summary: Alex Care** │ │ │ **Date:** 2024-06-09 │ │ │ **Provider:** Dr. Steven Greene │ │ │ │ │ │ **Presenting Concerns:** │ │ │ - **Primary:** Increasing cervical/thoracic pain since initial onset (2024-05-16), │ │ │ now interfering with ADLs (e.g., dressing, cooking). Reports "cracking" sensation │ │ │ during neck rotation; pain radiates to left shoulder. │ │ │ - **New:** Recurrent **coughing episodes** (non-productive, worse with neck │ │ │ movement), **weakness** in bilateral upper/lower extremities (difficulty lifting │ │ │ arms, climbing stairs), **impaired balance/coordination** (stumbled twice in clinic, │ │ │ required support). Denies recent trauma, fever, or bowel/bladder changes. │ │ │ │ │ │ **History/Coding Context:** │ │ │ - ICD-10: M50.2 (Cervical spondylosis) + M53.1 (Radiculopathy) + R26.2 (Gait │ │ │ disturbance) + R29.8 (Other symptoms of nervous system). │ │ │ - **Key Red Flags Addressed:** Comorbidities managed (HTN, high cholesterol), no │ │ │ acute neurological deficits (4+ strength in extremities), no incontinence/visceral │ │ │ symptoms. │ │ │ │ │ │ **Assessment & Plan:** │ │ │ 1. **Ongoing Pain Management:** │ │ │ - Adjusted R/O (celecoxib 200mg BID *as needed*; topical NSAID trial). │ │ │ - **Movement Strategy:** Structured neck ROM exercises (gentle flexion/extension │ │ │ 5x/day), avoid rotation beyond 45°. │ │ │ - *Patient Education:* "Pain flare-ups likely due to nerve irritation; not a new │ │ │ injury." │ │ │ │ │ │ 2. **Neurological Concerns:** │ │ │ - **Balance/Weakness:** Ordered **MRI cervical spine** (prioritized *today* to │ │ │ rule out cord compression); suspect cervical myelopathy progression. │ │ │ - **Coughing:** Linked to neck movement (possible upper airway irritation); *not* │ │ │ ruled out cardiac/respiratory etiology. │ │ │ - **Coordination:** Screening for sensory deficits (e.g., vibration sense tested); │ │ │ no focal deficits noted. │ │ │ │ │ │ 3. **Rationale for Urgent MRI:** │ │ │ - Weakness + instability + pain progression (5 weeks vs. initial 1-week episode) │ │ │ necessitates structural evaluation. If MRI confirms cord compression, referral to │ │ │ neurosurgery *immediately* (vs. waiting for 6-week PT trial). │ │ │ │ │ │ **Patient Outlook:** │ │ │ - **Prognosis:** Optimistic *if* structural cause ruled out (e.g., facet arthropathy │ │ │ vs. disc herniation). │ │ │ - **Next Steps:** │ │ │ - **Immediate:** MRI scheduling (clinic referral sent to radiology). │ │ │ - **Follow-up:** 1 week to discuss MRI results; if negative, initiate PT referral. │ │ │ - **Advisory:** "You’re doing well by seeking help early—let’s keep momentum." │ │ │ │ │ │ **Clinician Note:** │ │ │ *Documented all critical symptoms verbatim (e.g., "stumbled twice," "coughing with │ │ │ neck movement") for medico-legal accuracy. Shifted focus from "chronic pain" to │ │ │ *actionable diagnostics* given new neurological red flags.* │ │ │ │ │ │ --- │ │ │ **Signature:** Dr. Steven Greene, MD │ │ │ **Note Type:** Progress Note | **Time:** 15 min | **Provider:** Primary Care │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ first_name │ Alex │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ last_name │ Carey │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ dob │ 1975-02-07 │ ├────────────────────┼───────────────────────────────────────────────────────────────────────────────────────┤ │ physician │ Dr. Greene │ └────────────────────┴───────────────────────────────────────────────────────────────────────────────────────┘
| diagnosis | patient_summary | patient_sampler | doctor_sampler | patient_id | symptom_onset_date | date_of_visit | dob | first_name | last_name | physician | physician_notes | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | cervical spondylosis | I've been having a lot of pain in my neck and ... | {'uuid': '32d53fb4-e167-4b05-b72a-264ce68ca1bc... | {'uuid': 'b5a79a26-6309-418c-b245-1b7ad2270181... | PT-08B1FC79 | 2024-05-16T00:00:00 | 2024-06-09T00:00:00 | 1975-02-07 | Alex | Carey | Dr. Greene | **Visit Summary: Alex Care** \n**Date:** 2024... |
| 1 | impetigo | I have a rash on my face that is getting worse... | {'uuid': '3e839da2-6d0c-4b73-a82f-59e420643ee0... | {'uuid': 'faa14950-d2ca-452b-9ce0-6ac22aba1da8... | PT-35F92B28 | 2024-10-10T00:00:00 | 2024-10-14T00:00:00 | 1999-06-17 | Brian | Hendrix | Dr. Gibson | **Patient:** Brian Hendrix \n**DOB:** 04/12/1... |
📊 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.
──────────────────────────────────────── 🎨 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 │ 2 (100.0%) │ datetime │ ├───────────────────────────────┼─────────────────┼──────────────────────────────────┼────────────────────────────┤ │ date_of_visit │ string │ 2 (100.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%) │ 134.5 +/- 3.5 │ 931.5 +/- 306.2 │ └───────────────────────┴───────────────┴────────────────────────────┴───────────────────┴────────────────────────┘ 🧩 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.
[13:23:48] [INFO] 🎨 Creating Data Designer dataset
[13:23:48] [INFO] |-- 🔒 Jinja rendering engine: secure
[13:23:48] [INFO] ✅ Validation passed
[13:23:48] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[13:23:48] [INFO] 🩺 Running health checks for models...
[13:23:48] [INFO] |-- 👀 Checking 'nvidia/nemotron-3-nano-30b-a3b' in provider named 'nvidia' for model alias 'nemotron-nano-v3'...
[13:23:48] [INFO] |-- ✅ Passed!
[13:23:48] [INFO] ⚡ DATA_DESIGNER_ASYNC_ENGINE is enabled - using async task-queue builder
[13:23:48] [INFO] 📝 llm-text model config for column 'physician_notes'
[13:23:48] [INFO] |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[13:23:48] [INFO] |-- model alias: 'nemotron-nano-v3'
[13:23:48] [INFO] |-- model provider: 'nvidia'
[13:23:48] [INFO] |-- inference parameters:
[13:23:48] [INFO] | |-- generation_type=chat-completion
[13:23:48] [INFO] | |-- max_parallel_requests=4
[13:23:48] [INFO] | |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}[13:23:48] [INFO] | |-- temperature=1.00
[13:23:48] [INFO] | |-- top_p=1.00
[13:23:48] [INFO] | |-- max_tokens=2048
[13:23:48] [INFO] ⚡️ Async generation: 1 column(s) (physician_notes), 10 tasks across 1 row group(s)
[13:23:48] [INFO] 🚀 (1/1) Dispatching with 10 records
[13:23:48] [INFO] 🎲 (1/1) Preparing samplers to generate 10 records across 5 columns
[13:23:48] [INFO] 🌱 (1/1) Sampling 10 records from seed dataset
[13:23:48] [INFO] |-- seed dataset size: 820 records
[13:23:48] [INFO] 🧩 (1/1) Generating column `dob` from expression
[13:23:48] [INFO] 🧩 (1/1) Generating column `first_name` from expression
[13:23:48] [INFO] |-- sampling strategy: ordered
[13:23:48] [INFO] 🧩 (1/1) Generating column `last_name` from expression
[13:23:48] [INFO] 🧩 (1/1) Generating column `physician` from expression
[13:23:55] [INFO] 📊 Progress [6.7s]:
[13:23:55] [INFO] |-- 🐴 physician_notes: 3/10 (30%) 0.4 rec/s
[13:24:00] [INFO] 📊 Progress [12.0s]:
[13:24:00] [INFO] |-- 🚗 physician_notes: 7/10 (70%) 0.6 rec/s
[13:24:06] [INFO] 📊 Progress [18.4s]:
[13:24:06] [INFO] |-- 🚀 physician_notes: 10/10 (100%) 0.5 rec/s
[13:24:06] [INFO] ✅ Async generation complete [18.4s]: 10 ok, 0 failed across 1 column(s)
[13:24:07] [INFO] 📊 Model usage summary:
[13:24:07] [INFO] |-- model: nvidia/nemotron-3-nano-30b-a3b
[13:24:07] [INFO] |-- tokens: input=1615, output=9332, total=10947, tps=589
[13:24:07] [INFO] |-- requests: success=10, failed=0, total=10, rpm=32
[13:24:07] [INFO] 📐 Measuring dataset column statistics:
[13:24:07] [INFO] |-- 🎲 column: 'patient_sampler'
[13:24:07] [INFO] |-- 🎲 column: 'doctor_sampler'
[13:24:07] [INFO] |-- 🎲 column: 'patient_id'
[13:24:07] [INFO] |-- 🧩 column: 'first_name'
[13:24:07] [INFO] |-- 🧩 column: 'last_name'
[13:24:07] [INFO] |-- 🧩 column: 'dob'
[13:24:07] [INFO] |-- 🎲 column: 'symptom_onset_date'
[13:24:07] [INFO] |-- 🎲 column: 'date_of_visit'
[13:24:07] [INFO] |-- 🧩 column: 'physician'
[13:24:07] [INFO] |-- 📝 column: 'physician_notes'
| patient_sampler | doctor_sampler | patient_id | symptom_onset_date | date_of_visit | dob | first_name | last_name | physician | diagnosis | patient_summary | physician_notes | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | {'age': 59, 'bachelors_field': 'no_degree', 'b... | {'age': 31, 'bachelors_field': 'no_degree', 'b... | PT-9CD16C2F | 2024-05-03T00:00:00 | 2024-05-04T00:00:00 | 1966-06-09 | Johnny | French | Dr. Goodman | cervical spondylosis | I've been having a lot of pain in my neck and ... | 2024-05-04 Patient: Johnny French DOB: 01/15/1... |
| 1 | {'age': 111, 'bachelors_field': 'no_degree', '... | {'age': 86, 'bachelors_field': 'no_degree', 'b... | PT-5940E606 | 2024-07-17T00:00:00 | 2024-07-31T00:00:00 | 1914-12-16 | Timothy | Gonzalez | Dr. Evans | impetigo | I have a rash on my face that is getting worse... | **Encounter Summary - Dr. L. Evans, MD** **D... |
| 2 | {'age': 43, 'bachelors_field': 'business', 'bi... | {'age': 21, 'bachelors_field': 'no_degree', 'b... | PT-0616F8A4 | 2024-02-20T00:00:00 | 2024-03-06T00:00:00 | 1983-03-28 | Michael | Hernandez | Dr. Diaz | urinary tract infection | I have been urinating blood. I sometimes feel ... | **Patient:** Michael Hernandez **DOB:** [MM/... |
| 3 | {'age': 73, 'bachelors_field': 'stem_related',... | {'age': 48, 'bachelors_field': 'no_degree', 'b... | PT-DB77A5F1 | 2024-03-31T00:00:00 | 2024-04-18T00:00:00 | 1952-10-05 | Janice | Tucker | Dr. Long | arthritis | I have been having trouble with my muscles and... | **Chief Complaint:** "Having trouble with my... |
| 4 | {'age': 26, 'bachelors_field': 'stem', 'birth_... | {'age': 56, 'bachelors_field': 'stem', 'birth_... | PT-C5342BB6 | 2024-02-10T00:00:00 | 2024-02-13T00:00:00 | 2000-05-29 | Kevin | Sullivan | Dr. Combs | dengue | I have been feeling really sick. My body hurts... | **Patient:** Kevin Sullivan | **DOB:** 1992-04... |
──────────────────────────────────────── 🎨 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%) │ 129.5 +/- 6.1 │ 780.5 +/- 341.3 │ └───────────────────────┴───────────────┴────────────────────────────┴───────────────────┴────────────────────────┘ 🧩 Expression Columns ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ column name ┃ data type ┃ number unique values ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ first_name │ string │ 10 (100.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: