File size: 6,199 Bytes
1395b2e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 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 | from __future__ import annotations
from dataclasses import dataclass
from typing import Any
@dataclass(frozen=True)
class TaskSpec:
task_id: str
difficulty: str
title: str
objective: str
max_steps: int
target_ticket_id: str
required_context_ticket_ids: tuple[str, ...]
expected_priority: str
expected_category: str
expected_escalation: bool
required_reply_keywords: tuple[str, ...]
forbidden_reply_keywords: tuple[str, ...]
tickets: tuple[dict[str, Any], ...]
def get_tasks() -> list[TaskSpec]:
return [
TaskSpec(
task_id="easy_password_reset",
difficulty="easy",
title="Password reset triage",
objective=(
"Resolve customer lockout ticket by selecting correct category/priority and drafting "
"a secure response that includes a reset link workflow."
),
max_steps=10,
target_ticket_id="T-1001",
required_context_ticket_ids=(),
expected_priority="medium",
expected_category="account",
expected_escalation=False,
required_reply_keywords=("reset link", "security", "confirm", "email"),
forbidden_reply_keywords=("share your password",),
tickets=(
{
"ticket_id": "T-1001",
"subject": "Cannot log in after phone change",
"customer_tier": "pro",
"age_minutes": 33,
"content": (
"I switched phones and now MFA fails. I need urgent access to my dashboard. "
"Please help me reset safely."
),
},
{
"ticket_id": "T-1002",
"subject": "Feature request: dark mode",
"customer_tier": "free",
"age_minutes": 250,
"content": "Could you add dark mode next quarter?",
},
),
),
TaskSpec(
task_id="medium_billing_dispute",
difficulty="medium",
title="Billing dispute and partial refund",
objective=(
"Assess a duplicate charge complaint, inspect context ticket, classify correctly, "
"and draft a policy-compliant refund response."
),
max_steps=12,
target_ticket_id="T-2001",
required_context_ticket_ids=("T-2002",),
expected_priority="high",
expected_category="billing",
expected_escalation=False,
required_reply_keywords=("duplicate charge", "refund", "3-5 business days", "invoice"),
forbidden_reply_keywords=("guaranteed immediate refund",),
tickets=(
{
"ticket_id": "T-2001",
"subject": "Charged twice this month",
"customer_tier": "enterprise",
"age_minutes": 85,
"content": (
"We were charged twice for March. Finance needs confirmation and refund timeline today."
),
},
{
"ticket_id": "T-2002",
"subject": "Billing system log",
"customer_tier": "enterprise",
"age_minutes": 80,
"content": "Payment gateway shows one charge capture and one duplicate authorization hold.",
},
{
"ticket_id": "T-2003",
"subject": "Onboarding docs typo",
"customer_tier": "pro",
"age_minutes": 700,
"content": "There is a typo in page 3 of setup docs.",
},
),
),
TaskSpec(
task_id="hard_outage_incident",
difficulty="hard",
title="Incident comms under pressure",
objective=(
"Handle a potential security outage report by collecting key evidence from related tickets, "
"setting urgent escalation, and drafting a safe incident response message without over-promising."
),
max_steps=14,
target_ticket_id="T-3001",
required_context_ticket_ids=("T-3002", "T-3003"),
expected_priority="urgent",
expected_category="technical",
expected_escalation=True,
required_reply_keywords=("incident", "investigating", "status page", "escalated"),
forbidden_reply_keywords=("issue is fully resolved", "ignore this"),
tickets=(
{
"ticket_id": "T-3001",
"subject": "API returning 500 for all EU requests",
"customer_tier": "enterprise",
"age_minutes": 18,
"content": (
"Since 08:10 UTC every API call fails. We suspect a region outage and possible data inconsistency."
),
},
{
"ticket_id": "T-3002",
"subject": "SOC alert summary",
"customer_tier": "enterprise",
"age_minutes": 15,
"content": "Monitoring confirms spike in error rate and elevated auth failures in eu-west-1.",
},
{
"ticket_id": "T-3003",
"subject": "Status page draft",
"customer_tier": "enterprise",
"age_minutes": 11,
"content": "Public message should acknowledge incident, investigation, and next update ETA.",
},
{
"ticket_id": "T-3004",
"subject": "Question about annual billing",
"customer_tier": "free",
"age_minutes": 1440,
"content": "Can I switch to annual plan later?",
},
),
),
]
|