RAG-Based Patient Review Question-Answering Chatbot

Retrieval-Augmented Generation (RAG) system to answer questions from patient reviews. This repository contains a Jupyter notebook that demonstrates how to build a RAG-based chatbot for answering questions based on patient reviews.

LLM & Generative AI

  • Google Gemini 2.5 Flash (Chat Model)
  • LangChain (Prompt templates, Runnables, Chains)
  • Google Generative AI Embeddings (gemini-embedding-001)

Vector Database

  • ChromaDB (persistent vector store)
  • Similarity search retriever (k=10)

Data Handling & Preprocessing

  • CSVLoader (for ingesting reviews.csv)
  • Batched embedding generation with rate-limit safety
  • Document structuring for retrieval modules

Prompting & RAG Pipeline

  • ChatPromptTemplate
  • System + Human message templates
  • Context injection for hallucination-safe answers
  • StrOutputParser for clean output formatting

Frontend / UI

  • Gradio ChatInterface
  • Real-time question answering
  • Chat history & session-based interaction
UI Screenshot
UI Screenshot