Rag-Ai-ChatBot-For-CSE-QnA

This project is an AI-driven chatbot trained on theoretical Computer Science subjects like DBMS, CN, OS, Blockchain and OOP. The bot answers questions based on content fed through pre-embedded PDFs using ChromaDB. The project offers both a command-line interface (CLI) and a user interface (UI) built using Streamlit.

Stars
2
Committers
2

AI-Powered CSE Subject Bot

This project is an AI-driven chatbot trained on theoretical Computer Science subjects like DBMS, CN, OS, Blockchain and OOP. The bot answers questions based on content fed through pre-embedded PDFs using ChromaDB. The project offers both a command-line interface (CLI) and a user interface (UI) built using Streamlit.

Features

  • Pre-fed PDFs: The chatbot has been pre-trained with PDFs covering theoretical Computer Science subjects.
  • LangChain Integration: Uses LangChain to generate relevant prompts and responses.
  • Gemini AI: Powered by Google Gemini AI for generating intelligent answers.
  • ChromaDB: Stores and retrieves document embeddings to provide accurate responses.
  • Two Interfaces:
    • Streamlit UI: A user-friendly interface (app.py) where users can ask questions.
    • CLI: A terminal-based interface (rag.py) for command-line interactions.

Tech Stack

Technology Purpose
Python Python Core programming language
![LangChain](image LangChain Question-answer framework
Gemini AI Gemini AI AI-driven responses
ChromaDB ChromaDB Vector store for embedding storage
Streamlit Streamlit User interface for the application

Running the Project

Streamlit UI Version

  1. Clone the repository:
    git clone https://github.com/yourusername/project-name.git
    cd project-name
    
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run the Streamlit app:
    streamlit run app.py
    

CLI Version

  1. After cloning the repository and installing dependencies (as shown above), run:
    python rag.py
    

How It Works

  • PDF Embedding: The pre-embedded PDFs (stored in generate_embeddings.py) are processed and stored in ChromaDB. This allows the bot to answer questions related to the content from those PDFs.
  • Streamlit UI: Users can interact with the bot using the UI, asking questions that will be answered using the AI-powered bot.
  • CLI Version: Similar functionality but using a terminal interface.
Related Projects