De-Coder05/openenv-support-triage
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:
- Easy: Single-shot keyword-based categorization (
action_type=route_ticket). - Medium: Requires an intermediate tool use to lookup context (
action_type=query_database->route_ticket). - 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)
{
"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)
{
"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
- Clone Repository.
- Provide HF key:
export HF_TOKEN="your_key" - Install:
pip install -r requirements.txt - 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)
