DrugGPT is an AI-powered system designed to assist clinicians and patients by providing personalized treatment recommendations using Large Language Models (LLM) and retrieval-augmented generation (RAG) architecture. The system emphasizes privacy protection, evidence-based recommendations, and efficient deployment.
- Privacy-First Architecture: Utilizes RAG to protect patient data by converting sensitive clinical information into embeddings before LLM interaction
- Evidence-Based Recommendations: Integrates similar historical cases to provide treatment suggestions with transparent reasoning
- Efficient Deployment: Uses small and open-source LLaMA-3.2 1B model for fast response times and privacy assurance [Update: We changed to llama-7B]
- User-Friendly Interface: Built with Streamlit for easy interaction and clear presentation of recommendations
.
├── .devcontainer/ # Development container configuration
├── app/ # Application demo files
├── data/ # The MIMIC dataset is not public accessible
├── scripts/ # Utility scripts
└── src/ # Source codepoint, modules
- Base Model: LLaMA-3.2-1B/7B for reasoning and medical domain tasks
- Embeddings: ClinicalBERT for medical text understanding
- Vector Database: FAISS for efficient similarity retrieval
- Framework: Streamlit for web interface
The system uses the MIMIC-III dataset (46,520 ICU patients) with the following preprocessing steps:
- Text standardization
- Key element extraction (diagnoses, medications)
- Data structuring and unification
- Train-test split (97% train, 3% test)
- Permission of MIMIC dataset
- Python 3.x
- FAISS
- Streamlit
- LLaMA model
- ClinicalBERT
- Clone the repository:
git clone https://github.com/yourusername/DrugGPT.git
cd DrugGPT
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
The system accepts the following patient information:
- Age Group
- Gender
- Diagnosis
- Current Medications
- Clinical History
After submission, the system provides:
- Medication suggestions with rationale
- Monitoring recommendations
- Similar cases analysis for reference
- Fine-tuning LLaMA-3.2 1B
- Migration to LLaMA-2 7B
- Enhanced similarity scoring
- System validation with clinician feedback
- Baseline: Zero-shot prompt comparison with other LLMs
- Test Dataset: 3% of MIMIC-III data (approximately 100 patients)
- Performance Metrics:
- Correctness against established medical guidelines
- Computational cost analysis
- Token usage efficiency
This project is licensed under the LICENSE file in the repository.
- Yuning Zheng @Igemirecle
- Mercury Liu @Europix
Carnegie Mellon University - School of Computer Science