A local RAG (Retrieval-Augmented Generation) app that lets you upload PDFs and chat with them. Runs entirely on your machine using Ollama — no data sent to external servers.
- Upload a PDF
- The backend chunks the PDF and generates embeddings using
nomic-embed-text - Embeddings are stored in a local ChromaDB vector database
- When you ask a question, relevant chunks are retrieved and passed to
mistralto generate an answer with source citations
- Frontend — React + Vite + Tailwind CSS
- Backend — Python + Flask
- Embeddings — Ollama (
nomic-embed-text) - LLM — Ollama (
mistral) - Vector DB — ChromaDB
- Python 3.10+
- Node.js
- Ollama installed and running
ollama pull mistral
ollama pull nomic-embed-textpip install flask flask-cors langchain langchain-ollama langchain-chroma langchain-community pypdf chromadbcd frontend
npm installYou need two terminals open at the same time.
Terminal 1 — Flask backend (from the project root):
python3 api.pyTerminal 2 — Vite frontend (from the frontend/ folder):
cd frontend
npm run devThen open http://localhost:5173 in your browser.
- Drop a PDF into the sidebar or click to browse
- Wait for indexing to complete (may take a moment depending on PDF size)
- Ask questions about your document in the chat input
- The AI will answer based on the document contents and cite the source chunks
To clear all indexed documents:
python3 main.py --reset- All processing is local — your PDFs never leave your machine
- Indexing and response speed depends on your hardware (Apple Silicon runs faster via Ollama's GPU support)
- Only PDF files are supported for upload