Spaces:
Sleeping
Sleeping
File size: 5,272 Bytes
2930dae a3c6db2 2930dae a3c6db2 2930dae a3c6db2 2930dae a3c6db2 2930dae a3c6db2 2930dae a3c6db2 2930dae | 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 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 | name: SupportEnv
version: "1.0.0"
description: >
An OpenEnv-compliant customer support ticket triage environment for SaaS platforms.
Agents learn to classify tickets, extract structured information, and generate
professional resolutions — skills directly transferable to real-world support automation.
domain: customer_support
tags:
- openenv
- customer-support
- nlp
- information-extraction
- classification
- generation
- real-world
license: MIT
author: SupportEnv Contributors
# -------------------------------------------------
# Environment interface
# -------------------------------------------------
interface:
reset:
method: POST
path: /reset
request:
task_id: string # task1 | task2 | task3
ticket_index: integer # optional, 0-4
response: Observation
step:
method: POST
path: /step
request:
episode_id: string
action: Action
response: StepResult # {observation, reward, done, info}
state:
method: GET
path: /state
params:
episode_id: string
response: State
tasks:
method: GET
path: /tasks
response: List[TaskInfo]
grader:
method: POST
path: /grader
request:
episode_id: string
response: GraderResponse
health:
method: GET
path: /health
# -------------------------------------------------
# Typed models
# -------------------------------------------------
models:
Observation:
task_id: string
task_description: string
episode_id: string
ticket: TicketInfo
thread_history: list[dict]
available_actions: list[string]
step_number: integer
max_steps: integer
hint: string | null
TicketInfo:
ticket_id: string
subject: string
body: string
customer_tier: string # free | pro | enterprise
account_age_days: integer
previous_tickets: integer
attachments: list[string]
Action:
action_type: string # classify | extract | respond | resolve | escalate | submit
category: string | null
priority: string | null
extracted_entities: dict | null
required_actions: list[string] | null
response_text: string | null
resolution_steps: list[string] | null
escalation_team: string | null
escalation_reason: string | null
Reward:
step_reward: float
total_reward: float
explanation: string
StepResult:
observation: Observation
reward: Reward
done: boolean
info: dict
State:
task_id: string
episode_id: string
step_number: integer
max_steps: integer
done: boolean
total_reward: float
history: list[dict]
final_score: float | null
GraderResponse:
episode_id: string
task_id: string
score: float # 0.0 – 1.0
breakdown: dict[string, float]
feedback: string
# -------------------------------------------------
# Tasks
# -------------------------------------------------
tasks:
task1:
name: "Ticket Classification"
difficulty: easy
max_steps: 3
description: >
Given a customer support ticket, classify it by category
(billing | technical | account | feature_request | complaint | general)
and priority (low | medium | high | critical).
scoring:
baseline: 0.01
category_correct: 0.49
priority_correct: 0.40
efficiency: 0.09
tickets: 5
task2:
name: "Information Extraction"
difficulty: medium
max_steps: 5
description: >
Extract structured entities (account IDs, names, amounts, dates, domains)
from the ticket body and identify the list of required actions.
scoring:
baseline: 0.01
entity_coverage: 0.59
action_coverage: 0.30
no_hallucination: 0.09
tickets: 5
task3:
name: "Resolution Generation"
difficulty: hard
max_steps: 8
description: >
Generate a professional customer-facing response (response_text) and
an ordered list of resolution steps. Scored on keyword coverage,
step completeness, tone (apology, urgency, timeline), and response length.
scoring:
baseline: 0.01
keyword_coverage: 0.29
step_coverage: 0.30
tone_compliance: 0.25
length_adequate: 0.10
no_empty_steps: 0.04
tickets: 5
# -------------------------------------------------
# Reward design
# -------------------------------------------------
reward:
type: dense
step_cost: -0.02 # small cost per step (encourages efficiency)
submit_bonus: 0.05 # bonus for explicit submit action
max_step_penalty: -0.10 # penalty for exhausting max_steps
grader_bonus: up_to_1.0 # grader score (0–1) added as terminal bonus
# -------------------------------------------------
# Reproducibility
# -------------------------------------------------
reproducibility:
dataset: static # all 15 tickets are fixed, no randomisation
graders: deterministic # rule-based, no LLM judge
baseline_mode: heuristic # no API key required for reference scores
# -------------------------------------------------
# Deployment
# -------------------------------------------------
deployment:
framework: FastAPI
python: ">=3.10"
port: 7860
dockerfile: Dockerfile
huggingface_space: true
space_sdk: docker |