| title | Medical Triage OpenEnv |
|---|---|
| emoji | 🩺 |
| colorFrom | blue |
| colorTo | green |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
This project implements a deterministic reinforcement learning environment that simulates real-world clinical triage decision-making.
The agent is tasked with:
- Assessing patient symptoms
- Determining severity level
- Recommending the appropriate next action
Given patient data, the agent must:
-
Classify severity:
- low
- medium
- high
- emergency
-
Recommend next action:
- self_care
- visit_doctor
- urgent_care
- go_to_er
This environment supports multi-step reasoning:
- Step 1: Initial decision based on symptoms
- Step 2: Additional clinical information revealed
- Step 3: Final refined decision
This mimics real-world triage workflows.
{
"symptoms": ["chest pain"],
"duration": "30 minutes",
"age": 55,
"history": ["hypertension"],
"step": 1
}{
"severity": "emergency",
"action": "go_to_er"
}- Clear and obvious symptoms
- Direct mapping to severity and action
- Mixed symptoms and patient history
- Requires contextual reasoning
- Evolving symptoms across steps
- Requires updating decisions
- Penalizes unsafe underestimation
| Component | Reward |
|---|---|
| Correct severity | +0.4 |
| Correct action | +0.4 |
| Early correct guess | +0.1 |
| Improvement after update | +0.2 |
| Underestimation | -0.6 |
| Overestimation | -0.2 |
👉 Emphasis is placed on safety and risk-aware decisions.
Final score is normalized to 0.0 – 1.0:
- 1.0 → Perfect decision
- 0.7 → Partially correct
- 0.3 → Risky decision
- 0.0 → Unsafe outcome
A simple rule-based agent is provided:
- Uses symptom matching
- Updates decisions after new information
- Demonstrates partial reasoning capability
pip install -r requirements.txtuvicorn app.main:app --reload --port 7860http://localhost:7860/docs
docker build -t triage-env .
docker run -p 7860:7860 triage-envTypical baseline performance:
~0.55 – 0.70
Clinical triage is a high-stakes decision-making process where:
- Underestimating severity can be dangerous
- Overestimating leads to resource misuse
This environment captures these trade-offs in a safe, deterministic framework.
- Deterministic and fully testable
- Multi-step reasoning environment
- Risk-sensitive reward design
- Real-world inspired task simulation
- OpenEnv compliant
This project demonstrates how reinforcement learning environments can model real-world decision-making systems while remaining:
- Safe
- Interpretable
- Evaluatable