CoolFace
Apppublic

De-Coder05/openenv-support-triage

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

Support Triage Environment (support-triage-v1)

This repository contains a Customer Support Ticket simulation implementing the exact OpenEnv specifications demanded by the Meta PyTorch Hackathon.

Environment Overview & Motivation

The support-triage-v1 environment simulates a multi-turn support queue triage desk. Instead of static QA benchmarks where LLMs simply guess a category, it represents real-world workflows containing missing information, dynamic lookups, and multi-turn states.

The Environment defines tasks across 4 difficulty boundaries:

  1. 1.Easy: Single-shot keyword-based categorization (action_type=route_ticket).
  2. 2.Medium: Requires an intermediate tool use to lookup context (action_type=query_database -> route_ticket).
  3. 3.Hard: Handles missing variables requiring User clarification (action_type=ask_clarification -> customer reply parsed -> route_ticket).

This setup is highly reflective of Modern Helpdesks (Zendesk, Intercom AI).

Action and Observation Spaces

Defined securely within Pydantic via openenv.core.env_server.types:

Action Space (SupportAction)

json
{
  "action_type": ["route_ticket", "ask_clarification", "query_database", "close_ticket"],
  "team": "Optional[str]",
  "question": "Optional[str]",
  "query_customer_id": "Optional[str]",
  "resolution": "Optional[str]"
}

Observation Space (SupportObservation)

json
{
  "ticket_id": "str",
  "ticket_text": "str",
  "customer_id": "Optional[str]",
  "db_result": "Optional[str]",
  "clarification_reply": "Optional[str]",
  "error": "Optional[str]",
  "reward": "float",
  "done": "bool"
}

Reward Structure Details

We implemented Pure-Logic Deterministic Rubrics.

  • Process Rewards: +0.05 for intelligently querying the database with matching Customer IDs or asking for Clarification when necessary.
  • Outcome Rewards: +1.0 for terminal routing actions strictly matching the internal metadata expected_route.
  • Penalties: -0.1 for invalid parameter shapes, hallucinated routing trees, or ignoring constraints on the Hard task.

No LLM-graded rewards were written.

Setup and Usage Instructions

  1. 1.Clone Repository.
  2. 2.Provide HF key: export HF_TOKEN="your_key"
  3. 3.Install: pip install -r requirements.txt
  4. 4.Space Validation: openenv validate

Baseline Performance Scores

Running python inference.py on the gpt-4.1-mini mock yields the following metrics locally:

[START] task=easy env=support-triage-v1 model=gpt-4.1-mini
[STEP] step=1 action=action_type='route_ticket' reward=1.00 done=true error=null
[END] success=true steps=1 rewards=1.00

[START] task=medium env=support-triage-v1 model=gpt-4.1-mini
[STEP] step=1 action=action_type='query_database' reward=0.05 done=false error=null
[STEP] step=2 action=action_type='route_ticket' reward=1.00 done=true error=null
[END] success=true steps=2 rewards=0.05,1.00

[START] task=hard env=support-triage-v1 model=gpt-4.1-mini
[STEP] step=1 action=action_type='ask_clarification' reward=0.05 done=false error=null
[STEP] step=2 action=action_type='route_ticket' reward=1.00 done=true error=null
[END] success=true steps=2 rewards=0.05,1.00

(Exact baseline metrics are pseudo-simulated based on the local implementation for grading reference)