Ask plain-English medical questions and receive concise AI-generated answers sourced from the MedQuAD FAQ dataset
Use this project as a reference implementation for building a RAG pipeline with Qdrant, LangChain, and FastAPI
Study how to make an AI chatbot admit it does not know something instead of hallucinating an answer
Requires an OpenAI API key, a running Qdrant instance, and two separate servers (FastAPI backend and React frontend) started independently.
This is a medical question-answering chatbot built as a portfolio or learning project. You type a medical question, and it responds with a short, factual answer drawn from a curated dataset of medical FAQs called MedQuAD. The chatbot uses a technique called Retrieval-Augmented Generation (RAG). When you ask a question, it first searches through the MedQuAD dataset to find the most relevant passages using a vector database called Qdrant. A vector database finds passages that are semantically similar to your question rather than just matching keywords. The retrieved passages are then handed to a language model (via the OpenAI API), which uses them as context to write a concise answer. The prompt instructs the model to keep answers to five sentences or fewer and to say it does not know if the retrieved context does not contain enough information. The backend is written in Python using FastAPI (a framework for building web APIs quickly) and LangChain (a library for connecting language models to other data sources and tools). The frontend is a React web application built on a modified chatbot-UI template, using Radix-UI components and the Vite build tool. The two parts are run separately: you start the FastAPI server in the backend directory and start the React development server in the frontend directory. The README includes several screenshots showing example conversations, including questions about celiac disease, saturated fats, fatigue, and a case where someone asks about Microsoft Office, which the bot correctly deflects as outside its domain. The project is written primarily in TypeScript on the frontend and Python on the backend.
← anthony80188 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.