A Retrieval-Augmented Generation (RAG) chatbot application that enables document-based question answering through an intuitive web interface. The application allows users to upload documents, processes them into a vector store, and answers questions based on the document content using advanced language models.
-
📄 Document Processing
- Support for PDF, DOC, DOCX, and TXT files
- Intelligent text chunking with sentence boundary preservation
- Automatic document vectorization and indexing
-
🤖 Advanced QA Capabilities
- RAG-based question answering
- Context-aware responses
- Source attribution for answers
- Chat history management
-
💻 User Interface
- Clean, intuitive Streamlit interface
- Real-time document management
- Interactive chat interface
- Document upload progress tracking
-
🔧 Technical Features
- FAISS vector store for efficient similarity search
- Redis-based response caching
- SQLite chat history persistence
- Ollama LLM integration
- Docker containerization
├── app/
│ ├── llm/ # Language model integration
│ ├── cache_manager # Redis caching system
│ ├── vector_store # FAISS vector store
│ ├── text_processor # Document processing
│ └── rag_pipeline # Core RAG implementation
├── data/ # Persistent storage
├── docker/ # Container configuration
└── main.py # Application entry point
- Docker and Docker Compose
- 8GB+ RAM recommended
- 10GB+ free disk space
- Clone the repository:
git clone https://github.com/russell-ai/rag-chatbot.git
cd rag-chatbot- Start the application using Docker Compose:
docker compose up --build
docker compose exec ollama ollama pull llama3.2- Access the web interface:
- Open your browser and navigate to
http://localhost:8501
-
Upload Documents
- Click the "Upload Documents" button in the sidebar
- Select one or more supported documents
- Wait for processing completion
-
Ask Questions
- Type your question in the chat input
- The system will search relevant documents
- View the answer with source references
-
Manage Documents
- View active documents in the sidebar
- Remove documents as needed
- Start new chat sessions
Key environment variables (set in docker-compose.yml):
OLLAMA_HOST: http://ollama:11434
OLLAMA_MODEL: llama3.2
REDIS_URL: redis://redis:6379
DEBUG: trueFor local development without Docker:
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt-
Start required services (Redis, Ollama) separately
-
Run the application:
streamlit run main.py- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by R. Caliskan