π Pharma Dictionary Chatbot
An AI-powered chatbot for pharmaceutical terminology reference built using LangChain and RAG.
π― Project Overview This chatbot helps students, healthcare professionals, researchers, and pharmacists quickly understand pharmaceutical terms and definitions from the Pharmacy Dictionary.
π οΈ Technologies Used
- LangChain - AI framework
- HuggingFace - Free LLM (Mistral-7B)
- FAISS - Vector database
- Gradio - Web UI
- RAG - Retrieval Augmented Generation
- Sentence Transformers - Text embeddings
π Project Structure
Pharma-Chatbot/
βββ Pharma_Chatbot.ipynb # Main notebook
βββ Pharmacy Dictionary.pdf # Knowledge base
βββ requirements.txt # Dependencies
βββ README.md # Documentation
βοΈ Installation & Setup
- Clone Repository
git clone https://github.com/mahesh14-cpu/Pharma-Chatbot.git
cd Pharma-Chatbot- Install Requirements
pip install -r requirements.txt- Get HuggingFace Token
- Go to https://huggingface.co/settings/tokens
- Create a free account and generate token
- Run the Notebook
- Open
Pharma_Chatbot.ipynbin Jupyter - Add your HuggingFace token in Cell 3
- Run all cells in order
π How It Works
- PDF is loaded and split into chunks
- Chunks are converted to embeddings using Sentence Transformers
- Embeddings stored in FAISS vector database
- User question is searched in vector database
- Relevant context sent to Mistral-7B LLM
- Answer displayed in Gradio UI
π¬ Example Questions
- What is bioavailability?
- Define enteric coating
- What is pharmacokinetics?
- Explain drug absorption
π€ Author
- GitHub: @mahesh14-cpu