3v324v23 commited on
Commit
397249e
ยท
1 Parent(s): ce94f0f

Fix README metadata

Browse files
Files changed (1) hide show
  1. README.md +77 -1
README.md CHANGED
@@ -1 +1,77 @@
1
- # Customer Support AI OpenEnv API
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Customer Support AI API
3
+ emoji: A
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ # ๐ŸŽฎ AI Customer Support Simulator
11
+
12
+ A strict, deterministic RL-style environment for training and evaluating AI agents on customer support tasks.
13
+
14
+ ## ๐Ÿ—๏ธ Architecture
15
+
16
+ ```
17
+ โ”œโ”€โ”€ models.py # Core data models (Episode, StepResult, Task)
18
+ โ”œโ”€โ”€ environment.py # Strict step enforcement + fail logic
19
+ โ”œโ”€โ”€ inference.py # Rule-based agent + CLI runner
20
+ โ”œโ”€โ”€ app.py # Gradio UI
21
+ โ”œโ”€โ”€ tasks/
22
+ โ”‚ โ”œโ”€โ”€ easy_task.py # Delayed delivery complaint
23
+ โ”‚ โ”œโ”€โ”€ medium_task.py # Billing double-charge
24
+ โ”‚ โ””โ”€โ”€ hard_task.py # Angry VIP threatening legal action
25
+ โ”œโ”€โ”€ graders/
26
+ โ”‚ โ””โ”€โ”€ base_grader.py # BaseGrader + HardTaskGrader
27
+ โ””โ”€โ”€ tests/
28
+ โ””โ”€โ”€ test_cases.py # 4 mandatory test scenarios
29
+ ```
30
+
31
+ ## ๐ŸŽฏ Step Flow
32
+
33
+ **Empathy โ†’ Collect Info โ†’ Investigate โ†’ Resolution**
34
+
35
+ Each step must be completed correctly before advancing.
36
+
37
+ ## ๐Ÿ“Š Reward Formula
38
+
39
+ ```
40
+ reward = base_score + step_bonus โˆ’ penalty
41
+ ```
42
+
43
+ | Component | Value |
44
+ |---------------|--------|
45
+ | Base (correct)| 1.00 |
46
+ | Base (wrong) | 0.20 |
47
+ | Step bonus | 0.20 |
48
+ | Max per step | **1.20** |
49
+ | Episode max | **4.80** |
50
+
51
+ ## โš ๏ธ Penalties
52
+
53
+ | Trigger | Penalty |
54
+ |-------------------------------|---------|
55
+ | Wrong action in step | โˆ’0.30 |
56
+ | Repeated response | โˆ’0.20 |
57
+ | Early solution | โˆ’0.25 |
58
+ | Angry customer ignored | โˆ’0.25 |
59
+ | Generic / too-short response | โˆ’0.15 |
60
+ | Wrong assumption | โˆ’0.20 |
61
+ | Skipped step | โˆ’0.30 |
62
+
63
+ ## ๐Ÿ’ฅ Fail Conditions
64
+
65
+ - More than **3 wrong steps** across episode
66
+ - Total reward below **1.5**
67
+ - Agent stuck in loop: **3 consecutive failures** at same step
68
+ - Single-step penalty โ‰ฅ 0.80
69
+
70
+ ## ๐Ÿš€ Local Setup
71
+
72
+ ```bash
73
+ pip install -r requirements.txt
74
+ python inference.py --task all --agent rule # CLI test
75
+ python app.py # Gradio UI
76
+ python tests/test_cases.py # Run tests
77
+ ```