An open API service indexing awesome lists of open source software.

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.

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.)