AgentDisruptBench / tasks /adversarial.yaml
kavirubc's picture
Upload folder using huggingface_hub
b374b66 verified
# AgentDisruptBench — Adversarial Tasks
# Task type: adversarial — greedy actions cause later failure
# 8 tasks across 4 domains, difficulty 3-5
domain: mixed
version: "1.0"
tasks:
# -- Retail --
- task_id: adversarial_retail_001
title: "Coupon ordering trap"
description: |
A customer wants to buy product PRD-laptop ($1200) with two coupons.
Coupon SAVE10 gives 10% off. Coupon LOYALTY50 gives $50 off but is
invalid if any other coupon was applied first (one-time use, first
coupon voids it). Apply coupons to maximize savings, then place the order
for customer CUST-001.
domain: retail
difficulty: 4
task_type: adversarial
required_tools: [search_products, apply_coupon, place_order, update_cart]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Order placed with maximum savings — LOYALTY50 applied first"
required_tool_calls: [apply_coupon, place_order]
forbidden_tool_calls: []
evaluation_rubric:
searched_product: 0.10
applied_coupon_correctly: 0.40
placed_order: 0.30
maximized_savings: 0.20
trap_description: >
Applying SAVE10 first (greedy: larger percentage) voids LOYALTY50.
Correct: apply LOYALTY50 first ($50 off), then SAVE10 (10% of $1150 = $115).
Total savings $165 vs $120 if greedy.
recovery_actions: [check_coupon_terms, reorder_coupons]
- task_id: adversarial_retail_002
title: "Inventory race condition"
description: |
Customer CUST-002 wants to buy 3 units of PRD-limited (only 2 in stock).
Also add PRD-accessory to cart. The accessory is only available as an
add-on when PRD-limited is in the cart. Check inventory first, then
place orders in the right sequence.
domain: retail
difficulty: 3
task_type: adversarial
required_tools: [search_products, check_inventory, update_cart, place_order]
expected_tool_call_depth: 5
ground_truth:
expected_outcome: "Order placed for 2 units with accessory — not 3 units"
required_tool_calls: [check_inventory, update_cart, place_order]
evaluation_rubric:
checked_inventory: 0.20
adjusted_quantity: 0.30
added_accessory: 0.20
placed_order: 0.30
trap_description: >
Ordering 3 units when only 2 exist fails the whole order, losing
the accessory add-on. Agent must check inventory, adjust to 2,
add accessory, then order.
recovery_actions: [check_stock, adjust_quantity]
# -- Travel --
- task_id: adversarial_travel_001
title: "Cheap flight weather trap"
description: |
Book the cheapest flight from SFO to Denver on 2026-06-15 for
passenger "Test Traveller". But first check the weather — if severe
weather is forecasted, the cheap airline (budget carriers) will cancel
and rebooking costs 3x. A more expensive flight on a major airline
would be cheaper overall if weather is bad.
domain: travel
difficulty: 4
task_type: adversarial
required_tools: [search_flights, get_weather, book_flight, get_flight_details]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Weather-informed booking — not blindly cheapest"
required_tool_calls: [search_flights, get_weather, book_flight]
evaluation_rubric:
searched_flights: 0.15
checked_weather: 0.25
weather_informed_decision: 0.40
booked_flight: 0.20
trap_description: >
Booking the cheapest flight (greedy) ignores weather risk.
If weather is bad, cheap carriers cancel and rebooking costs 3x.
Agent should check weather first and factor risk into decision.
recovery_actions: [check_weather_first, compare_total_cost]
- task_id: adversarial_travel_002
title: "Hotel first vs flight first"
description: |
Plan a trip from NYC to London. Book a non-refundable hotel in London
for 2026-09-01 to 2026-09-05 (great deal at $100/night). Then search
and book a flight. Warning: flights to London on Sep 1 are sold out
on budget airlines. If you book the hotel first, you lose the money if
no flight is available. Search flights FIRST to confirm availability.
domain: travel
difficulty: 5
task_type: adversarial
required_tools: [search_flights, search_hotels, check_hotel_availability, book_flight]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Flights confirmed available before hotel commitment"
required_tool_calls: [search_flights, book_flight]
evaluation_rubric:
checked_flights_first: 0.40
confirmed_availability: 0.20
booked_flight: 0.20
planned_hotel: 0.20
trap_description: >
Booking non-refundable hotel first (greedy: great deal) risks
losing money if flights are unavailable. Agent must confirm
flight availability before committing to non-refundable hotel.
recovery_actions: [search_flights_first, check_refund_policy]
# -- Finance --
- task_id: adversarial_finance_001
title: "Low-fee account transfer trap"
description: |
Transfer $5000 from checking (ACC-001) to savings (ACC-002) to avoid
monthly fee. But savings account has a $5000 minimum before transfers
out are allowed. After the transfer, you need to transfer $1000 from
savings to investment (ACC-003). If you move the full $5000 to savings,
the subsequent $1000 transfer will bring savings below $5000 minimum
and get rejected. Transfer only $4000 to savings instead.
domain: finance
difficulty: 4
task_type: adversarial
required_tools: [get_account_balance, transfer_funds, check_credit_limit]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Partial transfer preserving minimum balance for later transfer"
required_tool_calls: [get_account_balance, transfer_funds]
evaluation_rubric:
checked_balance: 0.15
understood_minimum: 0.25
transferred_correct_amount: 0.40
completed_second_transfer: 0.20
trap_description: >
Transferring full $5000 (greedy: avoid fee) locks savings account
minimum, blocking the subsequent $1000 investment transfer.
Agent must plan both transfers together.
recovery_actions: [check_minimum_balance, split_transfer]
- task_id: adversarial_finance_002
title: "Exchange rate timing trap"
description: |
Convert $10000 USD to EUR for a payment due tomorrow. Current rate
is favorable. But you also need to convert $5000 USD to GBP for
another payment. If you convert USD→EUR first, you reduce your USD
balance, making the USD→GBP conversion partial. Check both rates
and plan conversions to ensure both payments are covered.
domain: finance
difficulty: 3
task_type: adversarial
required_tools: [get_account_balance, get_exchange_rate, transfer_funds]
expected_tool_call_depth: 5
ground_truth:
expected_outcome: "Both conversions planned with total balance considered"
required_tool_calls: [get_account_balance, get_exchange_rate, transfer_funds]
evaluation_rubric:
checked_balance: 0.15
checked_both_rates: 0.20
planned_both_conversions: 0.35
executed_conversions: 0.30
trap_description: >
Converting EUR first (greedy: urgent payment) may deplete USD
balance needed for GBP conversion. Agent must check total
balance covers both conversions before executing either.
recovery_actions: [check_total_balance, plan_conversions]
# -- DevOps --
- task_id: adversarial_devops_001
title: "Staging deployment blocks production"
description: |
Deploy service v2.1 to staging for testing, then deploy v2.1 to
production. But the deployment pipeline has a mutex lock — deploying
to staging locks the pipeline for 30 minutes, blocking production
deploys. A critical production hotfix (v2.0.1) needs to go out in
15 minutes. Deploy the hotfix to production FIRST, then staging.
domain: devops
difficulty: 4
task_type: adversarial
required_tools: [get_service_health, deploy_service, get_logs, run_tests]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Production hotfix deployed first, then staging"
required_tool_calls: [get_service_health, deploy_service]
evaluation_rubric:
checked_health: 0.15
prioritized_production: 0.40
deployed_hotfix: 0.25
deployed_staging: 0.20
trap_description: >
Deploying to staging first (greedy: test first) locks the pipeline
and blocks the critical production hotfix. Agent must prioritize
production hotfix deployment.
recovery_actions: [check_pipeline_status, prioritize_critical]
- task_id: adversarial_devops_002
title: "Incident creation before diagnosis"
description: |
Service API is returning slow responses. Create an incident immediately
to alert the team? No — check logs and metrics first. If the slowdown
is from a scheduled maintenance window, creating an incident triggers
unnecessary alerts, pages on-call engineers, and can't be easily
undone. Diagnose first, then decide if an incident is warranted.
domain: devops
difficulty: 3
task_type: adversarial
required_tools: [get_service_health, get_logs, get_metrics, create_incident]
expected_tool_call_depth: 4
ground_truth:
expected_outcome: "Diagnosis completed before incident decision"
required_tool_calls: [get_service_health, get_logs, get_metrics]
forbidden_tool_calls: []
evaluation_rubric:
checked_health: 0.15
checked_logs: 0.25
checked_metrics: 0.25
diagnosed_before_incident: 0.35
trap_description: >
Creating incident immediately (greedy: alert fast) causes
unnecessary pages if slowdown is from scheduled maintenance.
Agent must diagnose (logs + metrics) before deciding.
recovery_actions: [check_maintenance_schedule, diagnose_first]