https://github.com/gms-001/rag-based-chatbot-tds
RAG-powered Virtual Teaching Assistant for IIT Madras’ Tools in Data Science (TDS) course. Built with LangChain, LangSmith, and Streamlit, this chatbot provides context-aware answers from course materials, manages user sessions with SQLite, and supports real-time chat streaming.
https://github.com/gms-001/rag-based-chatbot-tds
gemini-api langchain langgraph langsmith python rag-chatbot selenium sqlite
Last synced: about 1 month ago
JSON representation
RAG-powered Virtual Teaching Assistant for IIT Madras’ Tools in Data Science (TDS) course. Built with LangChain, LangSmith, and Streamlit, this chatbot provides context-aware answers from course materials, manages user sessions with SQLite, and supports real-time chat streaming.
- Host: GitHub
- URL: https://github.com/gms-001/rag-based-chatbot-tds
- Owner: GmS-001
- License: mit
- Created: 2025-08-21T14:59:57.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-09-01T19:30:23.000Z (about 1 month ago)
- Last Synced: 2025-09-01T20:44:19.475Z (about 1 month ago)
- Topics: gemini-api, langchain, langgraph, langsmith, python, rag-chatbot, selenium, sqlite
- Language: Jupyter Notebook
- Homepage:
- Size: 5.54 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ✨ RAG-Based Virtual Teaching Assistant
A **Retrieval-Augmented Generation (RAG)** powered chatbot built for the **Tools in Data Science (TDS)** course at **IIT Madras**.
This virtual assistant provides **accurate, context-aware answers** to students' queries using course materials, while also being capable of answering general knowledge questions gracefully.Built with **LangGraph**, **LangChain**, **LangSmith**, **Streamlit**, **Selenium** and a **SQLite backend**, this project demonstrates a **production-grade RAG application** with authentication, conversation threading, and persistent chat history.
### ✨Live Website : https://rag-based-chatbot-tds-gms.streamlit.app/
---## 🚀 Features
- **Context-Aware Responses (RAG)**
Answers are based on retrieved chunks from course content first, ensuring accuracy and reliability.- **Fallback General Knowledge Answers**
When no course context is available, the bot clearly states this and provides helpful responses using general reasoning.- **LangSmith-Backed LLM Tracing & Analysis**
Used **LangSmith** to monitor, debug, and optimize LLM calls for better transparency and reliability in production.- **Interactive Streamlit Frontend**
- Chat-like UI for students.
- Live message streaming.
- Sidebar for switching between chat threads.- **User Authentication & Conversation Management**
- Login/registration system with secure password storage.
- Each user has multiple conversation threads, all persisted in a SQLite database.- **Well-Structured Backend**
- Modular design (`frontend`, `backend`, `database_utils`, `prompts`) for scalability.
- Easy to extend with new models, retrievers, or UI features.---
## 🗂️ Project Structure
```plaintext
├── backend_basic.py # Core RAG pipeline: retrieval & LLM integration
├── database_utils.py # SQLite utilities: user auth, chat history, threads
├── frontend.py # Streamlit app for chat interface
├── prompts.py # System prompts and configurations
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .gitignore # Ignored files (db, cache, venv, etc.)