Skip to content

A Python-based RAG system using FAISS and OpenAI's GPT models to enable interactive conversations with PDF documents through a Streamlit UI, perfect for exploring and querying large documents like research papers or theses.

License

Notifications You must be signed in to change notification settings

zumpious/rag-based-document-chatter

Repository files navigation

📚 RAG Based Local Document Chatter

A simple RAG system that enables you to have interactive conversations with your PDF documents using OpenAI's GPT models and FAISS vector storage.

🌟 Features

  • PDF document processing and vectorization
  • FAISS similarity search
  • Interactive Streamlit chat interface
  • Configurable RAG parameters
  • Debug mode for retrieval analysis
  • Chat history persistence

🚀 Setup

  1. Clone the repository:

    git clone https://github.com/zumpious/rag-based-document-chatter
    cd rag-based-document-chatter
  2. Create .env and set up your environment variables:

    cp .env.template .env   
  3. Create and activate virtual environment (Optional):

    python -m venv venv
    source venv/bin/activate 
  4. Install dependencies (Optional):

    pip install -r requirements.txt

📖 Usage

  1. Process your document and create FAISS vector embedding:

    python scripts/process_document.py  
  2. Verify setup (optional):

    python scripts/test_setup.py   
  3. Run the chat interface:

    streamlit run main.py   

🐳 Docker Setup

  1. Build the Docker image:

    docker build -t rag_app .
  2. Run the container:

    docker run -d -p 8501:8501 --name rag_app rag_app
  3. Acess the application:

🐋 Docker Compose Setup

  1. Build and start the container:

    docker compose up -d
  2. Access the application:

About

A Python-based RAG system using FAISS and OpenAI's GPT models to enable interactive conversations with PDF documents through a Streamlit UI, perfect for exploring and querying large documents like research papers or theses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published