import pandas as pd
DATASET_NAME = f"trip-planner-test-set-{RUN_ID}"
# Each dict in this list is one dataset row. The keys must match the {placeholders} in the
# prompt's user_message — the experiment substitutes row[col] for {col} when it renders
# the prompt per row.
#
# Five rows is enough to demonstrate the comparison while keeping the API spend negligible.
# In production you'd build a much larger and more carefully-balanced golden dataset; here we keep it small and varied (different durations, regions, travel styles)
# so the prompts have to handle range.
examples = [
{
"destination": "Istanbul, Turkey",
"duration": "3 days",
"travel_style": "standard",
"research": "Best time to visit is April-May. Top attractions: Hagia Sophia, Blue Mosque, Grand Bazaar.",
"budget_info": "Mid-range hotels $80-120/night, meals $15-30 each, transport $5-10/day.",
"local_info": "Try Karaköy for breakfast spots; avoid Sultanahmet for dinner due to tourist markup.",
},
{
"destination": "Bangkok, Thailand",
"duration": "4 days",
"travel_style": "family-friendly",
"research": "Cool season Nov-Feb best. Top kid-friendly: Safari World, Dream World, river cruise.",
"budget_info": "Family rooms $100-180/night, street food $2-5, taxis $5-15.",
"local_info": "Skytrain reliable; visit temples early morning to beat heat.",
},
{
"destination": "Barcelona, Spain",
"duration": "5 days",
"travel_style": "romantic",
"research": "Spring/fall ideal. Sagrada Familia, Park Güell, tapas tours, beach access from city center.",
"budget_info": "Boutique hotels $150-250/night, tapas dinner $30-50, metro $12 day pass.",
"local_info": "Dinner starts late (9pm+); reserve Sagrada Familia tickets weeks ahead.",
},
{
"destination": "Reykjavik, Iceland",
"duration": "4 days",
"travel_style": "adventure",
"research": "Sept-Mar for northern lights; June-Aug for midnight sun. Blue Lagoon, Golden Circle, glacier tours.",
"budget_info": "Hotels $200-300/night, dinner $40-70, day tours $80-150.",
"local_info": "Rent a car for flexibility; weather changes fast — pack layers.",
},
{
"destination": "New York City, USA",
"duration": "2 days",
"travel_style": "standard",
"research": "Times Square, Central Park, museums (Met, MoMA), Brooklyn Bridge walk.",
"budget_info": "Hotels $250-400/night, meals $20-50, subway $33 7-day pass.",
"local_info": "Walk where possible; subway faster than taxis in midtown.",
},
]
# client.datasets.create accepts a list of dicts or a pandas DataFrame. Each column in the
# DataFrame becomes a dataset column in Arize. The dataset is versioned — appending
# examples later creates a new version of the same dataset.
examples_df = pd.DataFrame(examples)
dataset = client.datasets.create(
name=DATASET_NAME,
space=ARIZE_SPACE_ID,
examples=examples_df,
)
print(f"Created dataset {dataset.name} with {len(examples)} rows (id={dataset.id})")