| """Generate dineout-evals SmolTrace-format task set (100 rows). |
| |
| Schema: id, prompt, expected_tool, difficulty, agent_type, expected_keywords. |
| Tools: search_venues, view_venue_details, check_availability, |
| book_table, cancel_booking. |
| |
| Run: python3 generate.py > tasks.jsonl |
| """ |
|
|
| from __future__ import annotations |
|
|
| import json |
| import sys |
|
|
|
|
| def _row(idx: int, tool: str, prompt: str, difficulty: str, agent_type: str, |
| keywords: list[str], suffix: str = "") -> dict: |
| base = f"dineout_{tool}{('_' + suffix) if suffix else ''}" |
| batch = idx // 25 |
| return { |
| "id": f"{base}_batch{batch}_{idx}", |
| "prompt": prompt, |
| "expected_tool": tool, |
| "difficulty": difficulty, |
| "agent_type": agent_type, |
| "expected_keywords": keywords, |
| } |
|
|
|
|
| def gen_search_venues() -> list[dict]: |
| rows = [] |
| i = 0 |
| cities_cuisines = [ |
| ("Bangalore", "Continental"), ("Bangalore", "Italian"), ("Bangalore", "North Indian"), |
| ("Bangalore", "Bar"), ("Bangalore", "Cafe"), ("Bangalore", "Buffet"), |
| ("Mumbai", "Mediterranean"), ("Mumbai", "Modern Indian"), ("Mumbai", "Continental"), |
| ("Mumbai", "Bar"), |
| ("Delhi", "North Indian"), ("Delhi", "Fine Dining"), ("Delhi", "Continental"), |
| ("Delhi", "Tandoor"), ("Delhi", "Cafe"), |
| ] |
| for city, cuisine in cities_cuisines: |
| rows.append(_row(i, "search_venues", |
| f"Find {cuisine} restaurants in {city} I can book a table at.", |
| "easy", "tool", [city, cuisine, "search", "venues"])) |
| i += 1 |
| occasions = ["romantic", "casual", "anniversary", "celebration", "brunch", |
| "drinks", "fine dining", "family"] |
| for occ in occasions: |
| rows.append(_row(i, "search_venues", |
| f"Find a {occ} restaurant in Bangalore for tonight.", |
| "easy", "tool", ["Bangalore", occ, "tonight"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a romantic restaurant in Mumbai for an anniversary dinner.", |
| "medium", "tool", ["Mumbai", "romantic", "anniversary", "dinner"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a casual brunch spot in Bangalore — under ₹1000 for two.", |
| "medium", "tool", ["Bangalore", "casual", "brunch", "₹1000"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a venue in Delhi rated 4.5 or higher for a celebration.", |
| "medium", "tool", ["Delhi", "4.5", "celebration"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "I want a fine-dining experience in Delhi — budget no concern.", |
| "medium", "tool", ["Delhi", "fine-dining", "no budget"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a bar with rating > 4.0 in Bangalore for after-work drinks.", |
| "medium", "tool", ["Bangalore", "bar", "drinks", "4.0"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a buffet restaurant in Bangalore for a family meal of 8 people.", |
| "medium", "code", ["Bangalore", "buffet", "family", "8 people"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find venues that have both 'romantic' and 'anniversary' as occasion tags in Mumbai.", |
| "hard", "code", ["Mumbai", "romantic", "anniversary", "tags"], suffix="multi_tag")) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find the highest-rated venue in any city that costs under ₹2000 for two.", |
| "hard", "code", ["highest-rated", "₹2000", "any city"], suffix="optimization")) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "I have ₹3000 for two. Find the most highly-rated venue in Mumbai within that budget.", |
| "hard", "code", ["₹3000", "Mumbai", "highest-rated"], suffix="budget_optimal")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_view_venue_details() -> list[dict]: |
| rows = [] |
| i = 100 |
| venues = [ |
| ("v-301", "Indiranagar Social"), ("v-302", "Koramangala Truffles"), |
| ("v-303", "Bandra Olive Bar"), ("v-304", "GK Bukhara"), |
| ("v-305", "Toit Brewpub"), ("v-306", "BBQ Nation"), |
| ("v-307", "The Big Chill Cakery"), ("v-308", "Bombay Canteen"), |
| ("v-309", "Ttoit Mumbai"), ("v-310", "Indian Accent"), |
| ] |
| for vid, name in venues: |
| rows.append(_row(i, "view_venue_details", |
| f"Show me details for '{name}' — hours, offers, features.", |
| "easy", "tool", [name, "details", "hours", "offers"])) |
| i += 1 |
| rows.append(_row(i, "view_venue_details", |
| "What hours is venue v-302 open? Does it accept reservations?", |
| "easy", "tool", ["v-302", "hours", "reservations"])) |
| i += 1 |
| rows.append(_row(i, "view_venue_details", |
| "Does Indian Accent have a fine-dining feature listed?", |
| "easy", "tool", ["Indian Accent", "fine-dining", "feature"])) |
| i += 1 |
| rows.append(_row(i, "view_venue_details", |
| "List all current offers at Toit Brewpub.", |
| "easy", "tool", ["Toit Brewpub", "offers"])) |
| i += 1 |
| rows.append(_row(i, "view_venue_details", |
| "Compare features and offers between Indiranagar Social and Toit Brewpub.", |
| "medium", "code", ["Indiranagar Social", "Toit Brewpub", "compare", "features", "offers"], suffix="comparison")) |
| i += 1 |
| rows.append(_row(i, "view_venue_details", |
| "Which venues in my list (v-301, v-303, v-308) accept reservations and have 'bar' features?", |
| "hard", "code", ["v-301", "v-303", "v-308", "reservations", "bar"], suffix="multi_filter")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_check_availability() -> list[dict]: |
| rows = [] |
| i = 200 |
| dates = ["2026-05-10", "2026-05-15", "2026-05-22", "2026-06-01", |
| "2026-06-08", "2026-06-15"] |
| for d in dates: |
| rows.append(_row(i, "check_availability", |
| f"Is venue v-301 available on {d} for 2 people?", |
| "easy", "tool", ["v-301", d, "2 people", "availability"])) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Check dinner slots at v-304 for next Saturday for a party of 6.", |
| "medium", "tool", ["v-304", "dinner", "Saturday", "6"])) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Check lunch availability at v-303 for 4 people on 2026-05-20.", |
| "medium", "tool", ["v-303", "lunch", "4 people", "2026-05-20"])) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Check 9 PM slot at v-310 for 2 on 2026-05-25.", |
| "medium", "tool", ["v-310", "9 PM", "2", "2026-05-25"])) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Check availability at v-305 for a group of 8 next Friday dinner.", |
| "medium", "tool", ["v-305", "8", "Friday", "dinner"])) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Check both lunch and dinner availability at v-302 for 4 on 2026-06-05.", |
| "medium", "code", ["v-302", "lunch", "dinner", "4", "2026-06-05"], suffix="both_meals")) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Find the earliest dinner slot at Indian Accent (v-310) within the next 7 days for 2.", |
| "hard", "code", ["v-310", "earliest", "dinner", "7 days"], suffix="time_search")) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "I need a 9 PM table for 2 in Mumbai this Friday. Try Bandra Olive first; if booked, try Bombay Canteen.", |
| "hard", "code", ["Mumbai", "9 PM", "Friday", "Bandra Olive", "Bombay Canteen"], suffix="search_venues_fallback")) |
| i += 1 |
| rows.append(_row(i, "check_availability", |
| "Across v-301, v-302, v-305, find the venue with the most 8 PM dinner slots open on Saturday.", |
| "hard", "code", ["v-301", "v-302", "v-305", "8 PM", "Saturday"], suffix="multi_venue_compare")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_book_table() -> list[dict]: |
| rows = [] |
| i = 300 |
| rows.append(_row(i, "book_table", |
| "Book table slot s-v-301-2026-05-10-2000 for 2 at Indiranagar Social.", |
| "easy", "tool", ["s-v-301-2026-05-10-2000", "Indiranagar Social", "2"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book the 8 PM slot at GK Bukhara for 4 people on 2026-05-22.", |
| "medium", "tool", ["GK Bukhara", "8 PM", "4 people", "2026-05-22"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a table for 6 at Toit Brewpub for tomorrow dinner. Note in special requests: 'window seat'.", |
| "medium", "tool", ["Toit Brewpub", "6", "tomorrow", "window seat"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a 7 PM table at v-302 for 2 on 2026-06-01.", |
| "easy", "tool", ["v-302", "7 PM", "2", "2026-06-01"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book lunch at v-307 for 3 on 2026-05-30.", |
| "medium", "tool", ["v-307", "lunch", "3", "2026-05-30"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a table at Bombay Canteen for 4 on 2026-06-12 — request a quiet corner.", |
| "medium", "tool", ["Bombay Canteen", "4", "2026-06-12", "quiet corner"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a romantic dinner for 2 at Indian Accent next weekend, 9 PM. Note: anniversary celebration.", |
| "hard", "code", ["Indian Accent", "romantic", "9 PM", "anniversary"], suffix="check_availability_special")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Find a top-rated North Indian place in Delhi and book a table for 4 this Saturday at 8 PM.", |
| "hard", "code", ["Delhi", "North Indian", "4", "Saturday", "8 PM"], suffix="search_venues_check_availability")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book the cheapest available Bangalore venue for 2 this Friday dinner.", |
| "hard", "code", ["Bangalore", "cheapest", "2", "Friday", "dinner"], suffix="optimize_cost")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a Mediterranean dinner for 4 in Mumbai on 2026-06-20 at 8 PM. Special request: birthday cake.", |
| "hard", "code", ["Mumbai", "Mediterranean", "4", "2026-06-20", "8 PM", "birthday cake"], suffix="search_check_book")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_cancel_booking() -> list[dict]: |
| rows = [] |
| i = 400 |
| for n in range(8): |
| rows.append(_row(i, "cancel_booking", |
| f"Cancel my booking b-{12340 + n}.", |
| "easy", "tool", [f"b-{12340 + n}", "cancel", "booking"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-99999 with reason 'plans changed'.", |
| "easy", "tool", ["b-99999", "cancel", "plans changed"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-77777 with reason 'food poisoning, sorry'.", |
| "easy", "tool", ["b-77777", "cancel", "food poisoning"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-55555 — meeting got rescheduled.", |
| "easy", "tool", ["b-55555", "cancel", "meeting"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-44444. Confirm whether the cancellation is refundable.", |
| "medium", "tool", ["b-44444", "cancel", "refundable"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel two bookings: b-1001 and b-1002. Both with reason 'travel cancelled'.", |
| "medium", "code", ["b-1001", "b-1002", "travel cancelled"], suffix="multi_cancel")) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-2002. If refundable, note that I'll get the refund; if not, log the loss.", |
| "hard", "code", ["b-2002", "refundable", "refund", "loss"], suffix="conditional_refund")) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel booking b-3003 — guest sick.", |
| "easy", "tool", ["b-3003", "cancel", "guest sick"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel b-4004 with no reason given.", |
| "easy", "tool", ["b-4004", "cancel", "no reason"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "I need to cancel b-5005 and rebook for a smaller party. Cancel first.", |
| "medium", "tool", ["b-5005", "cancel", "rebook", "smaller"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "Cancel b-6006 immediately — gate code emergency.", |
| "easy", "tool", ["b-6006", "cancel", "emergency"])) |
| i += 1 |
| rows.append(_row(i, "cancel_booking", |
| "If booking b-7007 is more than 24 hours away, cancel it; otherwise warn me about no-show penalty.", |
| "hard", "code", ["b-7007", "24 hours", "no-show", "penalty"], suffix="time_gated")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_extra_search_venues() -> list[dict]: |
| """Additional search_venues edge cases — pushes total to ~100.""" |
| rows = [] |
| i = 700 |
| rows.append(_row(i, "search_venues", |
| "Find venues in Bangalore with rating >= 4.5 AND cost for two <= ₹2000.", |
| "medium", "code", ["Bangalore", "4.5", "₹2000", "filter"], suffix="multi_filter")) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "List every venue across all cities sorted by rating descending.", |
| "hard", "code", ["all cities", "rating", "descending"], suffix="global_sort")) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find Continental venues in any city with avg cost for two between ₹1000 and ₹2500.", |
| "medium", "code", ["Continental", "₹1000", "₹2500", "any city"], suffix="price_range")) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find a Cafe in Delhi for breakfast.", |
| "easy", "tool", ["Delhi", "Cafe", "breakfast"])) |
| i += 1 |
| rows.append(_row(i, "search_venues", |
| "Find venues tagged 'celebration' across all cities.", |
| "medium", "code", ["celebration", "all cities", "tags"], suffix="tag_filter")) |
| i += 1 |
| return rows |
|
|
|
|
| def gen_extra_book_table() -> list[dict]: |
| """Additional book_table edge cases.""" |
| rows = [] |
| i = 800 |
| rows.append(_row(i, "book_table", |
| "Book the cheapest Bangalore venue with rating >= 4.0 for 2 next Saturday.", |
| "hard", "code", ["Bangalore", "cheapest", "4.0", "2", "Saturday"], suffix="cost_quality_filter")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a fine-dining anniversary dinner. Suggest top 3 venues, then book the highest-rated.", |
| "hard", "code", ["fine-dining", "anniversary", "top 3", "highest-rated"], suffix="search_rank_book")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book lunch at a Mumbai venue rated above 4.4 for 6 people on 2026-07-10.", |
| "medium", "code", ["Mumbai", "4.4", "6", "2026-07-10", "lunch"], suffix="search_check_book")) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book a 9 PM table at v-308 for 4 — wheelchair access required.", |
| "medium", "tool", ["v-308", "9 PM", "4", "wheelchair access"])) |
| i += 1 |
| rows.append(_row(i, "book_table", |
| "Book table at Toit Brewpub for 2 on 2026-07-15 at 8 PM. Mention birthday in special requests.", |
| "medium", "tool", ["Toit Brewpub", "2", "2026-07-15", "8 PM", "birthday"])) |
| i += 1 |
| return rows |
|
|
|
|
| def main() -> None: |
| rows: list[dict] = [] |
| rows.extend(gen_search_venues()) |
| rows.extend(gen_view_venue_details()) |
| rows.extend(gen_check_availability()) |
| rows.extend(gen_book_table()) |
| rows.extend(gen_cancel_booking()) |
| rows.extend(gen_extra_search_venues()) |
| rows.extend(gen_extra_book_table()) |
| out = sys.stdout |
| for r in rows: |
| out.write(json.dumps(r, ensure_ascii=False) + "\n") |
| print(f"# generated {len(rows)} rows", file=sys.stderr) |
|
|
|
|
| if __name__ == "__main__": |
| main() |
|
|