Local Offline PDF RAG App
SilverConsistent9222 · reddit · 2026-07-13
The author built a **completely offline** local RAG app to answer questions based on personal PDF files. ### Implementation - Uses Flask for both frontend and backend - Uploaded PDFs are split into overlapping chunks to prevent sentence truncation - Embeddings for each chunk are stored in ChromaDB, persisted to disk using `PersistentClient` - User questions are also embedded to retrieve the most relevant chunks as context for the model ### Behavior - The prompt strictly instructs the model to **answer only based on the retrieved context** and to say "I don't know" if there is no answer, preventing hallucinations - The author tested out-of-document questions, and the model correctly responded with "I don't know" - Works without internet since the chat model, embedding model, and vector database all run locally with zero external API dependencies
More from Apps
- Fable shows an overnight-generated world in a game-like demo — majidmanzarpour · 2026-07-21
- A macOS app locker uses Apple Neural Engine for fully on-device face unlock — damnGruz · 2026-07-21
- GPT Image 2 Prompt Turns Product Shots into Surreal Reality-Bending Ads — aziz4ai · 2026-07-21
- JD Launches an AI Interview Agent to Compress Consumer Research From Weeks to Hours — 京东JoyAI · 2026-07-21
- Open-Source Skill Solves Xiaohongshu Image Creation, Auto-Generates Viral Cards — op7418 · 2026-07-21
- Gemini works with Gmail and Sheets in one chat, then loses access in the next — KitchenDisastrous928 · 2026-07-21