Freakdivi/HelpDesk
UPI Banking Support Environment
OpenEnv-style environment for evaluating agents on UPI customer support workflows. The benchmark focuses on realistic banking support decisions rather than generic FAQ matching.
Motivation
This environment is designed to test whether an agent can behave like a safe and useful support assistant for a UPI payments product such as Paytm, PhonePe, or Google Pay style support flows.
The goal is not only to answer customers correctly, but also to:
- identify the right issue type
- retrieve the right knowledge entry
- escalate fraud or overdue review cases when needed
- avoid unsafe behavior such as asking for PINs or OTPs
- handle multi-turn conversations before closing a case
Environment Description
The environment uses three tasks with increasing difficulty:
easy: classify a customer issue into the correct support trackmedium: choose the right FAQ or escalate when human/manual review is requiredhard: run a short multi-turn support conversation with clarification, guidance, and closure
The current support tracks are:
payment_failurerefund_delayfraud_complaintkyc_account_restrictionupi_pin_or_bank_linking
The dataset includes:
- 10 banking FAQ entries in knowledge_base.json
- 10
easytickets in easy.json - 10
mediumtickets in medium.json - 10
hardtickets in hard.json
Action Space
The public baseline and server currently accept the legacy action names below, which are internally mapped to the compact action model in models.py.
Internally, these are normalized to:
ask_for_detailstake_actionrespond_to_userescalate_caseclose_case
Observation Space
The model receives an Observation object from models.py.
Important evaluation detail:
- hidden gold labels such as the correct FAQ id and escalation label are not exposed to the model in the observation
Reward
Rewards are normalized to the range 0.0 to 1.0 in environment.py.
The final reward is shaped rather than purely binary. It combines:
correctnesssafetyresolutionefficiencypenalties
Weighted reward:
0.35 * correctness
+ 0.30 * safety
+ 0.20 * resolution
+ 0.15 * efficiency
+ penaltiesExamples:
- correct classification gives a strong
easyreward - correct FAQ retrieval gives partial progress on
medium - correct escalation gives reward on
medium - clarification plus guidance plus successful closure raises
hardreward - unsafe prompts such as asking for PIN or OTP reduce reward sharply
Task Difficulty
Setup
From the package root:
cd /path/to/helpdesk_env
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtUsage
Run Tests
cd /path/to/helpdesk_env
.venv/bin/python -m py_compile environment.py inference.py models.pyRun the Server
cd /path/to
PYTHONPATH=. /path/to/helpdesk_env/.venv/bin/uvicorn helpdesk_env.server.app:app --host 127.0.0.1 --port 8000Build the Docker Image
cd /path/to/helpdesk_env
docker build -t helpdesk-openenv .
docker run --rm -p 8000:8000 helpdesk-openenvUse the Python Client
from helpdesk_env.client import HelpdeskEnvClient
client = HelpdeskEnvClient("http://127.0.0.1:8000")
result = client.reset("easy")
print(result.observation.customer_message)Run Inference
cd /path/to/helpdesk_env
export GROQ_API_KEY=your_key
.venv/bin/python inference.pyOptional model override:
export LLM_MODEL=llama-3.1-8b-instant
export TASK_NAME=mediumBaseline Scores
Latest observed Groq baseline run after removing answer leakage from the observation:
Interpretation:
easyis still quite direct and can be near-perfect for strong LLMsmediumandhardare more informative because they require retrieval, escalation judgment, and multi-turn behavior
Project Structure
helpdesk_env/
├── README.md
├── Dockerfile
├── .gitignore
├── .dockerignore
├── __init__.py
├── client.py
├── data/
│ ├── knowledge_base.json
│ └── tickets/
│ ├── easy.json
│ ├── medium.json
│ └── hard.json
├── environment.py
├── inference.py
├── models.py
├── openenv.yaml
├── requirements.txt
├── graders/
│ ├── category_grader.py
│ ├── faq_grader.py
│ └── resolution_grader.py
└── server/
├── app.py
└── helpdesk_environment.py