rag-document-system / README.md
hugging2021's picture
Update README.md
2d155f8 verified
metadata
title: RAG-Document-System
sdk: docker

RAG Document System

A simple document interaction system using Retrieval-Augmented Generation (RAG) with Streamlit and Google's Gemini AI.

Features

  • Upload text documents (.txt files)
  • Ask questions about your documents
  • Get AI-powered answers with source citations
  • Persistent vector database storage
  • Clean web interface

Setup

With Docker (Recommended)

  1. Clone the repository:
git clone https://github.com/tusiim3/RAG-Document-System.git
cd RAG-Document-System
  1. Copy .env.example to .env and add your Google API key:
cp .env.example .env
  1. Run with Docker Compose:
docker-compose up --build
  1. Open http://localhost:8501 in your browser

Without Docker

  1. Clone the repository:
git clone https://github.com/tusiim3/RAG-Document-System.git
cd RAG-Document-System
  1. Install dependencies:
pip install -r requirements.txt
  1. Copy .env.example to .env and add your Google API key:
cp .env.example .env
  1. Run the application:
streamlit run app.py
  1. Open http://localhost:8501 in your browser

Environment Variables

Required in .env file:

  • GOOGLE_API_KEY - Your Google API key for Gemini
  • CHUNK_SIZE - Text chunk size (default: 1000)
  • CHUNK_OVERLAP - Chunk overlap (default: 200)
  • EMBEDDING_MODEL - Embedding model name
  • LLM_TEMPERATURE - AI response temperature (default: 0.3)

Usage

  1. Upload a text document using the file uploader
  2. Wait for document processing to complete
  3. Ask questions about the document in the chat interface
  4. View source documents for each answer

Technology Stack

  • Streamlit for web interface
  • LangChain for document processing
  • ChromaDB for vector storage
  • Google Gemini for AI responses
  • Docker for containerization