Update README.md
Browse files
README.md
CHANGED
|
@@ -1,143 +1,156 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: RecallTrace OpenEnv
|
| 3 |
-
emoji: π¨
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: blue
|
| 6 |
-
sdk: docker
|
| 7 |
-
app_port: 7860
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# π RecallTrace OpenEnv
|
| 11 |
-
|
| 12 |
-
RecallTrace is a **real-world AI environment** designed for **product recall tracing and precision containment**.
|
| 13 |
-
|
| 14 |
-
It simulates how companies handle:
|
| 15 |
-
- contaminated product recalls
|
| 16 |
-
- supply chain tracing
|
| 17 |
-
- selective quarantine decisions
|
| 18 |
-
|
| 19 |
-
This environment evaluates **agent reasoning + decision-making**, not just correctness.
|
| 20 |
-
|
| 21 |
-
---
|
| 22 |
-
|
| 23 |
-
# π§ What This Environment Does
|
| 24 |
-
|
| 25 |
-
Given a recall notice (e.g., *"Lot A is contaminated"*), the agent must:
|
| 26 |
-
|
| 27 |
-
1. Trace where the product went
|
| 28 |
-
2. Identify affected nodes (warehouses, stores)
|
| 29 |
-
3. Handle relabeling / transformations
|
| 30 |
-
4. Quarantine **only unsafe inventory**
|
| 31 |
-
5. Avoid blocking safe stock
|
| 32 |
-
6. Notify affected entities
|
| 33 |
-
7. Finalize with correct containment
|
| 34 |
-
|
| 35 |
-
---
|
| 36 |
-
|
| 37 |
-
# π― Why This Is Important
|
| 38 |
-
|
| 39 |
-
This is a **real industry problem** seen in:
|
| 40 |
-
- food recalls
|
| 41 |
-
- pharma defects
|
| 42 |
-
- logistics failures
|
| 43 |
-
|
| 44 |
-
Challenges include:
|
| 45 |
-
- Graph traversal
|
| 46 |
-
- Partial observability
|
| 47 |
-
- Lot transformations
|
| 48 |
-
- Mixed inventory reasoning
|
| 49 |
-
- Precision decision-making
|
| 50 |
-
|
| 51 |
-
---
|
| 52 |
-
|
| 53 |
-
# π§© Tasks (Scenarios)
|
| 54 |
-
|
| 55 |
-
## πΉ Easy β Direct Recall
|
| 56 |
-
- Single contaminated lot
|
| 57 |
-
- Straight supply chain
|
| 58 |
-
- Goal: trace and quarantine correctly
|
| 59 |
-
|
| 60 |
-
---
|
| 61 |
-
|
| 62 |
-
## πΉ Medium β Relabeled Inventory
|
| 63 |
-
- Lot gets renamed (LotA β LotA1)
|
| 64 |
-
- Goal: track transformations and quarantine
|
| 65 |
-
|
| 66 |
-
---
|
| 67 |
-
|
| 68 |
-
## πΉ Hard β Mixed Inventory
|
| 69 |
-
- Contaminated + safe stock mixed
|
| 70 |
-
- Goal: isolate unsafe quantity **without over-blocking**
|
| 71 |
-
|
| 72 |
-
---
|
| 73 |
-
|
| 74 |
-
# βοΈ Action Space
|
| 75 |
-
|
| 76 |
-
| Action | Description |
|
| 77 |
-
|------|------------|
|
| 78 |
-
| inspect_node | View inventory at a node |
|
| 79 |
-
| trace_lot | Follow product lineage |
|
| 80 |
-
| quarantine | Block unsafe stock |
|
| 81 |
-
| notify | Inform affected nodes |
|
| 82 |
-
| finalize | End task |
|
| 83 |
-
|
| 84 |
-
---
|
| 85 |
-
|
| 86 |
-
# π¦ Observation Structure
|
| 87 |
-
|
| 88 |
-
Each step returns:
|
| 89 |
-
|
| 90 |
-
- recall_notice
|
| 91 |
-
- inventory
|
| 92 |
-
- action history
|
| 93 |
-
- trace results
|
| 94 |
-
- inspection data
|
| 95 |
-
|
| 96 |
-
---
|
| 97 |
-
|
| 98 |
-
# π Reward & Grading
|
| 99 |
-
|
| 100 |
-
### Reward System
|
| 101 |
-
- + Correct tracing
|
| 102 |
-
- + Correct quarantine
|
| 103 |
-
- + Correct notification
|
| 104 |
-
- β Wrong node
|
| 105 |
-
- β Over-quarantine
|
| 106 |
-
- β Missed unsafe stock
|
| 107 |
-
|
| 108 |
-
---
|
| 109 |
-
|
| 110 |
-
### Final Score
|
| 111 |
-
Range: **0.0 β 1.0**
|
| 112 |
-
|
| 113 |
-
Based on:
|
| 114 |
-
- accuracy
|
| 115 |
-
- precision
|
| 116 |
-
- efficiency
|
| 117 |
-
|
| 118 |
-
---
|
| 119 |
-
|
| 120 |
-
# π§± Project Structure
|
| 121 |
-
|
| 122 |
-
```bash
|
| 123 |
-
recalltrace-openenv/
|
| 124 |
-
β
|
| 125 |
-
βββ env/ # Environment logic
|
| 126 |
-
β βββ env.py
|
| 127 |
-
β βββ __init__.py
|
| 128 |
-
β
|
| 129 |
-
βββ scenario/ # Scenario generation
|
| 130 |
-
β βββ scenario.py
|
| 131 |
-
β
|
| 132 |
-
βββ grader/ # Evaluation + reward
|
| 133 |
-
β βββ grader.py
|
| 134 |
-
β
|
| 135 |
-
βββ inference/ # Agent simulation
|
| 136 |
-
β βββ inference.py
|
| 137 |
-
β
|
| 138 |
-
βββ config/
|
| 139 |
-
β βββ openenv.yaml
|
| 140 |
-
β
|
| 141 |
-
βββ Dockerfile
|
| 142 |
-
βββ requirements.txt
|
| 143 |
-
βββ README.md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: RecallTrace OpenEnv
|
| 3 |
+
emoji: π¨
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# π RecallTrace OpenEnv
|
| 11 |
+
|
| 12 |
+
RecallTrace is a **real-world AI environment** designed for **product recall tracing and precision containment**.
|
| 13 |
+
|
| 14 |
+
It simulates how companies handle:
|
| 15 |
+
- contaminated product recalls
|
| 16 |
+
- supply chain tracing
|
| 17 |
+
- selective quarantine decisions
|
| 18 |
+
|
| 19 |
+
This environment evaluates **agent reasoning + decision-making**, not just correctness.
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# π§ What This Environment Does
|
| 24 |
+
|
| 25 |
+
Given a recall notice (e.g., *"Lot A is contaminated"*), the agent must:
|
| 26 |
+
|
| 27 |
+
1. Trace where the product went
|
| 28 |
+
2. Identify affected nodes (warehouses, stores)
|
| 29 |
+
3. Handle relabeling / transformations
|
| 30 |
+
4. Quarantine **only unsafe inventory**
|
| 31 |
+
5. Avoid blocking safe stock
|
| 32 |
+
6. Notify affected entities
|
| 33 |
+
7. Finalize with correct containment
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
# π― Why This Is Important
|
| 38 |
+
|
| 39 |
+
This is a **real industry problem** seen in:
|
| 40 |
+
- food recalls
|
| 41 |
+
- pharma defects
|
| 42 |
+
- logistics failures
|
| 43 |
+
|
| 44 |
+
Challenges include:
|
| 45 |
+
- Graph traversal
|
| 46 |
+
- Partial observability
|
| 47 |
+
- Lot transformations
|
| 48 |
+
- Mixed inventory reasoning
|
| 49 |
+
- Precision decision-making
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
# π§© Tasks (Scenarios)
|
| 54 |
+
|
| 55 |
+
## πΉ Easy β Direct Recall
|
| 56 |
+
- Single contaminated lot
|
| 57 |
+
- Straight supply chain
|
| 58 |
+
- Goal: trace and quarantine correctly
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## πΉ Medium β Relabeled Inventory
|
| 63 |
+
- Lot gets renamed (LotA β LotA1)
|
| 64 |
+
- Goal: track transformations and quarantine
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## πΉ Hard β Mixed Inventory
|
| 69 |
+
- Contaminated + safe stock mixed
|
| 70 |
+
- Goal: isolate unsafe quantity **without over-blocking**
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
# βοΈ Action Space
|
| 75 |
+
|
| 76 |
+
| Action | Description |
|
| 77 |
+
|------|------------|
|
| 78 |
+
| inspect_node | View inventory at a node |
|
| 79 |
+
| trace_lot | Follow product lineage |
|
| 80 |
+
| quarantine | Block unsafe stock |
|
| 81 |
+
| notify | Inform affected nodes |
|
| 82 |
+
| finalize | End task |
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
# π¦ Observation Structure
|
| 87 |
+
|
| 88 |
+
Each step returns:
|
| 89 |
+
|
| 90 |
+
- recall_notice
|
| 91 |
+
- inventory
|
| 92 |
+
- action history
|
| 93 |
+
- trace results
|
| 94 |
+
- inspection data
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
# π Reward & Grading
|
| 99 |
+
|
| 100 |
+
### Reward System
|
| 101 |
+
- + Correct tracing
|
| 102 |
+
- + Correct quarantine
|
| 103 |
+
- + Correct notification
|
| 104 |
+
- β Wrong node
|
| 105 |
+
- β Over-quarantine
|
| 106 |
+
- β Missed unsafe stock
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
### Final Score
|
| 111 |
+
Range: **0.0 β 1.0**
|
| 112 |
+
|
| 113 |
+
Based on:
|
| 114 |
+
- accuracy
|
| 115 |
+
- precision
|
| 116 |
+
- efficiency
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
# π§± Project Structure
|
| 121 |
+
|
| 122 |
+
```bash
|
| 123 |
+
recalltrace-openenv/
|
| 124 |
+
β
|
| 125 |
+
βββ env/ # Environment logic
|
| 126 |
+
β βββ env.py
|
| 127 |
+
β βββ __init__.py
|
| 128 |
+
β
|
| 129 |
+
βββ scenario/ # Scenario generation
|
| 130 |
+
β βββ scenario.py
|
| 131 |
+
β
|
| 132 |
+
βββ grader/ # Evaluation + reward
|
| 133 |
+
β βββ grader.py
|
| 134 |
+
β
|
| 135 |
+
βββ inference/ # Agent simulation
|
| 136 |
+
β βββ inference.py
|
| 137 |
+
β
|
| 138 |
+
βββ config/
|
| 139 |
+
β βββ openenv.yaml
|
| 140 |
+
β
|
| 141 |
+
βββ Dockerfile
|
| 142 |
+
βββ requirements.txt
|
| 143 |
+
βββ README.md
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
## π Baseline Scores
|
| 149 |
+
|
| 150 |
+
| Task | Difficulty | Score |
|
| 151 |
+
|------|------------|-------|
|
| 152 |
+
| phase1_direct_recall | Easy | 0.72 |
|
| 153 |
+
| phase2_relabel_recall | Medium | 0.51 |
|
| 154 |
+
| phase3_mixed_shipments | Hard | 0.34 |
|
| 155 |
+
|
| 156 |
+
Average baseline score: **0.52**
|