Skip to content

About

MediQ – AI Medical Chatbot 💊 An AI-powered medical chatbot that provides general health information using LangChain, Groq LLM, FAISS, and HuggingFace embeddings. Includes safety filters for emergencies and medication queries.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MediQ – AI Health Query Chatbot

Task Objective

The goal of this project was to develop a general health query chatbot as part of the Developer’s Hub internship. The chatbot leverages a Large Language Model (LLM) to answer general health-related questions while implementing prompt engineering for clear, friendly responses and safety filters to prevent harmful medical advice.


Dataset Used

  • Medical PDF documents stored locally in the data/ directory.
  • These PDFs were used to build a knowledge base, which the chatbot references via a Retrieval-Augmented Generation (RAG) pipeline.
  • Text from PDFs is split into manageable chunks and embedded using HuggingFace sentence embeddings (all-MiniLM-L6-v2) for efficient retrieval with FAISS.

Models Applied

  • Language Model: Groq LLM (openai/gpt-oss-120b) for answering queries.
  • Embeddings Model: sentence-transformers/all-MiniLM-L6-v2 from HuggingFace.
  • Vector Store: FAISS for storing and retrieving chunk embeddings.
  • Pipeline: LangChain for building the RAG-based conversational agent.

Key Results and Findings

  • The chatbot is able to answer general health questions such as:
    • “What are the common symptoms of diabetes?”
    • “Is paracetamol safe for children?”
  • Safety filters successfully detect emergencies (e.g., heart attack, stroke) and risky medication queries, providing appropriate guidance instead of direct medical advice.
  • Integration of PDF knowledge base with the LLM enables context-aware responses supported by sources.
  • Built using Streamlit, the chatbot offers an interactive UI with quick-question buttons and real-time chat.

Getting Started

  1. Clone the repository:
    git clone https://github.com/SyedaAttiraHashmi/AI-ML-Internship-Task1-Health-Query-Chatbot.git
    

Install dependencies: pip install -r requirements.txt • Set your GROQ_API_KEY in a .env file. • Run the Streamlit app: streamlit run app.py

About

MediQ – AI Medical Chatbot 💊 An AI-powered medical chatbot that provides general health information using LangChain, Groq LLM, FAISS, and HuggingFace embeddings. Includes safety filters for emergencies and medication queries.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages