afroimam's picture
Upload folder using huggingface_hub
1395b2e verified
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?",
},
),
),
]