pRAG is an production-ready fully local question-answering system specifically designed scientific documentation. It leverages state-of-the-art retrieval-augmented generation (RAG) techniques to help students, researchers, and academics efficiently extract and synthesize information from academic papers and documents.
- Document Processing: Upload and process multiple PDF files simultaneously with RAY
- Advanced RAG Pipeline:
- Vector-based document retrieval using Qdrant
- Context-aware response generation
- PDF content display and reference
- User Authentication: Secure admin access with password protection
- VectorDB: Using Qdrant with docker to avoid InMemory
- Chat Interface: Interactive chat-based interface powered by Chainlit
- Multi-Model Support: Integration with various LLM providers (DeepSeek, OpenAI, Google)
- Docker Support: Containerized deployment with Docker and docker-compose
- Core Components:
app.py: Main application logic and Chainlit interfacedb.py: Vector database management and document processingconfig.py: Configuration management and API keyschain.py: RAG pipeline implementation
-
Prerequisites:
- Docker and Docker Compose
- Python 3.8+
- NVIDIA GPU
-
Environment Setup:
# Clone the repository git clone https://github.com/KSonPham/pRAG.git cd pRAG # Create .env file with required environment variables cp .env.example .env # Create chainlit-secret: chainlit create-secret # Edit .env with your chainlit security key
-
Docker Deployment:
docker-compose up -d
-
Local Development:
pip install -r requirements.txt python app.py
- Access the application through your web browser
- Log in with admin/admin credentials

- Upload PDF documents for processing

- Ask questions about the uploaded documents

- The application uses bcrypt for password hashing
- API keys are stored in the configuration file
- Admin access is protected by password authentication
- Multi-Document Analysis: Cross-document question answering
- Context-Aware Responses: Intelligent context retrieval and synthesis
- PDF Display: Interactive PDF viewing with relevant sections highlighted
Contributions are welcome! Please feel free to submit a Pull Request.