saisatwik1234567/OpenENV
0
π§ OpenEnv: Email Triage & Response β Peak Edition
    
Live Demo: https://saisatwik1234567-email-triage-and-response-environment.hf.space
# Run in 30 seconds
docker build -t openenv-peak . && docker run -p 7860:7860 openenv-peakπ Verified Scores
π§ Novel Technical Design
1. Synonym-Aware Keyword Grading
Unlike naive keyword matching, our grader uses synonym groups: refund β‘ reimburse β‘ credit β‘ money back β any word in the group = full credit.
2. Kendall Tau Prioritization Scoring
Mathematically rigorous rank-correlation metric: concordant_pairs / (concordant + discordant) Measures whether the agent processed urgent emails before low-priority ones.
3. Dense Shaped Rewards
Signal at EVERY step, not just episode end: reward = (grader_score - 0.5) * 0.8 with critical email penalty of -0.25.
π What Makes This Different
π Dataset: 50 Enterprise Emails
urgent ββββββββββββ 12 (24%) β P0 outages, GDPR, legal deadlines
normal βββββββββββββββ 15 (30%) β complaints, approvals, decisions
external ββββββ 6 (12%) β partners, press, conferences
internal βββββββ 7 (14%) β all-hands, IT, HR
low ββββββ 6 (12%) β newsletters, reminders
spam ββββ 4 (8%) β phishing, fake domainsβ‘ Quick Start
import httpx
BASE = "https://saisatwik1234567-email-triage-and-response-environment.hf.space"
# Reset
obs = httpx.post(f"{BASE}/reset?task_id=task_1").json()["observation"]
# Act
result = httpx.post(f"{BASE}/step?task_id=task_1", json={
"action_type": "escalate",
"email_id": "e001",
"category": "urgent",
"priority_score": 1.0,
"escalate_to": "backend-oncall"
}).json()
print(f"Reward: {result['reward']}") # +0.500
# Grade
grade = httpx.post(f"{BASE}/grader?task_id=task_1").json()
print(f"Score: {grade['episode_score']} | Grade: {grade['grade_letter']}")π API Endpoints (12 Total)
π§ͺ Test Results
17/17 tests passing
pytest tests/ -v β 17 passed in 2.3sπ License
MIT β Open source, free to use for research and evaluation.
