#MSCS Academic RAG Chatbot
An intelligent academic chatbot for Rowan University MSCS students that answers questions based on uploaded curriculum documents with exact page citations.Built using a Retrieval-Augmented Generation (RAG) pipeline.
##What It Does
- Students ask questions about their MSCS curriculum
- Chatbot finds the most relevant sections from uploaded PDFs
- Answers are grounded only in the curriculum — no hallucination
- Every answer shows exactly which page the information came from
- Falls back to general CS knowledge when topic isn't in the curriculum
- Handles greetings and casual conversation naturally
Student Question ↓ Convert question to vectors (Gemini Embeddings) ↓ Search FAISS vector store for relevant chunks ↓ Retrieve top 3 most relevant curriculum sections ↓ Send question + retrieved chunks to Groq (Llama 3) ↓ Answer grounded in YOUR curriculum + page citations
Backend:FastAPI + Python Vector Search:FAISS Embeddings:Google Gemini (text-embedding) LLM:Groq(Llama 3.3 70B) PDF Processing:PyPDF2+tiktoken Frontend:HTML+CSS+Vanilla JavaScript
git clone https://github.com/chandupragada/rag-based-chatbot.git cd rag-based-chatbot/backend
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Mac/Linux
pip install -r requirements.txt
Create a .env file inside backend/ folder:
GEMINI_API_KEY=your_gemini_key_here
GROQ_API_KEY=your_groq_key_here
Get Gemini key free at: https://aistudio.google.com Get Groq key free at: https://console.groq.com
Put your PDF files inside backend/data/ folder
python ingest.py
python main.py
Open frontend/index.html in your browser Make sure backend server is running first!
This project runs on free tier APIs only no credit card needed!