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

Share this project:

Updates

posted an update —

Update 1 — Project kickoff We are excited to share Pharma Saathi, an AI-powered Pharmacist Stand-In designed to provide clear, patient-friendly medication information while knowing when to involve a real pharmacist, doctor, or emergency service.

The idea started with one important question:

Can an AI assistant be helpful without pretending it knows everything?

Instead of building a generic medical chatbot, we are creating a bounded assistant based on pharmacist-approved knowledge and doctor-reviewed safety rules.

Our focus is on:

Clear medicine-information guidance.

English, Urdu, and Roman Urdu support.

Safe handling of unclear prescriptions.

Medicine storage, expiry, and missing-label guidance.

Side-effect and interaction screening.

Emergency escalation for red-flag symptoms.

Privacy-first design with no unnecessary patient data.

Update 2 — Safety-first behavior A major feature of Pharma Saathi is its escalation system.

The assistant does not guess medication doses, diagnose diseases, or recommend unapproved medicine substitutes.

For example:

text User: "My prescription dosage is not clear."

Pharma Saathi: ""The prescription is not clear. Do not guess. Please confirm with the pharmacist or doctor."" For emergency situations such as breathing difficulty, chest pain, severe allergic reaction, facial swelling, overdose, or unconsciousness, Pharma Saathi switches from regular counselling to a short, direct emergency response.

The goal is simple:

Answer when it is safe. Clarify when information is missing. Escalate when a real professional is needed.

Update 3 — Building the pharmacist knowledge base We have started converting pharmacist interview answers into a structured, source-linked knowledge base.

Each approved knowledge item includes:

json { "topic": "unclear_prescription", "risk_level": "high", "action": "escalate", "source_reference": "pharmacist_interview_part_3_q1", "approved_by": ["pharmacist", "doctor"] } This allows Pharma Saathi to retrieve relevant approved knowledge before answering instead of relying only on general AI output.

We are using a RAG-style approach so the knowledge can be reviewed, updated, and traced back to its source without retraining the entire model.

Update 4 — What we are testing next We are now testing Pharma Saathi against realistic medication-safety scenarios:

Unclear prescription instructions.

Unknown or unlabeled medicine.

Expired or damaged medicine.

Dose change requests.

Missed-dose questions.

Antibiotic early-stop questions.

Drug and herbal-product interaction questions.

Pregnancy and pediatric medication questions.

Emergency symptoms such as breathing difficulty or swelling.

Every output will be reviewed using three verdicts:

Agree — safe and correct.

Disagree — incorrect or unsafe.

Should have escalated — the system should have referred the user to a real professional.

Our goal is not to make an AI that answers every question. Our goal is to make one that responds responsibly.

Log in or sign up for Devpost to join the conversation.

Submission history