Inspiration
People often need simple medicine guidance such as how to store a medicine, what to do when a prescription is unclear, or whether a symptom may require urgent attention but they may not be able to immediately reach a pharmacist.
At the same time, generic AI chatbots can sound confident even when they do not have enough information. In medication-related situations, a confident but unsupported answer can be unsafe.
We were inspired to build Pharma Saathi as a responsible alternative: an AI Stand-In that represents a real pharmacist’s approved knowledge, communication style, and safety boundaries. Instead of trying to answer everything, Pharma Saathi is designed to know when to answer, when to ask for clarification, and when to direct the user to a real pharmacist, doctor, or emergency service.
What it does
Pharma Saathi is a text-based AI medication-information assistant built around pharmacist-approved knowledge and doctor-reviewed safety rules.
It can help users with limited, general medication-safety questions such as:
Understanding whether a prescription or dose is unclear.
General medicine storage guidance.
Expiry, damaged packaging, and missing-label safety.
Medicine-sharing risks.
General questions about side effects.
Interaction-related questions that require further information.
Antibiotic safety reminders.
Explaining medical terms in simpler English, Urdu, or Roman Urdu.
The system does not diagnose diseases, prescribe medicines, guess doses, recommend unapproved substitutes, or replace a qualified pharmacist or doctor.
For high-risk situations, it escalates instead of guessing. For example:
text Known, approved, low-risk information → Answer
Important information missing → Clarify
High-risk or restricted topic → Escalate to pharmacist/doctor
Emergency red flag → Immediate emergency response If a user reports breathing difficulty, chest pain, facial swelling, severe rash, unconsciousness, seizure, suspected overdose, severe bleeding, or pregnancy-related bleeding, Pharma Saathi gives a short emergency-focused response rather than normal chatbot counselling.
How we built it
We built Pharma Saathi as a full-stack web application with a safety-first Retrieval-Augmented Generation, or RAG, approach.
Instead of fine-tuning a model on uncontrolled medical data, we structured pharmacist interview answers and doctor-reviewed safety rules into a knowledge base. Each knowledge item includes:
Topic and category.
Trigger phrases.
Approved response.
Risk level.
Required user information.
Action type: answer, clarify, escalate, or emergency.
Source reference.
Pharmacist/doctor approval status.
Public-demo access status.
The application flow is:
text User question → Input validation → Emergency safety detection → Approved knowledge retrieval → AI response grounded in retrieved context → Structured-output validation → Answer with source, limitation, or escalation We focused on keeping the AI bounded. If relevant approved knowledge is unavailable, Pharma Saathi does not invent an answer. It asks a focused clarifying question or recommends contact with a qualified professional.
We also designed the interface to support English, Urdu, and Roman Urdu, making medication guidance easier to understand for a wider range of users.
Challenges we ran into The biggest challenge was balancing usefulness with safety.
Healthcare-related questions are not like ordinary chatbot questions. A system cannot safely guess a dose from unclear handwriting, diagnose a condition, or casually recommend a medicine substitute. We had to carefully define what the system could answer and what it must escalate.
Other challenges included:
Converting long pharmacist interviews into clean, structured, source-linked knowledge items.
Separating general public information from high-risk expert-review-only topics.
Designing emergency detection rules that run before AI generation.
Preventing hallucinations by requiring answers to be grounded in approved knowledge.
Supporting Roman Urdu while keeping medical language understandable and professional.
Avoiding collection of unnecessary personal or patient information.
Building a demo that remains useful even if an AI provider or internet connection fails.
Accomplishments that we're proud of We are proud that Pharma Saathi is not positioned as “an AI doctor.”
Instead, it is a transparent and responsible AI Stand-In with clear boundaries. Our key accomplishments include:
Creating an expert-approved pharmacist knowledge structure.
Adding doctor-reviewed emergency and escalation rules.
Designing a source-linked RAG workflow.
Implementing emergency-first logic for high-risk symptoms.
Building clear answer, clarification, escalation, and emergency routes.
Supporting patient-friendly English, Urdu, Roman Urdu and in every language communication.
Adding explainability through source references and limitations.
Designing an expert-review workflow where responses can be marked:
Agree.
Disagree.
Should have escalated.
Ensuring the system can honestly say:
“I cannot safely confirm this from the available information.”
What we learned
This project taught us that building responsible AI is not only about connecting an LLM API.
We learned:
Good AI systems need carefully defined scope and boundaries.
A smaller, expert-approved knowledge base can be safer than a broad but uncontrolled chatbot.
RAG is useful because knowledge can be updated without retraining the whole model.
Emergency and high-risk rules should be deterministic and run before generative AI.
Human review is essential for evaluating healthcare-related AI responses.
Source references, limitations, and escalation behavior build trust.
A system that refuses unsafe requests can be more valuable than one that always tries to answer.
Simple language and multilingual support matter for real-world accessibility.
Pharma Saathi’s core idea is simple:
A trustworthy AI assistant is not one that answers every question it is one that knows when a real professional must take over.
Built With
- ai
- api
- css
- engineering
- gemini
- generative
- groq
- healthcare
- healthtech
- json
- llm
- next.js
- openai
- pharmacy
- postgresql
- prompt
- rag
- react
- rest
- supabase
- tailwind
- typescript
- vercel
- zod
Log in or sign up for Devpost to join the conversation.