Skip to content

About

This is a rag software that use local llm with ollama (gemma3) and google ai studio (gemini)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

RAGbot-GUI

RAGbot-GUI Screenshot

This is a graphical user interface (GUI) for a Retrieval-Augmented Generation (RAG) chatbot. The application allows you to upload documents (PDF, TXT, and images) and then ask questions about their content. The chatbot uses a local or remote large language model (LLM) to generate answers based on the information in the uploaded documents.

Features

  • Document Upload: Upload PDF, TXT, and image files to build a knowledge base.
  • Chat Interface: Ask questions and get answers from the chatbot.
  • Local and Remote LLMs: Choose between a local Gemma 3 model or a remote Google Gemini model.
  • Persistent Knowledge Base: The knowledge base is saved and loaded across sessions.
  • Clear Knowledge Base: Easily clear the knowledge base to start fresh.

How It Works

  1. Document Processing: When you upload a document, the application extracts the text, splits it into chunks, and generates embeddings for each chunk.
  2. Vector Database: The embeddings are stored in a FAISS vector database, which allows for efficient similarity search.
  3. RAG: When you ask a question, the application generates an embedding for your query, searches the vector database for the most relevant document chunks, and then uses those chunks as context for the LLM to generate an answer.

Prerequisites

This application uses Tesseract for Optical Character Recognition (OCR) to extract text from images. You must have the Tesseract OCR engine installed on your system.

  • Windows: Download and run the installer from the Tesseract at UB Mannheim page. Make sure to add the Tesseract installation directory to your system's PATH environment variable.
  • macOS: You can install it using Homebrew:
    brew install tesseract
  • Linux (Debian/Ubuntu):
    sudo apt-get install tesseract-ocr

Please ensure the tesseract command is accessible from your terminal before running the application.

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/RAGbot-GUI.git
    cd RAGbot-GUI
  2. Install the dependencies:

    pip install -r requirements.txt
  3. Run the application:

    python app.py

Usage

  1. Upload Documents: Click the "Upload PDF/TXT/Image" button to add documents to the knowledge base.
  2. Select an LLM: Choose between the local Gemma 3 model or the remote Google Gemini model from the dropdown menu. If you select the Gemini model, you will be prompted to enter your Google GenAI API key.
  3. Ask Questions: Type your questions in the input field and press Enter or click the "Send" button.
  4. Clear the Knowledge Base: Click the "Clear All Documents" button to remove all uploaded documents from the knowledge base.

About

This is a rag software that use local llm with ollama (gemma3) and google ai studio (gemini)

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages