Skip to content

0xarchit/DocumentChat-Simple-Rag-VectorDB-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

AI/ML/GenAI Mentor Chatbot

This vibe coded project provides an AI/ML/GenAI Mentor Chatbot built with Gradio, LangChain, ChromaDB, and Google Gemini. You can run the notebook in Google Colab to interact with the chatbot.

Running in Google Colab

  1. Open the notebook:

    • Import the notebook into your Google Drive or GitHub repository.
    • Open Google Colab and select File > Open notebook.
    • Under the Google Drive, GitHub, or Upload tab, locate your notebook (main.ipynb) and open it.
  2. Install dependencies:

    • Colab will automatically install required packages when running the first cell.
  3. Run all cells:

    • In Google Colab, select Runtime > Run all to execute every cell sequentially.
    • This will set up the environment, process documents, initialize the chatbot, and launch the Gradio interface.

Alternatively, you can use the public Colab link:

Open in Google Colab

Also add gemini api key in collab secrets

Preview

collab

working image 1

working image 2

Basic Working

This project combines several modern AI tools to create an interactive mentor chatbot:

  • Gradio UI: Provides a simple, user-friendly web interface for uploading documents and chatting with the AI mentor.
  • ChromaDB (Vector Database): Stores document chunks as vector embeddings, enabling fast and relevant retrieval of information based on your questions.
  • all-MiniLM-L6-v2 Embedding Model: Converts text from your documents and queries into numerical vectors, allowing semantic search and matching.
  • Google Gemini (Generative AI): Generates detailed, structured answers using both retrieved document context and its own AI/ML/GenAI knowledge.

How it works:

  1. Upload your PDF, PPT, or TXT files using the Gradio interface.
  2. The files are split into chunks and embedded using the all-MiniLM-L6-v2 model.
  3. ChromaDB stores these embeddings for efficient retrieval.
  4. When you ask a question, the system finds the most relevant document chunks and sends them, along with your question, to Gemini.
  5. Gemini generates a comprehensive answer, referencing your materials and providing real-world examples.

Usage

  • Upload your PDF, PPT, or TXT files using the notebook’s upload section.
  • After processing, ask questions about AI, ML, or GenAI topics.
  • The chatbot will provide structured, detailed responses with real-world examples based on provided material only.

Clearing Data

  • To clear all uploaded documents and chat history, run the Clear All Data button in the interface.

About

Documents Chatting with Gemini AI API, MiniLM Embedding model, Chroma Vector DB, RAG and Gradio UI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published