OpenEnv: Customer Support Agent Environment
Overview
This environment simulates a real-world customer support ticket management system. It is designed to train and evaluate RL agents on tasks like ticket triage (categorization), data extraction, and polite response generation.
Task Simulation
The environment represents tasks that humans perform in customer support roles:
- Categorization: Identifying the type and priority of a ticket.
- Extraction: Pulling specific data points (like Order IDs) from unstructured text.
- Response: Drafting helpful and polite replies based on knowledge base snippets.
OpenEnv Specification
This implementation fully complies with the OpenEnv interface:
- Typed Models: Uses Pydantic for Observation, Action, and Reward models.
- Standard API: Implements
step(action), reset(), and state().
- Metadata: Defined in
openenv.yaml.
Tasks and Graders
The environment includes three tasks of increasing difficulty:
- Basic Triage (Easy): Categorize a billing inquiry.
- Data Extraction (Medium): Extract Order ID and Email from a technical request.
- Complete Resolution (Hard): Generate a polite response for account recovery.
Each task has a programmatic grader that assigns a score between 0.0 and 1.0 based on accuracy and quality.
Action & Observation Spaces
Observation Space
current_ticket: Object containing ticket content and metadata.
history: List of previously completed tasks in the session.
knowledge_base_snippet: Relevant text for the current task.
Action Space
action_type: One of categorize, extract_info, respond.
category: Ticket category (billing, technical, etc.).
priority: Ticket priority (low, medium, high, urgent).
extracted_data: Dictionary of extracted fields.
response_text: The generated response string.
Setup and Usage
Local Development (Python)
- Install dependencies:
pip install -r requirements.txt
- Run baseline inference:
python inference.py
Deployment
This environment is ready for deployment on Hugging Face Spaces using the provided Dockerfile.
Baseline Performance
The provided inference.py script serves as a baseline using GPT-4o. Expected scores:
- Easy: 1.0
- Medium: 1.0
- Hard: 0.8+