TanujInsane
chore: add hugingface spaces frontmatter to README
f5d5ab8
|
Raw History Blame Contribute Delete
2.96 kB
---
title: Document Classification Env
emoji: πŸ“„
colorFrom: blue
colorTo: green
sdk: docker
app_file: app.py
pinned: false
---
# 🌌 Void Walkers: Intelligent Routing Environment
**A premium, Gymnasium-compatible Document Classification Environment designed for AI Agentic Learning.**
---
## πŸš€ Overview
Void Walkers represents a state-of-the-art **Partially Observable Markov Decision Process (POMDP)** where agents learn to classify, route, and interact with complex customer support payloads. Unlike static datasets, this environment enforces real-world constraints: **SLA Time Pressure**, **Processing Costs**, and **Tool-Mediated Metadata Retrieval**.
### 🌟 Key Enhancements (v1.1)
- **Synchronized Category Space**: Standardized 22 fine-grained categories across the environment, agent, and spec.
- **Dynamic Reward Architecture**: Implemented real-time Speed Bonuses and Resource Costs in the `step()` loop.
- **Rich State API**: Deep telemetry including `action_history` and `reward_history` for diagnostic observability.
- **Live RL Training**: Integrated PyTorch-based Reinforcement Learning loop demonstrating agent improvement over time.
---
## πŸ› οΈ System Architecture
### 1. Environment: `DocumentClassificationEnv`
The core logic resides in `environment.py`, implementing the standard `step()`, `reset()`, and `state()` API.
- **Obs Space**: Dictionary containing raw `content`, `features` (100d), `urgency`, and `sla_remaining`.
- **Action Space**: Discrete(24) β€” 22 labels + 2 tools (`Request Metadata`, `Escalate`).
- **Reward Function**:
$$R = \text{Accuracy} + \text{Speed Bonus} - \text{SLA Penalty} - \text{Processing Cost}$$
### 2. Agent: `TicketAgent`
A hybrid intelligence system:
- **Baseline**: TF-IDF + Logistic Regression (pre-trained).
- **RL Agent**: A neural policy that learns to map features to categories based on environment feedback.
---
## πŸ“ˆ Benchmarks & Learning
| Metric | Target (Easy) | Target (Hard) |
| :--- | :--- | :--- |
| **Accuracy** | 95%+ | 30%+ (High Entropy) |
| **SLA Compliance** | 100% | >85% |
| **Latency** | <50ms | <1.0s |
---
## πŸ“– Quick Start
### 1. Initialize Sandbox
```python
from environment import DocumentClassificationEnv
env = DocumentClassificationEnv(task_difficulty="medium")
obs, info = env.reset()
```
### 2. Execute Action
```python
action = 1 # "Billing"
obs, reward, done, truncated, info = env.step(action)
```
### 3. Observe State
```python
telemetry = env.state()
print(f"Total Reward: {telemetry['total_reward']}")
```
---
## πŸ–₯️ UI & Visualization
Run the Gradio dashboard for interactive testing:
```bash
python app.py
```
*Navigate to the **Reinforcement Learning** tab to witness the neural training sequence.*
---
## πŸ“œ Documentation & Spec
Full specifications are defined in [openenv.yaml](./openenv.yaml). This project adheres to the **OpenEnv v1.0 Standard**.
**Developed for Advanced AI Agentic Coding Research.**