pharma-agent / README.md
Arshdeep2k5
Add HF Space config to README
e0657c4
|
Raw
History Blame Contribute Delete
1.78 kB
metadata
title: PharmaAgent
emoji: πŸ’Š
colorFrom: blue
colorTo: green
sdk: docker
pinned: false

πŸ₯ PharmaAgent β€” Clinical Decision RL Environment

An OpenMV-compatible reinforcement learning environment where an agent acts as an AI clinical pharmacist, navigating a multi-step patient treatment pipeline powered by real DrugBank data.

What the Agent Does

Given a patient case (symptoms + existing medications), the agent must:

Step Action Reward
1 Diagnose β€” identify the condition from symptoms 0–0.30
2 Select drugs β€” build a safe treatment regimen 0.05–0.20 per drug
3 Check DDI β€” verify drug-drug interactions 0.05–0.30
4 Finalize β€” submit the complete regimen 0–0.30

Total possible reward per episode: 1.5 (normalized to 0–1)

Why This Is Different

  • All scoring is grounded in real DrugBank data (19,842 drugs, 500k interaction pairs) β€” no hardcoded opinions
  • Patient cases are generated dynamically from the database β€” the agent cannot memorize them
  • The LLM is called only once per episode, at the end, purely to format a human-readable summary β€” it has zero influence on any reward
  • Penalizes dangerous drug combinations using DrugBank's own severity classifications

API Endpoints

Method Path Description
POST /reset Start new episode
POST /step?session_id=X Take an action
GET /state?session_id=X Get session state
GET /health Health check
GET /web Browser UI for manual testing

Stack

  • FastAPI + SQLite (DrugBank)
  • Qwen 2.5 72B via HuggingFace Inference Router (agent)
  • Groq Llama 3.3 70B (summary formatter only)