A simple RAG system that enables you to have interactive conversations with your PDF documents using OpenAI's GPT models and FAISS vector storage.
- PDF document processing and vectorization
- FAISS similarity search
- Interactive Streamlit chat interface
- Configurable RAG parameters
- Debug mode for retrieval analysis
- Chat history persistence
-
Clone the repository:
git clone https://github.com/zumpious/rag-based-document-chatter cd rag-based-document-chatter
-
Create .env and set up your environment variables:
cp .env.template .env
-
Create and activate virtual environment (Optional):
python -m venv venv source venv/bin/activate
-
Install dependencies (Optional):
pip install -r requirements.txt
-
Process your document and create FAISS vector embedding:
python scripts/process_document.py
-
Verify setup (optional):
python scripts/test_setup.py
-
Run the chat interface:
streamlit run main.py
-
Build the Docker image:
docker build -t rag_app .
-
Run the container:
docker run -d -p 8501:8501 --name rag_app rag_app
-
Acess the application:
- Open http://localhost:8501 in your browser
-
Build and start the container:
docker compose up -d
-
Access the application:
- Open http://localhost:8501 in your browser