Medical FAQ chatbot using Retrieval Augmented Generation to provide accurate answers.
- Retrieval-Augmented Generation (RAG): Combines vector-based retrieval with LLMs to generate accurate, context-aware medical responses.
- Optimized Vector Search with Qdrant: Enables fast and accurate semantic search across the MedQuAD dataset.
- FastAPI-Powered Backend: High-performance API ensuring low-latency response times.
- LangChain-Integrated Query Processing: Enhances contextual understanding and document retrieval.
- React Frontend: Delivers a responsive, modern UI for seamless user interaction.
- OpenAI API Integration: Leverages advanced language models to improve the quality and relevance of generated answers.
More images and videos in the docs folder of this repository!
I wrote a few notebooks on RAG recently on Kaggle, and used different datasets, including Pokemon, MedQuad, and a Baked Foods dataset to store their documents as vectors, and generate high quality answers based on the retrieved context.
I decided to turn one of the notebooks into a standalone end-to-end project using FastAPI, Qdrant, Langchain, OpenAI API and React.
Built the front-end in React, using a modified chatbot-ui template, and the back-end using FastAPI web framework.
- Python
- FastAPI
- Langchain
- Qdrant
- OpenAI API
- React
- Radix-UI
- Vite
You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.
If you don't know the answer, just say that you don't know. Keep the answer short and concise. Try to use less than 5 sentences.
- Change directory to
backend. - Run
poetry install --no-ansi --without dev. - Run
poetry env activate. - Start FastAPI server
python3 main.py.
- Change directory to
ragbot. - Run
pnpm install. - Start frontend app
pnpm run dev.






