{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# đ¨ Data Designer 101: Structured Outputs and Jinja Expressions\n",
"\n",
"[Click here](https://raw.githubusercontent.com/NVIDIA-NeMo/DataDesigner/refs/heads/main/docs/notebooks/2-structured-outputs-and-jinja-expressions.ipynb) to download this notebook to your computer.\n",
"#### đ What you'll learn\n",
"\n",
"In this notebook, we will continue our exploration of Data Designer, demonstrating more advanced data generation using structured outputs and Jinja expressions.\n",
"\n",
"If this is your first time using Data Designer, we recommend starting with the [first notebook](/notebooks/1-the-basics/) in this 101 series."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đĻ Import the essentials\n",
"\n",
"- The `essentials` module provides quick access to the most commonly used objects.\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from data_designer.essentials import (\n",
" CategorySamplerParams,\n",
" DataDesigner,\n",
" DataDesignerConfigBuilder,\n",
" ExpressionColumnConfig,\n",
" InferenceParameters,\n",
" LLMStructuredColumnConfig,\n",
" ModelConfig,\n",
" PersonFromFakerSamplerParams,\n",
" SamplerColumnConfig,\n",
" SamplerType,\n",
" SubcategorySamplerParams,\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### âī¸ Initialize the Data Designer interface\n",
"\n",
"- `DataDesigner` is the main object that is used to interface with the library.\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[16:29:58] [INFO] âģī¸ Using default model providers from '/Users/amanoel/.data-designer/model_providers.yaml'\n"
]
}
],
"source": [
"data_designer_client = DataDesigner()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đī¸ Define model configurations\n",
"\n",
"- Each `ModelConfig` defines a model that can be used during the generation process.\n",
"\n",
"- The \"model alias\" is used to reference the model in the Data Designer config (as we will see below).\n",
"\n",
"- The \"model provider\" is the external service that hosts the model (see the [model config](/models/default-model-settings.md) docs for more details).\n",
"\n",
"- By default, we use [build.nvidia.com](https://build.nvidia.com/models) as the model provider.\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# This name is set in the model provider configuration.\n",
"MODEL_PROVIDER = \"nvidia\"\n",
"\n",
"# The model ID is from build.nvidia.com.\n",
"MODEL_ID = \"nvidia/nvidia-nemotron-nano-9b-v2\"\n",
"\n",
"# We choose this alias to be descriptive for our use case.\n",
"MODEL_ALIAS = \"nemotron-nano-v2\"\n",
"\n",
"# This sets reasoning to False for the nemotron-nano-v2 model.\n",
"SYSTEM_PROMPT = \"/no_think\"\n",
"\n",
"model_configs = [\n",
" ModelConfig(\n",
" alias=MODEL_ALIAS,\n",
" model=MODEL_ID,\n",
" provider=MODEL_PROVIDER,\n",
" inference_parameters=InferenceParameters(\n",
" temperature=0.5,\n",
" top_p=1.0,\n",
" max_tokens=1024,\n",
" ),\n",
" )\n",
"]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đī¸ Initialize the Data Designer Config Builder\n",
"\n",
"- The Data Designer config defines the dataset schema and generation process.\n",
"\n",
"- The config builder provides an intuitive interface for building this configuration.\n",
"\n",
"- The list of model configs is provided to the builder at initialization.\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"config_builder = DataDesignerConfigBuilder(model_configs=model_configs)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đ§âđ¨ Designing our data\n",
"\n",
"- We will again create a product review dataset, but this time we will use structured outputs and Jinja expressions.\n",
"\n",
"- Structured outputs let you specify the exact schema of the data you want to generate.\n",
"\n",
"- Data Designer supports schemas specified using either json schema or Pydantic data models (recommended).\n",
"\n",
"
\n",
"\n",
"We'll define our structured outputs using [Pydantic](https://docs.pydantic.dev/latest/) data models\n",
"\n",
"> đĄ **Why Pydantic?**\n",
">\n",
"> - Pydantic models provide better IDE support and type validation.\n",
">\n",
"> - They are more Pythonic than raw JSON schemas.\n",
">\n",
"> - They integrate seamlessly with Data Designer's structured output system.\n"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"from decimal import Decimal\n",
"from typing import Literal\n",
"\n",
"from pydantic import BaseModel, Field\n",
"\n",
"\n",
"# We define a Product schema so that the name, description, and price are generated\n",
"# in one go, with the types and constraints specified.\n",
"class Product(BaseModel):\n",
" name: str = Field(description=\"The name of the product\")\n",
" description: str = Field(description=\"A description of the product\")\n",
" price: Decimal = Field(description=\"The price of the product\", ge=10, le=1000, decimal_places=2)\n",
"\n",
"\n",
"class ProductReview(BaseModel):\n",
" rating: int = Field(description=\"The rating of the product\", ge=1, le=5)\n",
" customer_mood: Literal[\"irritated\", \"mad\", \"happy\", \"neutral\", \"excited\"] = Field(\n",
" description=\"The mood of the customer\"\n",
" )\n",
" review: str = Field(description=\"A review of the product\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, let's design our product review dataset using a few more tricks compared to the previous notebook."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[16:29:58] [INFO] â
Validation passed\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"
DataDesignerConfigBuilder(\n",
" sampler_columns: [\n",
" "customer",\n",
" "product_category",\n",
" "product_subcategory",\n",
" "target_age_range",\n",
" "review_style"\n",
" ]\n",
")\n",
" \n",
"\n"
],
"text/plain": [
"DataDesignerConfigBuilder(\n",
" sampler_columns: [\n",
" \"customer\",\n",
" \"product_category\",\n",
" \"product_subcategory\",\n",
" \"target_age_range\",\n",
" \"review_style\"\n",
" ]\n",
")"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Since we often only want a few attributes from Person objects, we can\n",
"# set drop=True in the column config to drop the column from the final dataset.\n",
"config_builder.add_column(\n",
" SamplerColumnConfig(\n",
" name=\"customer\",\n",
" sampler_type=SamplerType.PERSON_FROM_FAKER,\n",
" params=PersonFromFakerSamplerParams(),\n",
" drop=True,\n",
" )\n",
")\n",
"\n",
"config_builder.add_column(\n",
" SamplerColumnConfig(\n",
" name=\"product_category\",\n",
" sampler_type=SamplerType.CATEGORY,\n",
" params=CategorySamplerParams(\n",
" values=[\n",
" \"Electronics\",\n",
" \"Clothing\",\n",
" \"Home & Kitchen\",\n",
" \"Books\",\n",
" \"Home Office\",\n",
" ],\n",
" ),\n",
" )\n",
")\n",
"\n",
"config_builder.add_column(\n",
" SamplerColumnConfig(\n",
" name=\"product_subcategory\",\n",
" sampler_type=SamplerType.SUBCATEGORY,\n",
" params=SubcategorySamplerParams(\n",
" category=\"product_category\",\n",
" values={\n",
" \"Electronics\": [\n",
" \"Smartphones\",\n",
" \"Laptops\",\n",
" \"Headphones\",\n",
" \"Cameras\",\n",
" \"Accessories\",\n",
" ],\n",
" \"Clothing\": [\n",
" \"Men's Clothing\",\n",
" \"Women's Clothing\",\n",
" \"Winter Coats\",\n",
" \"Activewear\",\n",
" \"Accessories\",\n",
" ],\n",
" \"Home & Kitchen\": [\n",
" \"Appliances\",\n",
" \"Cookware\",\n",
" \"Furniture\",\n",
" \"Decor\",\n",
" \"Organization\",\n",
" ],\n",
" \"Books\": [\n",
" \"Fiction\",\n",
" \"Non-Fiction\",\n",
" \"Self-Help\",\n",
" \"Textbooks\",\n",
" \"Classics\",\n",
" ],\n",
" \"Home Office\": [\n",
" \"Desks\",\n",
" \"Chairs\",\n",
" \"Storage\",\n",
" \"Office Supplies\",\n",
" \"Lighting\",\n",
" ],\n",
" },\n",
" ),\n",
" )\n",
")\n",
"\n",
"config_builder.add_column(\n",
" SamplerColumnConfig(\n",
" name=\"target_age_range\",\n",
" sampler_type=SamplerType.CATEGORY,\n",
" params=CategorySamplerParams(values=[\"18-25\", \"25-35\", \"35-50\", \"50-65\", \"65+\"]),\n",
" )\n",
")\n",
"\n",
"# Sampler columns support conditional params, which are used if the condition is met.\n",
"# In this example, we set the review style to rambling if the target age range is 18-25.\n",
"# Note conditional parameters are only supported for Sampler column types.\n",
"config_builder.add_column(\n",
" SamplerColumnConfig(\n",
" name=\"review_style\",\n",
" sampler_type=SamplerType.CATEGORY,\n",
" params=CategorySamplerParams(\n",
" values=[\"rambling\", \"brief\", \"detailed\", \"structured with bullet points\"],\n",
" weights=[1, 2, 2, 1],\n",
" ),\n",
" conditional_params={\n",
" \"target_age_range == '18-25'\": CategorySamplerParams(values=[\"rambling\"]),\n",
" },\n",
" )\n",
")\n",
"\n",
"# Optionally validate that the columns are configured correctly.\n",
"config_builder.validate()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, we will use more advanced Jinja expressions to create new columns.\n",
"\n",
"Jinja expressions let you:\n",
"\n",
"- Access nested attributes: `{{ customer.first_name }}`\n",
"\n",
"- Combine values: `{{ customer.first_name }} {{ customer.last_name }}`\n",
"\n",
"- Use conditional logic: `{% if condition %}...{% endif %}`\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[16:29:58] [INFO] â
Validation passed\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"DataDesignerConfigBuilder(\n",
" sampler_columns: [\n",
" "customer",\n",
" "product_category",\n",
" "product_subcategory",\n",
" "target_age_range",\n",
" "review_style"\n",
" ]\n",
" llm_structured_columns: ['product', 'customer_review']\n",
" expression_columns: ['customer_name', 'customer_age']\n",
")\n",
" \n",
"\n"
],
"text/plain": [
"DataDesignerConfigBuilder(\n",
" sampler_columns: [\n",
" \"customer\",\n",
" \"product_category\",\n",
" \"product_subcategory\",\n",
" \"target_age_range\",\n",
" \"review_style\"\n",
" ]\n",
" llm_structured_columns: ['product', 'customer_review']\n",
" expression_columns: ['customer_name', 'customer_age']\n",
")"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# We can create new columns using Jinja expressions that reference\n",
"# existing columns, including attributes of nested objects.\n",
"config_builder.add_column(\n",
" ExpressionColumnConfig(name=\"customer_name\", expr=\"{{ customer.first_name }} {{ customer.last_name }}\")\n",
")\n",
"\n",
"config_builder.add_column(ExpressionColumnConfig(name=\"customer_age\", expr=\"{{ customer.age }}\"))\n",
"\n",
"config_builder.add_column(\n",
" LLMStructuredColumnConfig(\n",
" name=\"product\",\n",
" prompt=(\n",
" \"Create a product in the '{{ product_category }}' category, focusing on products \"\n",
" \"related to '{{ product_subcategory }}'. The target age range of the ideal customer is \"\n",
" \"{{ target_age_range }} years old. The product should be priced between $10 and $1000.\"\n",
" ),\n",
" system_prompt=SYSTEM_PROMPT,\n",
" output_format=Product,\n",
" model_alias=MODEL_ALIAS,\n",
" )\n",
")\n",
"\n",
"# We can even use if/else logic in our Jinja expressions to create more complex prompt patterns.\n",
"config_builder.add_column(\n",
" LLMStructuredColumnConfig(\n",
" name=\"customer_review\",\n",
" prompt=(\n",
" \"Your task is to write a review for the following product:\\n\\n\"\n",
" \"Product Name: {{ product.name }}\\n\"\n",
" \"Product Description: {{ product.description }}\\n\"\n",
" \"Price: {{ product.price }}\\n\\n\"\n",
" \"Imagine your name is {{ customer_name }} and you are from {{ customer.city }}, {{ customer.state }}. \"\n",
" \"Write the review in a style that is '{{ review_style }}'.\"\n",
" \"{% if target_age_range == '18-25' %}\"\n",
" \"Make sure the review is more informal and conversational.\"\n",
" \"{% else %}\"\n",
" \"Make sure the review is more formal and structured.\"\n",
" \"{% endif %}\"\n",
" ),\n",
" system_prompt=SYSTEM_PROMPT,\n",
" output_format=ProductReview,\n",
" model_alias=MODEL_ALIAS,\n",
" )\n",
")\n",
"\n",
"config_builder.validate()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đ Iteration is key â preview the dataset!\n",
"\n",
"1. Use the `preview` method to generate a sample of records quickly.\n",
"\n",
"2. Inspect the results for quality and format issues.\n",
"\n",
"3. Adjust column configurations, prompts, or parameters as needed.\n",
"\n",
"4. Re-run the preview until satisfied.\n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[16:29:58] [INFO] đ§ Preview generation in progress\n",
"[16:29:58] [INFO] â
Validation passed\n",
"[16:29:58] [INFO] âī¸ Sorting column configs into a Directed Acyclic Graph\n",
"[16:29:58] [INFO] đŠē Running health checks for models...\n",
"[16:29:58] [INFO] |-- đ Checking 'nvidia/nvidia-nemotron-nano-9b-v2' in provider named 'nvidia' for model alias 'nemotron-nano-v2'...\n",
"[16:30:00] [INFO] |-- â
Passed!\n",
"[16:30:00] [INFO] đ˛ Preparing samplers to generate 10 records across 5 columns\n",
"[16:30:00] [INFO] đ§Š Generating column `customer_name` from expression\n",
"[16:30:00] [INFO] đ§Š Generating column `customer_age` from expression\n",
"[16:30:00] [INFO] đī¸ Preparing llm-structured column generation\n",
"[16:30:00] [INFO] |-- column name: 'product'\n",
"[16:30:00] [INFO] |-- model config:\n",
"{\n",
" \"alias\": \"nemotron-nano-v2\",\n",
" \"model\": \"nvidia/nvidia-nemotron-nano-9b-v2\",\n",
" \"inference_parameters\": {\n",
" \"temperature\": 0.5,\n",
" \"top_p\": 1.0,\n",
" \"max_tokens\": 1024,\n",
" \"max_parallel_requests\": 4,\n",
" \"timeout\": null,\n",
" \"extra_body\": null\n",
" },\n",
" \"provider\": \"nvidia\"\n",
"}\n",
"[16:30:00] [INFO] đ Processing llm-structured column 'product' with 4 concurrent workers\n",
"[16:30:05] [INFO] đī¸ Preparing llm-structured column generation\n",
"[16:30:05] [INFO] |-- column name: 'customer_review'\n",
"[16:30:05] [INFO] |-- model config:\n",
"{\n",
" \"alias\": \"nemotron-nano-v2\",\n",
" \"model\": \"nvidia/nvidia-nemotron-nano-9b-v2\",\n",
" \"inference_parameters\": {\n",
" \"temperature\": 0.5,\n",
" \"top_p\": 1.0,\n",
" \"max_tokens\": 1024,\n",
" \"max_parallel_requests\": 4,\n",
" \"timeout\": null,\n",
" \"extra_body\": null\n",
" },\n",
" \"provider\": \"nvidia\"\n",
"}\n",
"[16:30:05] [INFO] đ Processing llm-structured column 'customer_review' with 4 concurrent workers\n",
"[16:30:13] [INFO] đ Model usage summary:\n",
"{\n",
" \"nvidia/nvidia-nemotron-nano-9b-v2\": {\n",
" \"token_usage\": {\n",
" \"prompt_tokens\": 6304,\n",
" \"completion_tokens\": 3167,\n",
" \"total_tokens\": 9471\n",
" },\n",
" \"request_usage\": {\n",
" \"successful_requests\": 20,\n",
" \"failed_requests\": 0,\n",
" \"total_requests\": 20\n",
" },\n",
" \"tokens_per_second\": 724,\n",
" \"requests_per_minute\": 91\n",
" }\n",
"}\n",
"[16:30:13] [INFO] đ Measuring dataset column statistics:\n",
"[16:30:13] [INFO] |-- đ˛ column: 'customer'\n",
"[16:30:13] [INFO] |-- đ˛ column: 'product_category'\n",
"[16:30:13] [INFO] |-- đ˛ column: 'product_subcategory'\n",
"[16:30:13] [INFO] |-- đ˛ column: 'target_age_range'\n",
"[16:30:13] [INFO] |-- đ˛ column: 'review_style'\n",
"[16:30:13] [INFO] |-- đ§Š column: 'customer_name'\n",
"[16:30:13] [INFO] |-- đ§Š column: 'customer_age'\n",
"[16:30:13] [INFO] |-- đī¸ column: 'product'\n",
"[16:30:13] [INFO] |-- đī¸ column: 'customer_review'\n",
"[16:30:13] [INFO] â
Preview complete!\n"
]
}
],
"source": [
"preview = data_designer_client.preview(config_builder)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" Generated Columns \n",
"âââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â Name â Value â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â { â\n",
"â â 'uuid': '02a9fa30-045c-4443-9223-d314546ce65b', â\n",
"â â 'locale': 'en_US', â\n",
"â â 'first_name': 'Steven', â\n",
"â â 'last_name': 'Caldwell', â\n",
"â â 'middle_name': None, â\n",
"â â 'sex': 'Male', â\n",
"â â 'street_number': '9869', â\n",
"â â 'street_name': 'Reynolds Alley', â\n",
"â â 'city': 'West Nicholas', â\n",
"â â 'state': 'Arizona', â\n",
"â â 'postcode': '05872', â\n",
"â â 'age': 71, â\n",
"â â 'birth_date': '1954-01-09', â\n",
"â â 'country': 'Saint Vincent and the Grenadines', â\n",
"â â 'marital_status': 'separated', â\n",
"â â 'education_level': 'some_college', â\n",
"â â 'unit': '', â\n",
"â â 'occupation': 'Programmer, systems', â\n",
"â â 'phone_number': '001-301-970-1903x043', â\n",
"â â 'bachelors_field': 'no_degree' â\n",
"â â } â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product_category â Home Office â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â Storage â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â target_age_range â 35-50 â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â review_style â brief â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_name â Steven Caldwell â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â 71 â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product â { â\n",
"â â 'name': 'Ergonomic Under-Desk Storage Cabinet', â\n",
"â â 'description': 'A sleek and durable storage cabinet designed to fit under desks in a â\n",
"â â home office setup. It features adjustable shelves, a modern design to match various â\n",
"â â decors, and provides ample space for organizing office supplies, documents, and â\n",
"â â electronics. Ideal for professionals aged 35-50 looking to maximize space efficiency.', â\n",
"â â 'price': 149.99 â\n",
"â â } â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_review â { â\n",
"â â 'rating': 5, â\n",
"â â 'customer_mood': 'happy', â\n",
"â â 'review': 'The Ergonomic Under-Desk Storage Cabinet is a well-designed, durable â\n",
"â â solution for optimizing space in a home office. Its adjustable shelves and modern â\n",
"â â aesthetics make it both functional and visually appealing, particularly suited for â\n",
"â â professionals seeking efficiency.' â\n",
"â â } â\n",
"âââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" [index: 0] \n",
"\n"
],
"text/plain": [
" \n",
"\u001b[3m Generated Columns \u001b[0m\n",
"âââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â\u001b[1m \u001b[0m\u001b[1mName \u001b[0m\u001b[1m \u001b[0mâ\u001b[1m \u001b[0m\u001b[1mValue \u001b[0m\u001b[1m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â \u001b[1m{\u001b[0m â\n",
"â â \u001b[32m'uuid'\u001b[0m: \u001b[32m'02a9fa30-045c-4443-9223-d314546ce65b'\u001b[0m, â\n",
"â â \u001b[32m'locale'\u001b[0m: \u001b[32m'en_US'\u001b[0m, â\n",
"â â \u001b[32m'first_name'\u001b[0m: \u001b[32m'Steven'\u001b[0m, â\n",
"â â \u001b[32m'last_name'\u001b[0m: \u001b[32m'Caldwell'\u001b[0m, â\n",
"â â \u001b[32m'middle_name'\u001b[0m: \u001b[3;35mNone\u001b[0m, â\n",
"â â \u001b[32m'sex'\u001b[0m: \u001b[32m'Male'\u001b[0m, â\n",
"â â \u001b[32m'street_number'\u001b[0m: \u001b[32m'9869'\u001b[0m, â\n",
"â â \u001b[32m'street_name'\u001b[0m: \u001b[32m'Reynolds Alley'\u001b[0m, â\n",
"â â \u001b[32m'city'\u001b[0m: \u001b[32m'West Nicholas'\u001b[0m, â\n",
"â â \u001b[32m'state'\u001b[0m: \u001b[32m'Arizona'\u001b[0m, â\n",
"â â \u001b[32m'postcode'\u001b[0m: \u001b[32m'05872'\u001b[0m, â\n",
"â â \u001b[32m'age'\u001b[0m: \u001b[1;36m71\u001b[0m, â\n",
"â â \u001b[32m'birth_date'\u001b[0m: \u001b[32m'1954-01-09'\u001b[0m, â\n",
"â â \u001b[32m'country'\u001b[0m: \u001b[32m'Saint Vincent and the Grenadines'\u001b[0m, â\n",
"â â \u001b[32m'marital_status'\u001b[0m: \u001b[32m'separated'\u001b[0m, â\n",
"â â \u001b[32m'education_level'\u001b[0m: \u001b[32m'some_college'\u001b[0m, â\n",
"â â \u001b[32m'unit'\u001b[0m: \u001b[32m''\u001b[0m, â\n",
"â â \u001b[32m'occupation'\u001b[0m: \u001b[32m'Programmer, systems'\u001b[0m, â\n",
"â â \u001b[32m'phone_number'\u001b[0m: \u001b[32m'001-301-970-1903x043'\u001b[0m, â\n",
"â â \u001b[32m'bachelors_field'\u001b[0m: \u001b[32m'no_degree'\u001b[0m â\n",
"â â \u001b[1m}\u001b[0m â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product_category â Home Office â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â Storage â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â target_age_range â 35-50 â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â review_style â brief â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_name â Steven Caldwell â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â \u001b[1;36m71\u001b[0m â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â product â \u001b[1m{\u001b[0m â\n",
"â â \u001b[32m'name'\u001b[0m: \u001b[32m'Ergonomic Under-Desk Storage Cabinet'\u001b[0m, â\n",
"â â \u001b[32m'description'\u001b[0m: \u001b[32m'A sleek and durable storage cabinet designed to fit under desks in a \u001b[0m â\n",
"â â \u001b[32mhome office setup. It features adjustable shelves, a modern design to match various \u001b[0m â\n",
"â â \u001b[32mdecors, and provides ample space for organizing office supplies, documents, and \u001b[0m â\n",
"â â \u001b[32melectronics. Ideal for professionals aged 35-50 looking to maximize space efficiency.'\u001b[0m, â\n",
"â â \u001b[32m'price'\u001b[0m: \u001b[1;36m149.99\u001b[0m â\n",
"â â \u001b[1m}\u001b[0m â\n",
"âââââââââââââââââââââââŧââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_review â \u001b[1m{\u001b[0m â\n",
"â â \u001b[32m'rating'\u001b[0m: \u001b[1;36m5\u001b[0m, â\n",
"â â \u001b[32m'customer_mood'\u001b[0m: \u001b[32m'happy'\u001b[0m, â\n",
"â â \u001b[32m'review'\u001b[0m: \u001b[32m'The Ergonomic Under-Desk Storage Cabinet is a well-designed, durable \u001b[0m â\n",
"â â \u001b[32msolution for optimizing space in a home office. Its adjustable shelves and modern \u001b[0m â\n",
"â â \u001b[32maesthetics make it both functional and visually appealing, particularly suited for \u001b[0m â\n",
"â â \u001b[32mprofessionals seeking efficiency.'\u001b[0m â\n",
"â â \u001b[1m}\u001b[0m â\n",
"âââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" [index: 0] \n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Run this cell multiple times to cycle through the 10 preview records.\n",
"preview.display_sample_record()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" customer | \n",
" product_category | \n",
" product_subcategory | \n",
" target_age_range | \n",
" review_style | \n",
" customer_name | \n",
" customer_age | \n",
" product | \n",
" customer_review | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" {'uuid': '02a9fa30-045c-4443-9223-d314546ce65b... | \n",
" Home Office | \n",
" Storage | \n",
" 35-50 | \n",
" brief | \n",
" Steven Caldwell | \n",
" 71 | \n",
" {'name': 'Ergonomic Under-Desk Storage Cabinet... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 1 | \n",
" {'uuid': 'c2631f8f-5d17-4a41-b9f1-36297b9b9e8a... | \n",
" Home Office | \n",
" Storage | \n",
" 50-65 | \n",
" detailed | \n",
" Robert May | \n",
" 61 | \n",
" {'name': 'Ergonomic Wall-Mounted File Cabinet'... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 2 | \n",
" {'uuid': '5fb4e814-4186-4d55-a6ca-edef9c3df344... | \n",
" Electronics | \n",
" Cameras | \n",
" 50-65 | \n",
" structured with bullet points | \n",
" Jennifer Morse | \n",
" 21 | \n",
" {'name': 'RetroView Digital Camera', 'descript... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 3 | \n",
" {'uuid': '194eb1db-006e-45e8-ad48-48f9b4bf22ed... | \n",
" Electronics | \n",
" Headphones | \n",
" 65+ | \n",
" structured with bullet points | \n",
" David Mays | \n",
" 24 | \n",
" {'name': 'EarComfort Wireless Headphones', 'de... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 4 | \n",
" {'uuid': '727adea0-9197-46e2-a3ea-8b17585e9b6c... | \n",
" Home Office | \n",
" Lighting | \n",
" 50-65 | \n",
" rambling | \n",
" Kerri Diaz | \n",
" 102 | \n",
" {'name': 'Adjustable LED Desk Lamp', 'descript... | \n",
" {'rating': 4, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 5 | \n",
" {'uuid': '5fc887bf-fdda-4698-8251-be51f9402a4a... | \n",
" Clothing | \n",
" Women's Clothing | \n",
" 35-50 | \n",
" structured with bullet points | \n",
" Danielle Romero | \n",
" 21 | \n",
" {'name': 'Elegant Floral Maxi Dress', 'descrip... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 6 | \n",
" {'uuid': '74c81e95-b43f-487d-b31e-7cf429fffbeb... | \n",
" Electronics | \n",
" Headphones | \n",
" 35-50 | \n",
" brief | \n",
" Ryan Martinez | \n",
" 48 | \n",
" {'name': 'Premium Noise-Cancelling Over-Ear He... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 7 | \n",
" {'uuid': '8bc6fdf7-1ba7-49cb-b06b-2d1e0f994a7e... | \n",
" Home & Kitchen | \n",
" Decor | \n",
" 50-65 | \n",
" rambling | \n",
" Mary Weiss | \n",
" 59 | \n",
" {'name': 'Timeless Heritage Wall Art Set', 'de... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 8 | \n",
" {'uuid': '94b5f377-8593-40af-81d2-cd5542b6ff33... | \n",
" Home & Kitchen | \n",
" Decor | \n",
" 35-50 | \n",
" detailed | \n",
" Norma Meadows | \n",
" 90 | \n",
" {'name': 'Modern Geometric Wall Art Set', 'des... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
" | 9 | \n",
" {'uuid': '78b40c52-9f46-4486-a19a-bb9eca51f87d... | \n",
" Home & Kitchen | \n",
" Furniture | \n",
" 50-65 | \n",
" detailed | \n",
" Brian Miller | \n",
" 29 | \n",
" {'name': 'Ergonomic Memory Foam Reading Chair'... | \n",
" {'rating': 5, 'customer_mood': 'happy', 'revie... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" customer product_category \\\n",
"0 {'uuid': '02a9fa30-045c-4443-9223-d314546ce65b... Home Office \n",
"1 {'uuid': 'c2631f8f-5d17-4a41-b9f1-36297b9b9e8a... Home Office \n",
"2 {'uuid': '5fb4e814-4186-4d55-a6ca-edef9c3df344... Electronics \n",
"3 {'uuid': '194eb1db-006e-45e8-ad48-48f9b4bf22ed... Electronics \n",
"4 {'uuid': '727adea0-9197-46e2-a3ea-8b17585e9b6c... Home Office \n",
"5 {'uuid': '5fc887bf-fdda-4698-8251-be51f9402a4a... Clothing \n",
"6 {'uuid': '74c81e95-b43f-487d-b31e-7cf429fffbeb... Electronics \n",
"7 {'uuid': '8bc6fdf7-1ba7-49cb-b06b-2d1e0f994a7e... Home & Kitchen \n",
"8 {'uuid': '94b5f377-8593-40af-81d2-cd5542b6ff33... Home & Kitchen \n",
"9 {'uuid': '78b40c52-9f46-4486-a19a-bb9eca51f87d... Home & Kitchen \n",
"\n",
" product_subcategory target_age_range review_style \\\n",
"0 Storage 35-50 brief \n",
"1 Storage 50-65 detailed \n",
"2 Cameras 50-65 structured with bullet points \n",
"3 Headphones 65+ structured with bullet points \n",
"4 Lighting 50-65 rambling \n",
"5 Women's Clothing 35-50 structured with bullet points \n",
"6 Headphones 35-50 brief \n",
"7 Decor 50-65 rambling \n",
"8 Decor 35-50 detailed \n",
"9 Furniture 50-65 detailed \n",
"\n",
" customer_name customer_age \\\n",
"0 Steven Caldwell 71 \n",
"1 Robert May 61 \n",
"2 Jennifer Morse 21 \n",
"3 David Mays 24 \n",
"4 Kerri Diaz 102 \n",
"5 Danielle Romero 21 \n",
"6 Ryan Martinez 48 \n",
"7 Mary Weiss 59 \n",
"8 Norma Meadows 90 \n",
"9 Brian Miller 29 \n",
"\n",
" product \\\n",
"0 {'name': 'Ergonomic Under-Desk Storage Cabinet... \n",
"1 {'name': 'Ergonomic Wall-Mounted File Cabinet'... \n",
"2 {'name': 'RetroView Digital Camera', 'descript... \n",
"3 {'name': 'EarComfort Wireless Headphones', 'de... \n",
"4 {'name': 'Adjustable LED Desk Lamp', 'descript... \n",
"5 {'name': 'Elegant Floral Maxi Dress', 'descrip... \n",
"6 {'name': 'Premium Noise-Cancelling Over-Ear He... \n",
"7 {'name': 'Timeless Heritage Wall Art Set', 'de... \n",
"8 {'name': 'Modern Geometric Wall Art Set', 'des... \n",
"9 {'name': 'Ergonomic Memory Foam Reading Chair'... \n",
"\n",
" customer_review \n",
"0 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"1 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"2 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"3 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"4 {'rating': 4, 'customer_mood': 'happy', 'revie... \n",
"5 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"6 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"7 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"8 {'rating': 5, 'customer_mood': 'happy', 'revie... \n",
"9 {'rating': 5, 'customer_mood': 'happy', 'revie... "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# The preview dataset is available as a pandas DataFrame.\n",
"preview.dataset"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đ Analyze the generated data\n",
"\n",
"- Data Designer automatically generates a basic statistical analysis of the generated data.\n",
"\n",
"- This analysis is available via the `analysis` property of generation result objects.\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"ââââââââââââââââââââââââââââââââââââââââ đ¨ Data Designer Dataset Profile âââââââââââââââââââââââââââââââââââââââââ\n",
"\n",
" \n",
" Dataset Overview \n",
"âââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â number of records â number of columns â percent complete records â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â 10 â 9 â 100.0% â\n",
"âââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
" đ˛ Sampler Columns \n",
"ââââââââââââââââââââââââââââââââââŗââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââ\n",
"â column name â data type â number unique values â sampler type â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â dict â 10 (100.0%) â person_from_faker â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_category â string â 4 (40.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â string â 7 (70.0%) â subcategory â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â target_age_range â string â 3 (30.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â review_style â string â 4 (40.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââ\n",
" \n",
" \n",
" đī¸ LLM-Structured Columns \n",
"âââââââââââââââââââââââââŗââââââââââââââââŗâââââââââââââââââââââââââââââŗââââââââââââââââââââŗâââââââââââââââââââââââââ\n",
"â â â â prompt tokens â completion tokens â\n",
"â column name â data type â number unique values â per record â per record â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â product â dict â 10 (100.0%) â 268.0 +/- 0.7 â 77.0 +/- 8.7 â\n",
"âââââââââââââââââââââââââŧââââââââââââââââŧâââââââââââââââââââââââââââââŧââââââââââââââââââââŧâââââââââââââââââââââââââ¤\n",
"â customer_review â dict â 10 (100.0%) â 321.0 +/- 7.1 â 176.0 +/- 137.6 â\n",
"âââââââââââââââââââââââââ´ââââââââââââââââ´âââââââââââââââââââââââââââââ´ââââââââââââââââââââ´âââââââââââââââââââââââââ\n",
" \n",
" \n",
" đ§Š Expression Columns \n",
"âââââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â column name â data type â number unique values â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer_name â string â 10 (100.0%) â\n",
"âââââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â string â 9 (90.0%) â\n",
"âââââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"âââââââââââââââââââââââââââââââââââââââââââââââââââ Table Notes âââââââââââââââââââââââââââââââââââââââââââââââââââŽ\n",
"â â\n",
"â 1. All token statistics are based on a sample of max(1000, len(dataset)) records. â\n",
"â 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. â\n",
"â â\n",
"â°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯\n",
" \n",
"âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"\n"
],
"text/plain": [
"\u001b[1;38;2;118;185;0mââââââââââââââââââââââââââââââââââââââââ \u001b[0mđ¨ Data Designer Dataset Profile\u001b[1;38;2;118;185;0m âââââââââââââââââââââââââââââââââââââââââ\u001b[0m\n",
"\n",
" \n",
"\u001b[1;38;2;118;185;0m Dataset Overview \u001b[0m\n",
"âââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mnumber of records \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2mnumber of columns \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2mpercent complete records \u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â 10 â 9 â 100.0% â\n",
"âââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đ˛ Sampler Columns \u001b[0m\n",
"ââââââââââââââââââââââââââââââââââŗââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m sampler type\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â dict â 10 (100.0%) â person_from_faker â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_category â string â 4 (40.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â string â 7 (70.0%) â subcategory â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â target_age_range â string â 3 (30.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â review_style â string â 4 (40.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đī¸ LLM-Structured Columns \u001b[0m\n",
"âââââââââââââââââââââââââŗââââââââââââââââŗâââââââââââââââââââââââââââââŗââââââââââââââââââââŗâââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m prompt tokens\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m completion tokens\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m per record\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m per record\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â product â dict â 10 (100.0%) â 268.0 +/- 0.7 â 77.0 +/- 8.7 â\n",
"âââââââââââââââââââââââââŧââââââââââââââââŧâââââââââââââââââââââââââââââŧââââââââââââââââââââŧâââââââââââââââââââââââââ¤\n",
"â customer_review â dict â 10 (100.0%) â 321.0 +/- 7.1 â 176.0 +/- 137.6 â\n",
"âââââââââââââââââââââââââ´ââââââââââââââââ´âââââââââââââââââââââââââââââ´ââââââââââââââââââââ´âââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đ§Š Expression Columns \u001b[0m\n",
"âââââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer_name â string â 10 (100.0%) â\n",
"âââââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â string â 9 (90.0%) â\n",
"âââââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[2mââ\u001b[0m\u001b[2mâââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\u001b[2m Table Notes \u001b[0m\u001b[2mâââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\u001b[2mââŽ\u001b[0m\n",
"\u001b[2mâ\u001b[0m \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m 1. All token statistics are based on a sample of max(1000, len(dataset)) records. \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯\u001b[0m\n",
" \n",
"\u001b[1;38;2;118;185;0mâââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Print the analysis as a table.\n",
"preview.analysis.to_report()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### đ Scale up!\n",
"\n",
"- Happy with your preview data?\n",
"\n",
"- Use the `create` method to submit larger Data Designer generation jobs.\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[16:30:13] [INFO] đ¨ Creating Data Designer dataset\n",
"[16:30:13] [INFO] â
Validation passed\n",
"[16:30:13] [INFO] âī¸ Sorting column configs into a Directed Acyclic Graph\n",
"[16:30:13] [INFO] đŠē Running health checks for models...\n",
"[16:30:13] [INFO] |-- đ Checking 'nvidia/nvidia-nemotron-nano-9b-v2' in provider named 'nvidia' for model alias 'nemotron-nano-v2'...\n",
"[16:30:14] [INFO] |-- â
Passed!\n",
"[16:30:14] [INFO] âŗ Processing batch 1 of 1\n",
"[16:30:14] [INFO] đ˛ Preparing samplers to generate 20 records across 5 columns\n",
"[16:30:14] [INFO] đ§Š Generating column `customer_name` from expression\n",
"[16:30:14] [INFO] đ§Š Generating column `customer_age` from expression\n",
"[16:30:14] [INFO] đī¸ Preparing llm-structured column generation\n",
"[16:30:14] [INFO] |-- column name: 'product'\n",
"[16:30:14] [INFO] |-- model config:\n",
"{\n",
" \"alias\": \"nemotron-nano-v2\",\n",
" \"model\": \"nvidia/nvidia-nemotron-nano-9b-v2\",\n",
" \"inference_parameters\": {\n",
" \"temperature\": 0.5,\n",
" \"top_p\": 1.0,\n",
" \"max_tokens\": 1024,\n",
" \"max_parallel_requests\": 4,\n",
" \"timeout\": null,\n",
" \"extra_body\": null\n",
" },\n",
" \"provider\": \"nvidia\"\n",
"}\n",
"[16:30:14] [INFO] đ Processing llm-structured column 'product' with 4 concurrent workers\n",
"[16:30:22] [INFO] đī¸ Preparing llm-structured column generation\n",
"[16:30:22] [INFO] |-- column name: 'customer_review'\n",
"[16:30:22] [INFO] |-- model config:\n",
"{\n",
" \"alias\": \"nemotron-nano-v2\",\n",
" \"model\": \"nvidia/nvidia-nemotron-nano-9b-v2\",\n",
" \"inference_parameters\": {\n",
" \"temperature\": 0.5,\n",
" \"top_p\": 1.0,\n",
" \"max_tokens\": 1024,\n",
" \"max_parallel_requests\": 4,\n",
" \"timeout\": null,\n",
" \"extra_body\": null\n",
" },\n",
" \"provider\": \"nvidia\"\n",
"}\n",
"[16:30:22] [INFO] đ Processing llm-structured column 'customer_review' with 4 concurrent workers\n",
"[16:30:35] [INFO] đ Model usage summary:\n",
"{\n",
" \"nvidia/nvidia-nemotron-nano-9b-v2\": {\n",
" \"token_usage\": {\n",
" \"prompt_tokens\": 12414,\n",
" \"completion_tokens\": 5547,\n",
" \"total_tokens\": 17961\n",
" },\n",
" \"request_usage\": {\n",
" \"successful_requests\": 40,\n",
" \"failed_requests\": 0,\n",
" \"total_requests\": 40\n",
" },\n",
" \"tokens_per_second\": 876,\n",
" \"requests_per_minute\": 117\n",
" }\n",
"}\n",
"[16:30:35] [INFO] đ Measuring dataset column statistics:\n",
"[16:30:35] [INFO] |-- đ˛ column: 'customer'\n",
"[16:30:35] [INFO] |-- đ˛ column: 'product_category'\n",
"[16:30:35] [INFO] |-- đ˛ column: 'product_subcategory'\n",
"[16:30:35] [INFO] |-- đ˛ column: 'target_age_range'\n",
"[16:30:35] [INFO] |-- đ˛ column: 'review_style'\n",
"[16:30:35] [INFO] |-- đ§Š column: 'customer_name'\n",
"[16:30:35] [INFO] |-- đ§Š column: 'customer_age'\n",
"[16:30:35] [INFO] |-- đī¸ column: 'product'\n",
"[16:30:35] [INFO] |-- đī¸ column: 'customer_review'\n"
]
}
],
"source": [
"job_results = data_designer_client.create(config_builder, num_records=20)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" customer | \n",
" product_category | \n",
" product_subcategory | \n",
" target_age_range | \n",
" review_style | \n",
" customer_name | \n",
" customer_age | \n",
" product | \n",
" customer_review | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" {'age': 93, 'bachelors_field': 'stem', 'birth_... | \n",
" Books | \n",
" Classics | \n",
" 35-50 | \n",
" structured with bullet points | \n",
" Angela Mitchell | \n",
" 93 | \n",
" {'description': 'A curated selection of classi... | \n",
" {'customer_mood': 'happy', 'rating': 5, 'revie... | \n",
"
\n",
" \n",
" | 1 | \n",
" {'age': 45, 'bachelors_field': 'no_degree', 'b... | \n",
" Clothing | \n",
" Accessories | \n",
" 25-35 | \n",
" detailed | \n",
" Alex Fletcher | \n",
" 45 | \n",
" {'description': 'A sleek and versatile crossbo... | \n",
" {'customer_mood': 'happy', 'rating': 5, 'revie... | \n",
"
\n",
" \n",
" | 2 | \n",
" {'age': 101, 'bachelors_field': 'arts_humaniti... | \n",
" Home Office | \n",
" Lighting | \n",
" 25-35 | \n",
" detailed | \n",
" Kathryn Stafford | \n",
" 101 | \n",
" {'description': 'A sleek, adjustable LED desk ... | \n",
" {'customer_mood': 'happy', 'rating': 5, 'revie... | \n",
"
\n",
" \n",
" | 3 | \n",
" {'age': 42, 'bachelors_field': 'arts_humanitie... | \n",
" Books | \n",
" Non-Fiction | \n",
" 35-50 | \n",
" structured with bullet points | \n",
" Daniel Freeman | \n",
" 42 | \n",
" {'description': 'A non-fiction book exploring ... | \n",
" {'customer_mood': 'happy', 'rating': 5, 'revie... | \n",
"
\n",
" \n",
" | 4 | \n",
" {'age': 39, 'bachelors_field': 'education', 'b... | \n",
" Home Office | \n",
" Desks | \n",
" 50-65 | \n",
" brief | \n",
" Brittany Acosta | \n",
" 39 | \n",
" {'description': 'A sturdy and comfortable desk... | \n",
" {'customer_mood': 'happy', 'rating': 5, 'revie... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" customer product_category \\\n",
"0 {'age': 93, 'bachelors_field': 'stem', 'birth_... Books \n",
"1 {'age': 45, 'bachelors_field': 'no_degree', 'b... Clothing \n",
"2 {'age': 101, 'bachelors_field': 'arts_humaniti... Home Office \n",
"3 {'age': 42, 'bachelors_field': 'arts_humanitie... Books \n",
"4 {'age': 39, 'bachelors_field': 'education', 'b... Home Office \n",
"\n",
" product_subcategory target_age_range review_style \\\n",
"0 Classics 35-50 structured with bullet points \n",
"1 Accessories 25-35 detailed \n",
"2 Lighting 25-35 detailed \n",
"3 Non-Fiction 35-50 structured with bullet points \n",
"4 Desks 50-65 brief \n",
"\n",
" customer_name customer_age \\\n",
"0 Angela Mitchell 93 \n",
"1 Alex Fletcher 45 \n",
"2 Kathryn Stafford 101 \n",
"3 Daniel Freeman 42 \n",
"4 Brittany Acosta 39 \n",
"\n",
" product \\\n",
"0 {'description': 'A curated selection of classi... \n",
"1 {'description': 'A sleek and versatile crossbo... \n",
"2 {'description': 'A sleek, adjustable LED desk ... \n",
"3 {'description': 'A non-fiction book exploring ... \n",
"4 {'description': 'A sturdy and comfortable desk... \n",
"\n",
" customer_review \n",
"0 {'customer_mood': 'happy', 'rating': 5, 'revie... \n",
"1 {'customer_mood': 'happy', 'rating': 5, 'revie... \n",
"2 {'customer_mood': 'happy', 'rating': 5, 'revie... \n",
"3 {'customer_mood': 'happy', 'rating': 5, 'revie... \n",
"4 {'customer_mood': 'happy', 'rating': 5, 'revie... "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Load the generated dataset as a pandas DataFrame.\n",
"dataset = job_results.load_dataset()\n",
"\n",
"dataset.head()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"ââââââââââââââââââââââââââââââââââââââââ đ¨ Data Designer Dataset Profile âââââââââââââââââââââââââââââââââââââââââ\n",
"\n",
" \n",
" Dataset Overview \n",
"âââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â number of records â number of columns â percent complete records â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â 20 â 9 â 100.0% â\n",
"âââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
" đ˛ Sampler Columns \n",
"ââââââââââââââââââââââââââââââââââŗââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââ\n",
"â column name â data type â number unique values â sampler type â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â dict â 20 (100.0%) â person_from_faker â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_category â string â 5 (25.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â string â 11 (55.0%) â subcategory â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â target_age_range â string â 5 (25.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â review_style â string â 4 (20.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââ\n",
" \n",
" \n",
" đī¸ LLM-Structured Columns \n",
"âââââââââââââââââââââââââŗââââââââââââââââŗâââââââââââââââââââââââââââââŗââââââââââââââââââââŗâââââââââââââââââââââââââ\n",
"â â â â prompt tokens â completion tokens â\n",
"â column name â data type â number unique values â per record â per record â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â product â dict â 20 (100.0%) â 268.0 +/- 0.8 â 63.5 +/- 7.5 â\n",
"âââââââââââââââââââââââââŧââââââââââââââââŧâââââââââââââââââââââââââââââŧââââââââââââââââââââŧâââââââââââââââââââââââââ¤\n",
"â customer_review â dict â 20 (100.0%) â 308.0 +/- 7.1 â 173.5 +/- 93.8 â\n",
"âââââââââââââââââââââââââ´ââââââââââââââââ´âââââââââââââââââââââââââââââ´ââââââââââââââââââââ´âââââââââââââââââââââââââ\n",
" \n",
" \n",
" đ§Š Expression Columns \n",
"âââââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â column name â data type â number unique values â\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer_name â string â 20 (100.0%) â\n",
"âââââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â string â 19 (95.0%) â\n",
"âââââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"âââââââââââââââââââââââââââââââââââââââââââââââââââ Table Notes âââââââââââââââââââââââââââââââââââââââââââââââââââŽ\n",
"â â\n",
"â 1. All token statistics are based on a sample of max(1000, len(dataset)) records. â\n",
"â 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. â\n",
"â â\n",
"â°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯\n",
" \n",
"âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"\n"
],
"text/plain": [
"\u001b[1;38;2;118;185;0mââââââââââââââââââââââââââââââââââââââââ \u001b[0mđ¨ Data Designer Dataset Profile\u001b[1;38;2;118;185;0m âââââââââââââââââââââââââââââââââââââââââ\u001b[0m\n",
"\n",
" \n",
"\u001b[1;38;2;118;185;0m Dataset Overview \u001b[0m\n",
"âââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mnumber of records \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2mnumber of columns \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2mpercent complete records \u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â 20 â 9 â 100.0% â\n",
"âââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đ˛ Sampler Columns \u001b[0m\n",
"ââââââââââââââââââââââââââââââââââŗââââââââââââââââââŗââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m sampler type\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer â dict â 20 (100.0%) â person_from_faker â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_category â string â 5 (25.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â product_subcategory â string â 11 (55.0%) â subcategory â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â target_age_range â string â 5 (25.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââŧââââââââââââââââââŧââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââ¤\n",
"â review_style â string â 4 (20.0%) â category â\n",
"ââââââââââââââââââââââââââââââââââ´ââââââââââââââââââ´ââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đī¸ LLM-Structured Columns \u001b[0m\n",
"âââââââââââââââââââââââââŗââââââââââââââââŗâââââââââââââââââââââââââââââŗââââââââââââââââââââŗâââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m prompt tokens\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m completion tokens\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m per record\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m per record\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â product â dict â 20 (100.0%) â 268.0 +/- 0.8 â 63.5 +/- 7.5 â\n",
"âââââââââââââââââââââââââŧââââââââââââââââŧâââââââââââââââââââââââââââââŧââââââââââââââââââââŧâââââââââââââââââââââââââ¤\n",
"â customer_review â dict â 20 (100.0%) â 308.0 +/- 7.1 â 173.5 +/- 93.8 â\n",
"âââââââââââââââââââââââââ´ââââââââââââââââ´âââââââââââââââââââââââââââââ´ââââââââââââââââââââ´âââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[1;38;2;118;185;0m đ§Š Expression Columns \u001b[0m\n",
"âââââââââââââââââââââââââââââââââââââŗâââââââââââââââââââââââââââŗâââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
"â\u001b[1;2m \u001b[0m\u001b[1;2mcolumn name \u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m data type\u001b[0m\u001b[1;2m \u001b[0mâ\u001b[1;2m \u001b[0m\u001b[1;2m number unique values\u001b[0m\u001b[1;2m \u001b[0mâ\n",
"âĄââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŠ\n",
"â customer_name â string â 20 (100.0%) â\n",
"âââââââââââââââââââââââââââââââââââââŧâââââââââââââââââââââââââââŧâââââââââââââââââââââââââââââââââââââââââââââââââââ¤\n",
"â customer_age â string â 19 (95.0%) â\n",
"âââââââââââââââââââââââââââââââââââââ´âââââââââââââââââââââââââââ´âââââââââââââââââââââââââââââââââââââââââââââââââââ\n",
" \n",
" \n",
"\u001b[2mââ\u001b[0m\u001b[2mâââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\u001b[2m Table Notes \u001b[0m\u001b[2mâââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\u001b[2mââŽ\u001b[0m\n",
"\u001b[2mâ\u001b[0m \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m 1. All token statistics are based on a sample of max(1000, len(dataset)) records. \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ\u001b[0m \u001b[2mâ\u001b[0m\n",
"\u001b[2mâ°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯\u001b[0m\n",
" \n",
"\u001b[1;38;2;118;185;0mâââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Load the analysis results into memory.\n",
"analysis = job_results.load_analysis()\n",
"\n",
"analysis.to_report()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## âī¸ Next Steps\n",
"\n",
"Check out the following notebook to learn more about:\n",
"\n",
"- [Seeding synthetic data generation with an external dataset](/notebooks/3-seeding-with-a-dataset/)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}