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32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
EASY_TASK_EMAILS = [
    {
        "id": "e001",
        "subject": "Incorrect charge on my account",
        "body": "Hello, I noticed an incorrect charge of $49.99 on my account. I should have been charged $29.99 for the basic plan. Please fix this and issue a refund.",
        "sender": "alice@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 5,
        "correct_category": "billing",
        "correct_urgency": "high",
    },
    {
        "id": "e002",
        "subject": "Cannot login to my account β€” completely locked out",
        "body": "I keep getting an 'invalid password' error when trying to log in. I have not changed my password recently and I am completely locked out of my account. I rely on this daily for work and need access restored urgently.",
        "sender": "bob@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 15,
        "correct_category": "technical",
        "correct_urgency": "high",
    },
    {
        "id": "e003",
        "subject": "What are your office hours?",
        "body": "Hi, I'd like to visit your office to discuss my account in person. What are your business hours and where are you located?",
        "sender": "carol@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 60,
        "correct_category": "general",
        "correct_urgency": "low",
    },
    {
        "id": "e004",
        "subject": "App crashes every time I open it",
        "body": "Every time I open the mobile app on my iPhone it immediately crashes. I've tried reinstalling but the problem persists. This is preventing me from accessing my account.",
        "sender": "dave@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 10,
        "correct_category": "technical",
        "correct_urgency": "high",
    },
    {
        "id": "e005",
        "subject": "FREE PRIZE - Claim Now!!!",
        "body": "CONGRATULATIONS!!! You have been SELECTED to receive a FREE GIFT! Click here NOW to claim your prize! Limited time offer! ACT IMMEDIATELY!!!",
        "sender": "promo@suspicious-deals.net",
        "sender_tier": "standard",
        "received_minutes_ago": 2,
        "correct_category": "spam",
        "correct_urgency": "low",
    },
    {
        "id": "e006",
        "subject": "Unauthorized access to my account β€” please lock it now",
        "body": "Someone has accessed my account without my permission. I need you to lock my account immediately, revoke all active sessions, and help me regain sole ownership. This is an account security emergency.",
        "sender": "user6@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 8,
        "correct_category": "account",
        "correct_urgency": "high",
    },
    {
        "id": "e007",
        "subject": "Feature request: dark mode please",
        "body": "Hi team! Love the product. One thing that would make it even better is a dark mode option. Would really help with eye strain during late-night work sessions. Thanks!",
        "sender": "user7@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 180,
        "correct_category": "feature_request",
        "correct_urgency": "low",
    },
    {
        "id": "e008",
        "subject": "Charged for annual plan but signed up for monthly",
        "body": "I was charged $299 for an annual plan but I clearly selected the monthly plan at $29/month. This is a significant overcharge. Please refund the difference immediately.",
        "sender": "user8@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 20,
        "correct_category": "billing",
        "correct_urgency": "high",
    },
    {
        "id": "e009",
        "subject": "API returning 429 errors β€” production pipeline completely broken",
        "body": "Every API request from our integration is returning a 429 rate limit error. We are well within our plan limits according to the dashboard. Our entire production pipeline has been down for 2 hours because of this technical bug. This needs urgent investigation.",
        "sender": "dev9@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 12,
        "correct_category": "technical",
        "correct_urgency": "high",
    },
    {
        "id": "e010",
        "subject": "General question about your cancellation policy",
        "body": "Hi, I am just curious about your cancellation policy. If I cancel my subscription mid-month, do I get a prorated refund or does billing continue until the end of the period? No rush, just want to understand before I decide.",
        "sender": "user10@example.com",
        "sender_tier": "standard",
        "received_minutes_ago": 90,
        "correct_category": "general",
        "correct_urgency": "low",
    },
]

MEDIUM_TASK_EMAILS = [
    {
        "id": "m001",
        "subject": "Need to reset my password",
        "body": "Hi support team, I've forgotten my password and the reset email isn't arriving in my inbox. I've checked spam folders too. Can you please help me reset my password? My account email is john.doe@email.com.",
        "sender": "john.doe@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 20,
        "required_keywords": ["reset", "password", "link", "email", "secure", "24"],
        "min_keyword_matches": 3,
        "description": "Password reset - must include reset instructions, security note, and method to receive new credentials",
    },
    {
        "id": "m002",
        "subject": "Charged twice this month - Need refund ASAP",
        "body": "I have been charged twice for my subscription this month. First charge on the 1st for $29.99 and again on the 15th for $29.99. This is unacceptable. I need a refund for the duplicate charge. My account ID is USR-48291.",
        "sender": "sarah.smith@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 8,
        "required_keywords": [
            "apologize",
            "sorry",
            "refund",
            "days",
            "case",
            "resolve",
            "billing",
        ],
        "min_keyword_matches": 3,
        "description": "Billing dispute - must acknowledge error, apologize, promise refund with timeline, provide case reference",
    },
    {
        "id": "m003",
        "subject": "Feature request: Dark mode",
        "body": "Hello! I've been a loyal customer for 2 years and absolutely love the product. It would be amazing if you could add a dark mode option. Many apps have this now and it would really help with eye strain. Thank you for considering this!",
        "sender": "mike.jones@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 120,
        "required_keywords": [
            "thank",
            "feedback",
            "team",
            "consider",
            "appreciate",
            "future",
        ],
        "min_keyword_matches": 2,
        "description": "Feature request - must thank customer, acknowledge feedback, explain product review process",
    },
    {
        "id": "m004",
        "subject": "Account locked after too many login attempts",
        "body": "My account got locked after I entered the wrong password several times. I can confirm my identity β€” my registered email is lisa.r@email.com and account ID is USR-92847. Please unlock my account.",
        "sender": "lisa.r@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 35,
        "required_keywords": [
            "unlock",
            "account",
            "verify",
            "identity",
            "secure",
            "minutes",
        ],
        "min_keyword_matches": 3,
        "description": "Account unlock - must verify identity, explain unlock process, give time estimate, add security note",
    },
    {
        "id": "m005",
        "subject": "Dashboard is extremely slow to load",
        "body": "For the past two days the main dashboard takes over 30 seconds to load. I've tried different browsers and networks, same result. This is affecting my daily workflow significantly.",
        "sender": "tom.w@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 50,
        "required_keywords": [
            "investigating",
            "issue",
            "team",
            "workaround",
            "status",
            "update",
        ],
        "min_keyword_matches": 2,
        "description": "Performance issue - must acknowledge the bug, mention active investigation, offer workaround or status page",
    },
    {
        "id": "m006",
        "subject": "I want to cancel my subscription",
        "body": "Hi, I'd like to cancel my subscription. I'm not using the product enough to justify the cost. My account is under emma.davis@email.com. Please confirm the cancellation and let me know if any charges are still pending.",
        "sender": "emma.davis@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 75,
        "required_keywords": [
            "cancel",
            "confirm",
            "data",
            "billing",
            "sorry",
            "feedback",
        ],
        "min_keyword_matches": 3,
        "description": "Cancellation - must confirm the request, explain data retention, clarify final billing, acknowledge with empathy",
    },
]

HARD_TASK_EMAILS = [
    {
        "id": "h001",
        "subject": "URGENT: Enterprise subscription cancelled - business disrupted",
        "body": "My enterprise subscription was cancelled without notice. This is affecting 50+ team members and all operations are halted. Account: ENT-7823. We need immediate resolution. This is a P0 incident.",
        "sender": "cto@bigcorp.com",
        "sender_tier": "vip",
        "received_minutes_ago": 3,
        "correct_category": "account",
        "correct_urgency": "high",
        "correct_action": "escalate",
        "escalation_required": True,
    },
    {
        "id": "h002",
        "subject": "Critical API failures - Production environment down",
        "body": "Our production environment is completely down due to API failures on your platform. We are losing $10,000 per hour. Need emergency support immediately. VIP contract #VIP-2291. SLA breach in 30 minutes.",
        "sender": "ops@enterprise-client.com",
        "sender_tier": "vip",
        "received_minutes_ago": 7,
        "correct_category": "technical",
        "correct_urgency": "high",
        "correct_action": "escalate",
        "escalation_required": True,
    },
    {
        "id": "h003",
        "subject": "Account compromised - unauthorized access detected",
        "body": "I believe my account has been hacked. I'm seeing login attempts from multiple foreign countries and transactions I did not authorize. Please lock my account immediately and investigate this security breach.",
        "sender": "victim@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 12,
        "correct_category": "account",
        "correct_urgency": "high",
        "correct_action": "escalate",
        "escalation_required": True,
    },
    {
        "id": "h004",
        "subject": "Charged three times this month",
        "body": "I have been charged 3 times this month instead of once. Total overcharge is $59.98. Please refund the extra charges to my card ending in 4291 as soon as possible.",
        "sender": "regular.user@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 25,
        "correct_category": "billing",
        "correct_urgency": "high",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h005",
        "subject": "Bug: data export is timing out and failing",
        "body": "The data export feature is broken β€” it runs for 30 minutes then throws a timeout error and produces no output. This started 2 days ago. I have tried smaller datasets and it still fails. This is a bug that is blocking my reporting workflow.",
        "sender": "power.user@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 45,
        "correct_category": "technical",
        "correct_urgency": "medium",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h006",
        "subject": "Change my billing date",
        "body": "Hi, I would like to change my monthly billing date from the 1st to the 15th of each month to align with my paycheck. Is this something I can do from my account settings?",
        "sender": "customer@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 90,
        "correct_category": "billing",
        "correct_urgency": "medium",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h007",
        "subject": "How do I update my profile picture?",
        "body": "Hello! I've been trying to update my profile picture but I can't find where to do it in the settings menu. Can you point me in the right direction?",
        "sender": "newuser@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 110,
        "correct_category": "general",
        "correct_urgency": "low",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h008",
        "subject": "Bulk discount inquiry for 20 additional seats",
        "body": "We are considering adding 20 more seats to our plan. Do you offer volume discounts? Please send pricing information to our procurement team at procurement@midsize-company.com.",
        "sender": "procurement@midsize-company.com",
        "sender_tier": "standard",
        "received_minutes_ago": 200,
        "correct_category": "billing",
        "correct_urgency": "medium",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h009",
        "subject": "Please add Slack integration",
        "body": "Love the product! It would be amazing if you could add a Slack integration so we get notifications directly in our workspace. Many of our team members have requested this feature.",
        "sender": "happycustomer@startup.com",
        "sender_tier": "standard",
        "received_minutes_ago": 300,
        "correct_category": "feature_request",
        "correct_urgency": "low",
        "correct_action": "archive",
        "escalation_required": False,
    },
    {
        "id": "h010",
        "subject": "WIN $1000 AMAZON GIFT CARD - LIMITED TIME",
        "body": "YOU HAVE BEEN SELECTED!!! CLICK HERE TO WIN A $1000 AMAZON GIFT CARD!!! LIMITED TIME ONLY!!! ACT NOW BEFORE IT EXPIRES!!!",
        "sender": "winner@spam-central.biz",
        "sender_tier": "standard",
        "received_minutes_ago": 1,
        "correct_category": "spam",
        "correct_urgency": "low",
        "correct_action": "archive",
        "escalation_required": False,
    },
    {
        "id": "h011",
        "subject": "CRITICAL: Data breach suspected on our enterprise account",
        "body": "We have detected unusual data access patterns on our enterprise account ENT-1142. Sensitive customer records may have been exposed. This is a potential data breach β€” we need your security team involved immediately.",
        "sender": "ciso@another-bigcorp.com",
        "sender_tier": "vip",
        "received_minutes_ago": 5,
        "correct_category": "account",
        "correct_urgency": "high",
        "correct_action": "escalate",
        "escalation_required": True,
    },
    {
        "id": "h012",
        "subject": "2FA verification codes not being accepted",
        "body": "The 6-digit codes from my authenticator app are being rejected at login. I can still receive backup codes by email. Please advise on how to re-sync my authenticator or switch to a backup login method.",
        "sender": "user12@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 30,
        "correct_category": "technical",
        "correct_urgency": "high",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h013",
        "subject": "Invoice request for March payment β€” no rush",
        "body": "Could you please resend the invoice for my March subscription payment? I need it for my annual tax filing which is not due for another two months. Account ID: USR-77312. There is no urgency, just whenever convenient.",
        "sender": "finance@smallbiz.com",
        "sender_tier": "standard",
        "received_minutes_ago": 150,
        "correct_category": "billing",
        "correct_urgency": "low",
        "correct_action": "respond",
        "escalation_required": False,
    },
    {
        "id": "h014",
        "subject": "Make $5000/day working from home!!!",
        "body": "AMAZING OPPORTUNITY!!! Work from home and make $5000 PER DAY!!! No experience needed!!! Click the link to get started IMMEDIATELY!!! This offer expires TONIGHT!!!",
        "sender": "money@get-rich-fast.biz",
        "sender_tier": "standard",
        "received_minutes_ago": 4,
        "correct_category": "spam",
        "correct_urgency": "low",
        "correct_action": "archive",
        "escalation_required": False,
    },
    {
        "id": "h015",
        "subject": "Request to add mobile app support",
        "body": "Your product is great on desktop but there is no mobile app. Many of us on the go would really benefit from an iOS and Android app. Please consider adding this in a future release.",
        "sender": "mobilefan@email.com",
        "sender_tier": "standard",
        "received_minutes_ago": 400,
        "correct_category": "feature_request",
        "correct_urgency": "low",
        "correct_action": "archive",
        "escalation_required": False,
    },
]

TASK_CONFIGS = {
    "email_classification": {
        "name": "Email Classification",
        "difficulty": "easy",
        "description": (
            "Classify each incoming customer support email by category "
            "(billing/technical/general/spam/account/feature_request) and urgency (high/medium/low). "
            "Use action_type='classify' with the category and urgency fields."
        ),
        "max_steps": 15,
        "emails": EASY_TASK_EMAILS,
    },
    "response_drafting": {
        "name": "Response Drafting",
        "difficulty": "medium",
        "description": (
            "Draft professional responses to customer support emails. "
            "Each response must address the customer's specific issue, include required information, "
            "and maintain an empathetic and helpful tone. "
            "Use action_type='respond' with a complete response in the response_text field."
        ),
        "max_steps": 10,
        "emails": MEDIUM_TASK_EMAILS,
    },
    "support_session": {
        "name": "Full Support Session",
        "difficulty": "hard",
        "description": (
            "Manage a full support queue of 15 emails. "
            "VIP customers (sender_tier='vip') must be handled before standard customers. "
            "High-urgency emails take precedence over medium/low. "
            "Use escalate for security breaches, VIP incidents, and complex issues. "
            "Use archive for spam and feature requests. "
            "Use respond for standard questions and billing issues. "
            "Provide category and urgency in every action for full scoring. "
            "Specify email_id to choose which email to process."
        ),
        "max_steps": 40,
        "emails": HARD_TASK_EMAILS,
    },
}