PDF Chatbot

Замовник: AI | Опубліковано: 26.09.2025

I want a clean, modular Python implementation of a web-based chatbot that lets visitors drop in one or more PDF files—no size caps—and immediately start asking natural-language questions about their contents. Core requirements • Retrieval-Augmented Generation drives each answer. Your code should ingest the PDF, chunk it, embed it, store vectors, retrieve relevant snippets, then hand those to the LLM for final response synthesis. • Use Mistral or a comparable open-weight model; I have been working with the idea of splitting logic into rag_engine.py and llm_mistral.py, but feel free to propose an equivalent structure as long as the layers are clearly separated. • Front-end must run in the browser with no login wall—straight to chatting. A minimal Flask or FastAPI back-end paired with vanilla JS, React or similar is fine, so long as the Q&A loop feels snappy and intuitive. • Unlimited file size means you’ll need sensible streaming or chunk-upload handling to avoid memory blow-ups. Deliverables 1. Source code with clear docstrings and a short README covering setup, environment variables, and how to swap in another model. 2. Dockerfile (or similarly simple deployment script) that spins up both the API and UI in one go. 3. A demo video or GIF showing a user uploading a multi-MB PDF and receiving accurate, citation-backed answers. Acceptance criteria • For a provided test PDF, the system returns answers grounded in the document and lists the page numbers it referenced. • Cold-start to first response in under 30 seconds on a standard CPU instance. • No authentication prompts anywhere in the flow. If this scope matches your expertise with vector stores, LangChain/LlamaIndex, FastAPI or Flask, and front-end hooks, let’s talk timelines and milestones.