A comprehensive web application that allows users to upload insurance policy documents (PDF, Word, Text) and interact with them using RAG (Retrieval Augmented Generation) technology.
- 📁 Document Upload: Support for PDF, DOCX, and TXT files
- 🔍 Vector Search: ChromaDB for efficient document embeddings
- 🤖 AI Chat: Interactive chat with insurance documents via Ollama
- 📊 Document Management: View, manage, and delete uploaded documents
- 🎯 Semantic Search: Find relevant information across all documents
- 💬 Context-Aware Responses: Answers based on uploaded documents
- 📱 Responsive UI: Modern React interface
- FastAPI: High-performance Python web framework
- ChromaDB: Vector database for embeddings
- Ollama: Local LLM for embeddings and chat
- PyPDF2: PDF text extraction
- python-docx: Word document processing
- Uvicorn: ASGI server
- React: Modern UI framework
- Tailwind CSS: Utility-first CSS framework
- Axios: HTTP client
- React Router: Client-side routing
- Python 3.8+
- Node.js 16+
- Ollama installed and running locally
# Install Ollama from https://ollama.ai # Pull required models ollama pull llama3.2:3b ollama pull mxbai-embed-large:latest
cd backend
pip install -r requirements.txtcd frontend
npm installcd backend
uvicorn main:app --reload --port 8000cd frontend
npm startThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Upload Documents: Drag and drop or select insurance policy files
- Processing: Documents are automatically processed and vectorized
- Chat: Ask questions about your insurance policies
- Search: Use semantic search to find specific information
- Manage: View and delete uploaded documents
POST /upload: Upload and process documentsPOST /chat: Chat with documentsGET /documents: List all uploaded documentsDELETE /documents/{doc_id}: Delete a documentPOST /search: Semantic search across documents
Environment variables can be set in .env file:
OLLAMA_BASE_URL: Ollama server URL (default: http://localhost:11434)CHROMADB_PATH: ChromaDB storage path (default: ./chroma_db)MAX_FILE_SIZE: Maximum upload file size in MB (default: 50)