PrescriptionIQ 💊
Smarter Answers. Safer Prescriptions.
PrescriptionIQ is an AI-powered assistant for pharmacists, patients, and caregivers that ensures safer medication usage. It provides instant, explainable answers to drug-related queries, suggests follow-up questions, cites credible sources, and now includes a smart dosage alert system that notifies users and family members when unsafe medication practices are detected.
🧠 Inspiration
Navigating drug labels is confusing, especially for elderly patients or those managing multiple prescriptions. Mistakes in dosage and interactions can be fatal. As students and developers passionate about healthcare and AI, we wanted to create a solution that empowers people to safely manage medications using reliable, real-time answers.
⚙️ What it does
- Answers questions about medications, dosages, side effects, contraindications, and interactions using FDA data.
- Retrieves and displays related PubMed research papers.
- Suggests follow-up questions to deepen understanding.
- Allows users to view specific source content via toggle buttons for better transparency.
- Automatically removes confusing code snippets or "copy buttons" from answers.
- Notifies caregivers/family members when unsafe dosages are entered, using a smart notification system.
🛠️ How we built it
- Frontend/UI: Chainlit for the chat interface with custom button actions and markdown formatting.
- LLM: OpenAI's GPT-3.5 Turbo for question-answering and suggestion generation.
- Retrieval: FDA drug label data parsed, chunked with LangChain’s
RecursiveCharacterTextSplitter, and indexed into Qdrant vector store. - Embeddings: OpenAI’s
text-embedding-3-small. - Data Source: OpenFDA Drug Label and PubMed
- Notifications: A rule-based system triggers alerts when known overdose thresholds or interaction warnings are violated. (Simulated currently.)
- Dev Stack: Python, LangChain, Chainlit, Qdrant, Biopython, dotenv, pandas.
🧱 Challenges we ran into
- Rendering long source content cleanly inside Chainlit without cluttering the UI.
- Managing markdown properly to avoid accidental display of "code blocks."
- Tuning OpenAI prompts to ensure clarity and non-hallucinated answers.
- Building dynamic message updates in Chainlit with limited documentation.
- Simulating real-time notifications in a static environment.
🏆 Accomplishments that we're proud of
- Clean and responsive chat UI with expandable source visibility.
- Integrated a real-time research paper search using PubMed's API.
- Prevented AI hallucination by requiring cited document grounding.
- Created a smart notification feature for medication safety alerts.
- Achieved 2D and 3D visualization of drug embeddings using PCA and t-SNE.
📚 What we learned
- Fine-tuning prompt templates and memory chains is essential for clarity.
- Building safe AI isn't just about good outputs—it's about trustworthy outputs.
- Chainlit makes it surprisingly fast to prototype conversational UIs.
- Qdrant is very developer-friendly for handling semantic search tasks.
- PubMed integration via Entrez requires setting an email or the API calls may be throttled.
🚀 What's next for PrescriptionIQ
- ✅ Push alerts to caregivers/family via email/SMS.
- 🛡️ Add clinical guidelines and black-box warnings.
- 🌐 Support multilingual queries.
- 🤝 Integrate with pharmacy software or apps for real-time medication reconciliation.
- 📱 Build a mobile-first app version.
- 🧬 Incorporate patient genomics data for personalized drug advice.
🔗 Citations and Data Sources
- [OpenFDA Drug Label Dataset]
- [PubMed & Entrez]
- [Biopython Entrez Module]
- [Qdrant Vector Database]
- [LangChain Framework]
- [Chainlit UI Framework]
- [OpenAI GPT-3.5 API]
Made with ❤️ and a dose of curiosity.
Log in or sign up for Devpost to join the conversation.