Structured Outputs, Jinja Expressions, and Conditional Generation

View as Markdown

🎨 Data Designer Tutorial: Structured Outputs, Jinja Expressions, and Conditional Generation

📚 What you'll learn

In this notebook, we will continue our exploration of Data Designer, demonstrating more advanced data generation using structured outputs, Jinja expressions, and conditional generation with skip.when.

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.config provides access to the configuration API.

  • DataDesigner is the main interface for data generation.

Python
1import data_designer.config as dd
2from data_designer.interface import DataDesigner
3

⚙️ Initialize the Data Designer interface

  • DataDesigner is the main object that is used to interface with the library.

  • When initialized without arguments, the default model providers are used.

Python
1data_designer = DataDesigner()
2

🎛️ Define model configurations

  • Each ModelConfig defines 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.

Python
1# This name is set in the model provider configuration.
2MODEL_PROVIDER = "nvidia"
3
4# The model ID is from build.nvidia.com.
5MODEL_ID = "nvidia/nemotron-3-nano-30b-a3b"
6
7# We choose this alias to be descriptive for our use case.
8MODEL_ALIAS = "nemotron-nano-v3"
9
10model_configs = [
11 dd.ModelConfig(
12 alias=MODEL_ALIAS,
13 model=MODEL_ID,
14 provider=MODEL_PROVIDER,
15 inference_parameters=dd.ChatCompletionInferenceParams(
16 temperature=1.0,
17 top_p=1.0,
18 max_tokens=2048,
19 extra_body={"chat_template_kwargs": {"enable_thinking": False}},
20 ),
21 )
22]
23

🏗️ 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.

Python
1config_builder = dd.DataDesignerConfigBuilder(model_configs=model_configs)
2

🧑‍🎨 Designing our data

  • We will again create a product review dataset, but this time we will use structured outputs and Jinja expressions.

  • Structured outputs let you specify the exact schema of the data you want to generate.

  • Data Designer supports schemas specified using either json schema or Pydantic data models (recommended).


We'll define our structured outputs using Pydantic data models

💡 Why Pydantic?

  • Pydantic models provide better IDE support and type validation.

  • They are more Pythonic than raw JSON schemas.

  • They integrate seamlessly with Data Designer's structured output system.

Python
1from decimal import Decimal
2from typing import Literal
3
4from pydantic import BaseModel, Field
5
6
7# We define a Product schema so that the name, description, and price are generated
8# in one go, with the types and constraints specified.
9class Product(BaseModel):
10 name: str = Field(description="The name of the product")
11 description: str = Field(description="A description of the product")
12 price: Decimal = Field(description="The price of the product", ge=10, le=1000, decimal_places=2)
13
14
15class ProductReview(BaseModel):
16 rating: int = Field(description="The rating of the product", ge=1, le=5)
17 customer_mood: Literal["irritated", "mad", "happy", "neutral", "excited"] = Field(
18 description="The mood of the customer"
19 )
20 review: str = Field(description="A review of the product")
21

Next, let's design our product review dataset using a few more tricks compared to the previous notebook.

Python
1# Since we often only want a few attributes from Person objects, we can
2# set drop=True in the column config to drop the column from the final dataset.
3config_builder.add_column(
4 dd.SamplerColumnConfig(
5 name="customer",
6 sampler_type=dd.SamplerType.PERSON_FROM_FAKER,
7 params=dd.PersonFromFakerSamplerParams(),
8 drop=True,
9 )
10)
11
12config_builder.add_column(
13 dd.SamplerColumnConfig(
14 name="product_category",
15 sampler_type=dd.SamplerType.CATEGORY,
16 params=dd.CategorySamplerParams(
17 values=[
18 "Electronics",
19 "Clothing",
20 "Home & Kitchen",
21 "Books",
22 "Home Office",
23 ],
24 ),
25 )
26)
27
28config_builder.add_column(
29 dd.SamplerColumnConfig(
30 name="product_subcategory",
31 sampler_type=dd.SamplerType.SUBCATEGORY,
32 params=dd.SubcategorySamplerParams(
33 category="product_category",
34 values={
35 "Electronics": [
36 "Smartphones",
37 "Laptops",
38 "Headphones",
39 "Cameras",
40 "Accessories",
41 ],
42 "Clothing": [
43 "Men's Clothing",
44 "Women's Clothing",
45 "Winter Coats",
46 "Activewear",
47 "Accessories",
48 ],
49 "Home & Kitchen": [
50 "Appliances",
51 "Cookware",
52 "Furniture",
53 "Decor",
54 "Organization",
55 ],
56 "Books": [
57 "Fiction",
58 "Non-Fiction",
59 "Self-Help",
60 "Textbooks",
61 "Classics",
62 ],
63 "Home Office": [
64 "Desks",
65 "Chairs",
66 "Storage",
67 "Office Supplies",
68 "Lighting",
69 ],
70 },
71 ),
72 )
73)
74
75config_builder.add_column(
76 dd.SamplerColumnConfig(
77 name="target_age_range",
78 sampler_type=dd.SamplerType.CATEGORY,
79 params=dd.CategorySamplerParams(values=["18-25", "25-35", "35-50", "50-65", "65+"]),
80 )
81)
82
83# Sampler columns support conditional params, which are used if the condition is met.
84# In this example, we set the review style to rambling if the target age range is 18-25.
85# Note conditional parameters are only supported for Sampler column types.
86config_builder.add_column(
87 dd.SamplerColumnConfig(
88 name="review_style",
89 sampler_type=dd.SamplerType.CATEGORY,
90 params=dd.CategorySamplerParams(
91 values=["rambling", "brief", "detailed", "structured with bullet points"],
92 weights=[1, 2, 2, 1],
93 ),
94 conditional_params={
95 "target_age_range == '18-25'": dd.CategorySamplerParams(values=["rambling"]),
96 },
97 )
98)
99
100# Optionally validate that the columns are configured correctly.
101data_designer.validate(config_builder)
102
Output
[17:19:39] [INFO] ✅ Validation passed

Next, we will use more advanced Jinja expressions to create new columns.

Jinja expressions let you:

  • Access nested attributes: {{ customer.first_name }}

  • Combine values: {{ customer.first_name }} {{ customer.last_name }}

  • Use conditional logic: {% if condition %}...{% endif %}

Python
1# We can create new columns using Jinja expressions that reference
2# existing columns, including attributes of nested objects.
3config_builder.add_column(
4 dd.ExpressionColumnConfig(name="customer_name", expr="{{ customer.first_name }} {{ customer.last_name }}")
5)
6
7config_builder.add_column(dd.ExpressionColumnConfig(name="customer_age", expr="{{ customer.age }}"))
8
9config_builder.add_column(
10 dd.LLMStructuredColumnConfig(
11 name="product",
12 prompt=(
13 "Create a product in the '{{ product_category }}' category, focusing on products "
14 "related to '{{ product_subcategory }}'. The target age range of the ideal customer is "
15 "{{ target_age_range }} years old. The product should be priced between $10 and $1000."
16 ),
17 output_format=Product,
18 model_alias=MODEL_ALIAS,
19 )
20)
21
22# We can even use if/else logic in our Jinja expressions to create more complex prompt patterns.
23config_builder.add_column(
24 dd.LLMStructuredColumnConfig(
25 name="customer_review",
26 prompt=(
27 "Your task is to write a review for the following product:\n\n"
28 "Product Name: {{ product.name }}\n"
29 "Product Description: {{ product.description }}\n"
30 "Price: {{ product.price }}\n\n"
31 "Imagine your name is {{ customer_name }} and you are from {{ customer.city }}, {{ customer.state }}. "
32 "Write the review in a style that is '{{ review_style }}'."
33 "{% if target_age_range == '18-25' %}"
34 "Make sure the review is more informal and conversational.\n"
35 "{% else %}"
36 "Make sure the review is more formal and structured.\n"
37 "{% endif %}"
38 "The review field should contain only the review, no other text."
39 ),
40 output_format=ProductReview,
41 model_alias=MODEL_ALIAS,
42 )
43)
44
45data_designer.validate(config_builder)
46
Output
[17:19:39] [INFO] ✅ Validation passed

🚦 Conditional generation with skip.when

So far, every column is generated for every row. But sometimes an expensive LLM column only makes sense for a subset of rows — for example, a detailed complaint analysis is only useful when the review is negative.

Data Designer lets you skip column generation on a per-row basis using SkipConfig. Skipped rows receive None by default, but you can provide a sentinel value with skip=dd.SkipConfig(when="...", value="N/A") to write a specific value instead.

There are three patterns to know:

Pattern How Effect
Expression gate skip=dd.SkipConfig(when="...") Skip this column when the Jinja2 expression is truthy
Skip propagation (default) Downstream column depends on a skipped column Automatically skipped too (propagate_skip=True by default)
Propagation opt-out propagate_skip=False on the downstream column Always generates, even if an upstream was skipped

Pattern 1 — Expression gate. Only generate a detailed complaint analysis when the customer gave a low rating (1 or 2 stars). Rows where the rating is 3 or higher will get None for this column.

Python
1config_builder.add_column(
2 dd.LLMTextColumnConfig(
3 name="complaint_analysis",
4 model_alias=MODEL_ALIAS,
5 prompt=(
6 "A customer reviewed '{{ product.name }}' ({{ product_category }} / {{ product_subcategory }}).\n\n"
7 "Review: {{ customer_review.review }}\n"
8 "Rating: {{ customer_review.rating }}/5\n"
9 "Mood: {{ customer_review.customer_mood }}\n\n"
10 "Write a short root-cause analysis of why this customer is unhappy "
11 "and suggest one concrete improvement the product team could make."
12 ),
13 skip=dd.SkipConfig(when="{{ customer_review.rating > 2 }}"),
14 )
15)
16
Output
DataDesignerConfigBuilder(
    sampler_columns: [
        "customer",
        "product_category",
        "product_subcategory",
        "target_age_range",
        "review_style"
    ]
    llm_text_columns: ['complaint_analysis']
    llm_structured_columns: ['product', 'customer_review']
    expression_columns: ['customer_name', 'customer_age']
)

Pattern 2 — Skip propagation. action_items depends on complaint_analysis. When complaint_analysis is skipped, action_items auto-skips too because propagate_skip defaults to True.

Python
1config_builder.add_column(
2 dd.LLMTextColumnConfig(
3 name="action_items",
4 model_alias=MODEL_ALIAS,
5 prompt=(
6 "Based on this complaint analysis:\n"
7 "{{ complaint_analysis }}\n\n"
8 "List 2-3 concrete action items for the product team."
9 ),
10 )
11)
12
Output
DataDesignerConfigBuilder(
    sampler_columns: [
        "customer",
        "product_category",
        "product_subcategory",
        "target_age_range",
        "review_style"
    ]
    llm_text_columns: ['complaint_analysis', 'action_items']
    llm_structured_columns: ['product', 'customer_review']
    expression_columns: ['customer_name', 'customer_age']
)

Pattern 3 — Propagation opt-out. review_summary also depends on complaint_analysis, but sets propagate_skip=False so it always generates. The prompt uses a Jinja conditional to handle the case where complaint_analysis is None.

Python
1config_builder.add_column(
2 dd.LLMTextColumnConfig(
3 name="review_summary",
4 model_alias=MODEL_ALIAS,
5 propagate_skip=False,
6 prompt=(
7 "Summarize this product review in one sentence:\n"
8 "Product: {{ product.name }}\n"
9 "Rating: {{ customer_review.rating }}/5\n"
10 "Review: {{ customer_review.review }}\n"
11 "{% if complaint_analysis %}"
12 "Complaint analysis: {{ complaint_analysis }}\n"
13 "{% endif %}"
14 ),
15 )
16)
17
18data_designer.validate(config_builder)
19
Output
[17:19:40] [INFO] ✅ Validation passed

🔁 Iteration is key – preview the dataset!

  1. Use the preview method to generate a sample of records quickly.

  2. Inspect the results for quality and format issues.

  3. Adjust column configurations, prompts, or parameters as needed.

  4. Re-run the preview until satisfied.

Python
1preview = data_designer.preview(config_builder, num_records=2)
2
Output
[17:19:40] [INFO] 🖼️ Preview generation in progress
[17:19:40] [INFO]   |-- 🔒 Jinja rendering engine: secure
[17:19:40] [INFO] ✅ Validation passed
[17:19:40] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[17:19:40] [INFO] Skipping model health checks because DATA_DESIGNER_SKIP_MODEL_HEALTH_CHECKS=1
[17:19:40] [INFO] ⚡ Using async task-queue preview
[17:19:40] [INFO] 🗂️ llm-structured model config for column 'product'
[17:19:40] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:40] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:40] [INFO]   |-- model provider: 'nvidia'
[17:19:40] [INFO]   |-- inference parameters:
[17:19:40] [INFO]   |  |-- generation_type=chat-completion
[17:19:40] [INFO]   |  |-- max_parallel_requests=4
[17:19:40] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:40] [INFO]   |  |-- temperature=1.00
[17:19:40] [INFO]   |  |-- top_p=1.00
[17:19:40] [INFO]   |  |-- max_tokens=2048
[17:19:40] [INFO] 🗂️ llm-structured model config for column 'customer_review'
[17:19:40] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:40] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:40] [INFO]   |-- model provider: 'nvidia'
[17:19:40] [INFO]   |-- inference parameters:
[17:19:40] [INFO]   |  |-- generation_type=chat-completion
[17:19:40] [INFO]   |  |-- max_parallel_requests=4
[17:19:40] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:40] [INFO]   |  |-- temperature=1.00
[17:19:40] [INFO]   |  |-- top_p=1.00
[17:19:40] [INFO]   |  |-- max_tokens=2048
[17:19:40] [INFO] 📝 llm-text model config for column 'complaint_analysis'
[17:19:40] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:40] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:40] [INFO]   |-- model provider: 'nvidia'
[17:19:40] [INFO]   |-- inference parameters:
[17:19:40] [INFO]   |  |-- generation_type=chat-completion
[17:19:40] [INFO]   |  |-- max_parallel_requests=4
[17:19:40] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:40] [INFO]   |  |-- temperature=1.00
[17:19:40] [INFO]   |  |-- top_p=1.00
[17:19:40] [INFO]   |  |-- max_tokens=2048
[17:19:40] [INFO] 📝 llm-text model config for column 'review_summary'
[17:19:40] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:40] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:40] [INFO]   |-- model provider: 'nvidia'
[17:19:40] [INFO]   |-- inference parameters:
[17:19:40] [INFO]   |  |-- generation_type=chat-completion
[17:19:40] [INFO]   |  |-- max_parallel_requests=4
[17:19:40] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:40] [INFO]   |  |-- temperature=1.00
[17:19:40] [INFO]   |  |-- top_p=1.00
[17:19:40] [INFO]   |  |-- max_tokens=2048
[17:19:40] [INFO] 📝 llm-text model config for column 'action_items'
[17:19:40] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:40] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:40] [INFO]   |-- model provider: 'nvidia'
[17:19:40] [INFO]   |-- inference parameters:
[17:19:40] [INFO]   |  |-- generation_type=chat-completion
[17:19:40] [INFO]   |  |-- max_parallel_requests=4
[17:19:40] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:40] [INFO]   |  |-- temperature=1.00
[17:19:40] [INFO]   |  |-- top_p=1.00
[17:19:40] [INFO]   |  |-- max_tokens=2048
[17:19:40] [INFO] ⚡️ Async generation: 5 column(s) (column 'product', column 'customer_review', column 'complaint_analysis', column 'review_summary', column 'action_items'), 10 tasks across 1 row group(s)
[17:19:40] [INFO] 🚀 (1/1) Dispatching with 2 records
[17:19:40] [INFO] 🎲 (1/1) Preparing samplers to generate 2 records across 5 columns
[17:19:40] [INFO] 🧩 (1/1) Generating column `customer_age` from expression
[17:19:40] [INFO] 🧩 (1/1) Generating column `customer_name` from expression
[17:19:45] [INFO] 📊 Progress [5.3s]:
[17:19:45] [INFO]   |-- 🌕 column 'product': 2/2 (100%) 0.4 rec/s
[17:19:45] [INFO]   |-- 🚗 column 'customer_review': 1/2 (50%) 0.2 rec/s
[17:19:45] [INFO]   |-- 🥚 column 'complaint_analysis': 0/2 (0%) 0.0 rec/s
[17:19:45] [INFO]   |-- 🥚 column 'review_summary': 0/2 (0%) 0.0 rec/s
[17:19:45] [INFO]   |-- 🌧️ column 'action_items': 0/2 (0%) 0.0 rec/s
[17:19:48] [INFO] 📊 Progress [8.7s]:
[17:19:48] [INFO]   |-- 🌕 column 'product': 2/2 (100%) 0.2 rec/s
[17:19:48] [INFO]   |-- 🚀 column 'customer_review': 2/2 (100%) 0.2 rec/s
[17:19:48] [INFO]   |-- 🐔 column 'complaint_analysis': 2/2 (100%) 0.2 rec/s, 2 skipped
[17:19:48] [INFO]   |-- 🐔 column 'review_summary': 2/2 (100%) 0.2 rec/s
[17:19:48] [INFO]   |-- ☀️ column 'action_items': 2/2 (100%) 0.2 rec/s, 2 skipped
[17:19:48] [INFO] ✅ Async generation complete [8.7s]: 6 ok, 0 failed, 4 skipped across 5 column(s)
[17:19:48] [INFO] 📊 Model usage summary:
[17:19:48] [INFO]   |-- model: nvidia/nemotron-3-nano-30b-a3b
[17:19:48] [INFO]   |-- tokens: input=2052, output=1055, total=3107, tps=357
[17:19:48] [INFO]   |-- requests: success=6, failed=0, total=6, rpm=41
[17:19:48] [INFO] 🙈 Dropping columns: ['customer']
[17:19:48] [INFO] 📐 Measuring dataset column statistics:
[17:19:48] [INFO]   |-- 🎲 column: 'product_category'
[17:19:48] [INFO]   |-- 🎲 column: 'product_subcategory'
[17:19:48] [INFO]   |-- 🎲 column: 'target_age_range'
[17:19:48] [INFO]   |-- 🎲 column: 'review_style'
[17:19:48] [INFO]   |-- 🧩 column: 'customer_name'
[17:19:48] [INFO]   |-- 🧩 column: 'customer_age'
[17:19:48] [INFO]   |-- 🗂️ column: 'product'
[17:19:48] [INFO]   |-- 🗂️ column: 'customer_review'
[17:19:48] [INFO]   |-- 📝 column: 'complaint_analysis'
[17:19:48] [INFO]   |-- 📝 column: 'action_items'
[17:19:48] [INFO]   |-- 📝 column: 'review_summary'
[17:19:48] [INFO] ☀️ Preview complete!
Python
1# Run this cell multiple times to cycle through the 2 preview records.
2# Look for rows where complaint_analysis and action_items are None (skipped)
3# vs rows where they were generated (low-rated reviews).
4preview.display_sample_record()
5
Output
[index: 0]
                                                                                                              
                                              Generated Columns                                               
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                 Value                                                                                ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ product_category    │ Clothing                                                                             │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ product_subcategory │ Activewear                                                                           │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ target_age_range    │ 65+                                                                                  │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ review_style        │ rambling                                                                             │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ complaint_analysis  │ None                                                                                 │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ action_items        │ None                                                                                 │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ review_summary      │ The SereneFit Flexweave Jogger Set earns a 5‑star rating for its buttery‑soft,       │
│                     │ buttery‑soft, high‑rise joggers and matching long‑sleeve top that combine anti‑slip  │
│                     │ heel grips, a convenient back zipper, moisture‑wicking comfort, and flattering fit,  │
│                     │ making them an ideal, stylish investment for active seniors.                         │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ product             │ {                                                                                    │
│                     │     'name': 'SereneFit Flexweave Jogger Set',                                        │
│                     │     'description': 'A relaxed, full-coverage activewear set designed for seniors,    │
│                     │ featuring a soft, moisture-wicking jogger pant with an elastic, high-rise waist and  │
│                     │ a matching long-sleeve top with raglan sleeves. Made from breathable,                │
│                     │ stretch-infused fabric with anti-slip heel grips and easy-access back zipper, it     │
│                     │ offers comfort, freedom of movement, and practicality for yoga, walking, or light    │
│                     │ workouts.',                                                                          │
│                     │     'price': 69.99                                                                   │
│                     │ }                                                                                    │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ customer_review     │ {                                                                                    │
│                     │     'rating': 5,                                                                     │
│                     │     'customer_mood': 'happy',                                                        │
│                     │     'review': 'The SereneFit Flexweave Jogger Set has truly captured my heart the    │
│                     │ moment I slipped it on. From the buttery‑soft jogger pant that hugs my hips without  │
│                     │ any awkward bunching to the matching long‑sleeve top, whose raglan sleeves feel like │
│                     │ a gentle embrace for my arms, every piece radiates a calm, confident elegance that   │
│                     │ makes me feel every bit the active lady I am. I love the high‑rise, elastic waist    │
│                     │ that offers both support and a flattering silhouette; it seems to stay in place      │
│                     │ whether I’m bending for a sunrise yoga flow or simply walking the dog around my      │
│                     │ beloved neighborhood in Jasonborough. The fabric’s moisture‑wicking prowess works    │
│                     │ miracles—no more clammy discomfort after a brisk stroll, just a refreshing, dry      │
│                     │ sensation that keeps me focused on the pleasure of movement. \n\nWhat truly sets     │
│                     │ these joggers apart is the thoughtful engineering: the anti‑slip heel grips keep my  │
│                     │ feet anchored during gentle stretches, yet they release just enough when I decide to │
│                     │ sit down for a cup of tea. And the easy‑access back zipper? A tiny marvel. It means  │
│                     │ I can glide into the set without any wrestling with buttons or fiddly clasps, which  │
│                     │ is a blessing for anyone who values convenience as much as style. \n\nAt sixty‑nine  │
│                     │ dollars and ninety‑nine cents, this activewear set feels like an investment in my    │
│                     │ daily wellbeing. It’s more than just clothing—it’s a companion that respects my age  │
│                     │ while encouraging me to move with confidence, ease, and a touch of joyous rebellion  │
│                     │ against the notion that senior life must be sedentary. I’d recommend the SereneFit   │
│                     │ Flexweave Jogger Set to any fellow golden‑ager seeking comfort, practicality, and a  │
│                     │ dash of stylish flair in every workout or leisurely walk.'                           │
│                     │ }                                                                                    │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ customer_name       │ Kathryn Ferguson                                                                     │
├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────┤
│ customer_age        │ 76                                                                                   │
└─────────────────────┴──────────────────────────────────────────────────────────────────────────────────────┘
                                                                                                              
Python
1# The preview dataset is available as a pandas DataFrame.
2# Notice that complaint_analysis, action_items, and review_summary columns
3# reflect the skip behavior: None for skipped rows, generated text otherwise.
4preview.dataset
5
Output
product_category product_subcategory target_age_range review_style customer_age customer_name product customer_review complaint_analysis action_items review_summary
0 Clothing Activewear 65+ rambling 76 Kathryn Ferguson {'name': 'SereneFit Flexweave Jogger Set', 'de... {'rating': 5, 'customer_mood': 'happy', 'revie... None None The SereneFit Flexweave Jogger Set earns a 5‑s...
1 Home & Kitchen Organization 18-25 rambling 93 Julie Brown {'name': 'FlexiFit Drawer Organizer', 'descrip... {'rating': 5, 'customer_mood': 'happy', 'revie... None None The FlexiFit Drawer Organizer is a versatile, ...

📊 Analyze the generated data

  • Data Designer automatically generates a basic statistical analysis of the generated data.

  • This analysis is available via the analysis property of generation result objects.

Python
1# Print the analysis as a table.
2preview.analysis.to_report()
3
Output
──────────────────────────────────────── 🎨 Data Designer Dataset Profile ─────────────────────────────────────────

                                                                                                                   
                                                 Dataset Overview                                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ number of records                number of columns                percent complete records                    ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 2                               │ 11                              │ 100.0%                                      │
└─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────────────────┘
                                                                                                                   
                                                                                                                   
                                                🎲 Sampler Columns                                                 
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ column name                              data type                number unique values          sampler type ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ product_category                 │           string │                         2 (100.0%) │             category │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ product_subcategory              │           string │                         2 (100.0%) │          subcategory │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ target_age_range                 │           string │                         2 (100.0%) │             category │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ review_style                     │           string │                          1 (50.0%) │             category │
└──────────────────────────────────┴──────────────────┴────────────────────────────────────┴──────────────────────┘
                                                                                                                   
                                                                                                                   
                                                📝 LLM-Text Columns                                                
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                         prompt tokens     completion tokens ┃
┃ column name                 data type        number unique values          per record            per record ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ complaint_analysis      │         None │                   0 (0.0%) │     350.5 +/- 74.5 │          1.0 +/- 0.0 │
├─────────────────────────┼──────────────┼────────────────────────────┼────────────────────┼──────────────────────┤
│ action_items            │         None │                   0 (0.0%) │       22.0 +/- 0.0 │          1.0 +/- 0.0 │
├─────────────────────────┼──────────────┼────────────────────────────┼────────────────────┼──────────────────────┤
│ review_summary          │       string │                 2 (100.0%) │     322.5 +/- 74.5 │        67.5 +/- 13.4 │
└─────────────────────────┴──────────────┴────────────────────────────┴────────────────────┴──────────────────────┘
                                                                                                                   
                                                                                                                   
                                             🗂️ LLM-Structured Columns                                             
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                        prompt tokens      completion tokens ┃
┃ column name               data type        number unique values           per record             per record ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
│ product              │          dict │                 2 (100.0%) │       264.5 +/- 0.5 │         98.5 +/- 14.8 │
├──────────────────────┼───────────────┼────────────────────────────┼─────────────────────┼───────────────────────┤
│ customer_review      │          dict │                 2 (100.0%) │      353.0 +/- 10.0 │       313.5 +/- 105.4 │
└──────────────────────┴───────────────┴────────────────────────────┴─────────────────────┴───────────────────────┘
                                                                                                                   
                                                                                                                   
                                               🧩 Expression Columns                                               
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ column name                                       data type                              number unique values ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ customer_name                     │                   string │                                       2 (100.0%) │
├───────────────────────────────────┼──────────────────────────┼──────────────────────────────────────────────────┤
│ customer_age                      │                   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 create method to submit larger Data Designer generation jobs.

Python
1results = data_designer.create(config_builder, num_records=10, dataset_name="tutorial-2")
2
Output
[17:19:49] [INFO] OpenTelemetry metrics available at http://127.0.0.1:9464/metrics
[17:19:49] [INFO] 🎨 Creating Data Designer dataset
[17:19:49] [INFO]   |-- 🔒 Jinja rendering engine: secure
[17:19:49] [INFO] ✅ Validation passed
[17:19:49] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[17:19:49] [INFO] Skipping model health checks because DATA_DESIGNER_SKIP_MODEL_HEALTH_CHECKS=1
[17:19:49] [INFO] ⚡ Using async task-queue builder
[17:19:49] [INFO] 🗂️ llm-structured model config for column 'product'
[17:19:49] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:49] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:49] [INFO]   |-- model provider: 'nvidia'
[17:19:49] [INFO]   |-- inference parameters:
[17:19:49] [INFO]   |  |-- generation_type=chat-completion
[17:19:49] [INFO]   |  |-- max_parallel_requests=4
[17:19:49] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:49] [INFO]   |  |-- temperature=1.00
[17:19:49] [INFO]   |  |-- top_p=1.00
[17:19:49] [INFO]   |  |-- max_tokens=2048
[17:19:49] [INFO] 🗂️ llm-structured model config for column 'customer_review'
[17:19:49] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:49] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:49] [INFO]   |-- model provider: 'nvidia'
[17:19:49] [INFO]   |-- inference parameters:
[17:19:49] [INFO]   |  |-- generation_type=chat-completion
[17:19:49] [INFO]   |  |-- max_parallel_requests=4
[17:19:49] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:49] [INFO]   |  |-- temperature=1.00
[17:19:49] [INFO]   |  |-- top_p=1.00
[17:19:49] [INFO]   |  |-- max_tokens=2048
[17:19:49] [INFO] 📝 llm-text model config for column 'complaint_analysis'
[17:19:49] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:49] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:49] [INFO]   |-- model provider: 'nvidia'
[17:19:49] [INFO]   |-- inference parameters:
[17:19:49] [INFO]   |  |-- generation_type=chat-completion
[17:19:49] [INFO]   |  |-- max_parallel_requests=4
[17:19:49] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:49] [INFO]   |  |-- temperature=1.00
[17:19:49] [INFO]   |  |-- top_p=1.00
[17:19:49] [INFO]   |  |-- max_tokens=2048
[17:19:49] [INFO] 📝 llm-text model config for column 'review_summary'
[17:19:49] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:49] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:49] [INFO]   |-- model provider: 'nvidia'
[17:19:49] [INFO]   |-- inference parameters:
[17:19:49] [INFO]   |  |-- generation_type=chat-completion
[17:19:49] [INFO]   |  |-- max_parallel_requests=4
[17:19:49] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:49] [INFO]   |  |-- temperature=1.00
[17:19:49] [INFO]   |  |-- top_p=1.00
[17:19:49] [INFO]   |  |-- max_tokens=2048
[17:19:49] [INFO] 📝 llm-text model config for column 'action_items'
[17:19:49] [INFO]   |-- model: 'nvidia/nemotron-3-nano-30b-a3b'
[17:19:49] [INFO]   |-- model alias: 'nemotron-nano-v3'
[17:19:49] [INFO]   |-- model provider: 'nvidia'
[17:19:49] [INFO]   |-- inference parameters:
[17:19:49] [INFO]   |  |-- generation_type=chat-completion
[17:19:49] [INFO]   |  |-- max_parallel_requests=4
[17:19:49] [INFO]   |  |-- extra_body={'chat_template_kwargs': {'enable_thinking': False}}
[17:19:49] [INFO]   |  |-- temperature=1.00
[17:19:49] [INFO]   |  |-- top_p=1.00
[17:19:49] [INFO]   |  |-- max_tokens=2048
[17:19:49] [INFO] ⚡️ Async generation: 5 column(s) (column 'product', column 'customer_review', column 'complaint_analysis', column 'review_summary', column 'action_items'), 50 tasks across 1 row group(s)
[17:19:49] [INFO] 🚀 (1/1) Dispatching with 10 records
[17:19:49] [INFO] 🎲 (1/1) Preparing samplers to generate 10 records across 5 columns
[17:19:49] [INFO] 🧩 (1/1) Generating column `customer_age` from expression
[17:19:49] [INFO] 🧩 (1/1) Generating column `customer_name` from expression
[17:19:54] [INFO] 📊 Progress [5.3s]:
[17:19:54] [INFO]   |-- ⛅ column 'product': 6/10 (60%) 1.1 rec/s
[17:19:54] [INFO]   |-- 🥚 column 'customer_review': 2/10 (20%) 0.4 rec/s
[17:19:54] [INFO]   |-- 🌑 column 'complaint_analysis': 1/10 (10%) 0.2 rec/s, 1 skipped
[17:19:54] [INFO]   |-- 🚶 column 'review_summary': 1/10 (10%) 0.2 rec/s
[17:19:54] [INFO]   |-- 🥚 column 'action_items': 1/10 (10%) 0.2 rec/s, 1 skipped
[17:20:01] [INFO] 📊 Progress [12.0s]:
[17:20:01] [INFO]   |-- ☀️ column 'product': 10/10 (100%) 0.8 rec/s
[17:20:01] [INFO]   |-- 🐥 column 'customer_review': 6/10 (60%) 0.5 rec/s
[17:20:01] [INFO]   |-- 🌗 column 'complaint_analysis': 5/10 (50%) 0.4 rec/s, 5 skipped
[17:20:01] [INFO]   |-- 🚗 column 'review_summary': 5/10 (50%) 0.4 rec/s
[17:20:01] [INFO]   |-- 🐥 column 'action_items': 5/10 (50%) 0.4 rec/s, 5 skipped
[17:20:01] [WARNING] Observed retryable model-task error: kind=rate_limit, http_status=429; the row task will be deferred.
[17:20:10] [INFO] 📊 Progress [21.0s]:
[17:20:10] [INFO]   |-- ☀️ column 'product': 10/10 (100%) 0.5 rec/s
[17:20:10] [INFO]   |-- 🐔 column 'customer_review': 10/10 (100%) 0.5 rec/s
[17:20:10] [INFO]   |-- 🌖 column 'complaint_analysis': 9/10 (90%) 0.4 rec/s, 9 skipped
[17:20:10] [INFO]   |-- ✈️ column 'review_summary': 8/10 (80%) 0.4 rec/s
[17:20:10] [INFO]   |-- 🐤 column 'action_items': 9/10 (90%) 0.4 rec/s, 9 skipped
[17:20:10] [INFO] 🔄 (1/1) Salvaging 1 deferred task(s)
[17:20:11] [INFO] 🙈 Dropping columns: ['customer']
[17:20:11] [INFO] 📊 Progress [22.3s]:
[17:20:11] [INFO]   |-- ☀️ column 'product': 10/10 (100%) 0.4 rec/s
[17:20:11] [INFO]   |-- 🐔 column 'customer_review': 10/10 (100%) 0.4 rec/s
[17:20:11] [INFO]   |-- 🌕 column 'complaint_analysis': 10/10 (100%) 0.4 rec/s, 10 skipped
[17:20:11] [INFO]   |-- 🚀 column 'review_summary': 10/10 (100%) 0.4 rec/s
[17:20:11] [INFO]   |-- 🐔 column 'action_items': 10/10 (100%) 0.4 rec/s, 10 skipped
[17:20:11] [INFO] ✅ Async generation complete [22.3s]: 30 ok, 0 failed, 20 skipped across 5 column(s)
[17:20:11] [INFO] 📊 Model usage summary:
[17:20:11] [INFO]   |-- model: nvidia/nemotron-3-nano-30b-a3b
[17:20:11] [INFO]   |-- tokens: input=9282, output=3723, total=13005, tps=575
[17:20:11] [INFO]   |-- requests: success=31, failed=1, total=32, rpm=84
[17:20:11] [INFO] 📐 Measuring dataset column statistics:
[17:20:11] [INFO]   |-- 🎲 column: 'product_category'
[17:20:11] [INFO]   |-- 🎲 column: 'product_subcategory'
[17:20:11] [INFO]   |-- 🎲 column: 'target_age_range'
[17:20:11] [INFO]   |-- 🎲 column: 'review_style'
[17:20:11] [INFO]   |-- 🧩 column: 'customer_name'
[17:20:11] [INFO]   |-- 🧩 column: 'customer_age'
[17:20:11] [INFO]   |-- 🗂️ column: 'product'
[17:20:11] [INFO]   |-- 🗂️ column: 'customer_review'
[17:20:11] [INFO]   |-- 📝 column: 'complaint_analysis'
[17:20:11] [INFO]   |-- 📝 column: 'action_items'
[17:20:11] [INFO]   |-- 📝 column: 'review_summary'
Python
1# Load the generated dataset as a pandas DataFrame.
2dataset = results.load_dataset()
3
4dataset.head()
5
Output
product_category product_subcategory target_age_range review_style customer_age customer_name product customer_review complaint_analysis action_items review_summary
0 Clothing Women's Clothing 65+ detailed 97 Janet Gamble {'name': 'Elegant Wool Blend Cardigan', 'descr... {'rating': 5, 'customer_mood': 'happy', 'revie... None None This 5-star review praises the Elegant Wool Bl...
1 Home Office Office Supplies 65+ brief 32 Elizabeth Braun {'name': 'Ergonomic Cushion‑Top Reacher', 'des... {'rating': 5, 'customer_mood': 'happy', 'revie... None None A highly recommended, lightweight ergonomic re...
2 Home & Kitchen Furniture 25-35 detailed 82 Anne Moore {'name': 'Minimalist Scandinavian Wooden Side ... {'rating': 5, 'customer_mood': 'happy', 'revie... None None The reviewer praises the Minimalist Scandinavi...
3 Clothing Men's Clothing 18-25 rambling 95 Cheryl Kline {'name': 'EcoFlex Tee', 'description': 'Soft, ... {'rating': 4, 'customer_mood': 'happy', 'revie... None None The EcoFlex Tee impresses with its buttery-sof...
4 Clothing Activewear 25-35 brief 21 Nicholas Wagner {'name': 'VitalFlex High-Waisted Performance L... {'rating': 4, 'customer_mood': 'happy', 'revie... None None VitalFlex High‑Waisted Performance Leggings ea...
Python
1# Load the analysis results into memory.
2analysis = results.load_analysis()
3
4analysis.to_report()
5
Output
──────────────────────────────────────── 🎨 Data Designer Dataset Profile ─────────────────────────────────────────

                                                                                                                   
                                                 Dataset Overview                                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ number of records                number of columns                percent complete records                    ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 10                              │ 11                              │ 100.0%                                      │
└─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────────────────┘
                                                                                                                   
                                                                                                                   
                                                🎲 Sampler Columns                                                 
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ column name                              data type                number unique values          sampler type ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ product_category                 │           string │                          3 (30.0%) │             category │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ product_subcategory              │           string │                          8 (80.0%) │          subcategory │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ target_age_range                 │           string │                          4 (40.0%) │             category │
├──────────────────────────────────┼──────────────────┼────────────────────────────────────┼──────────────────────┤
│ review_style                     │           string │                          3 (30.0%) │             category │
└──────────────────────────────────┴──────────────────┴────────────────────────────────────┴──────────────────────┘
                                                                                                                   
                                                                                                                   
                                                📝 LLM-Text Columns                                                
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                         prompt tokens     completion tokens ┃
┃ column name                 data type       number unique values           per record            per record ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ complaint_analysis      │         None │                  0 (0.0%) │     232.5 +/- 105.2 │          1.0 +/- 0.0 │
├─────────────────────────┼──────────────┼───────────────────────────┼─────────────────────┼──────────────────────┤
│ action_items            │         None │                  0 (0.0%) │        22.0 +/- 0.0 │          1.0 +/- 0.0 │
├─────────────────────────┼──────────────┼───────────────────────────┼─────────────────────┼──────────────────────┤
│ review_summary          │       string │               10 (100.0%) │     203.0 +/- 105.1 │        50.0 +/- 10.7 │
└─────────────────────────┴──────────────┴───────────────────────────┴─────────────────────┴──────────────────────┘
                                                                                                                   
                                                                                                                   
                                             🗂️ LLM-Structured Columns                                             
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                        prompt tokens      completion tokens ┃
┃ column name               data type        number unique values           per record             per record ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
│ product              │          dict │                10 (100.0%) │       265.5 +/- 0.9 │         86.0 +/- 18.1 │
├──────────────────────┼───────────────┼────────────────────────────┼─────────────────────┼───────────────────────┤
│ customer_review      │          dict │                10 (100.0%) │      341.0 +/- 17.3 │       194.0 +/- 114.1 │
└──────────────────────┴───────────────┴────────────────────────────┴─────────────────────┴───────────────────────┘
                                                                                                                   
                                                                                                                   
                                               🧩 Expression Columns                                               
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ column name                                       data type                              number unique values ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ customer_name                     │                   string │                                      10 (100.0%) │
├───────────────────────────────────┼──────────────────────────┼──────────────────────────────────────────────────┤
│ customer_age                      │                   string │                                        9 (90.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: