LocalDocRAG

Self-hosted document Q&A that runs locally with Ollama, including on Raspberry Pi. MIT licensed, with optional OpenAI and Anthropic backends.

LocalDocRAG is a self-hosted PDF question-answering app for people who want to search their documents with a local LLM and check answers against specific pages. It runs through Docker on macOS, Windows, Linux or a Raspberry Pi, with a browser interface accessible from phones and computers on the same network. It's open source under the MIT license.

With Ollama, document processing, embeddings and answer generation stay on your hardware. After downloading the models, the core document Q&A works offline without cloud API keys. It supports Ollama models such as llama3.2:3b and qwen2.5:14b, paired with nomic-embed-text for document search. The hardware guidance includes a Raspberry Pi 4 with 8GB RAM for the smaller model and a Pi 5 with 16GB for qwen2.5:14b.

Answers include page references and source passages so you can inspect the supporting text. The app also lets you list and delete uploaded documents. It searches document passages by meaning using PostgreSQL with pgvector. PDF support covers text-based files; scanned image PDFs need OCR that the app doesn't provide. Its password-protected interface uses a single-user account.

Optional cloud backends use OpenAI's gpt-4o-mini or Anthropic's claude-haiku-4-5 for answers, with OpenAI embeddings in both cloud modes. The app remains self-hosted, but those modes send content to external APIs. Built-in RAGAS evaluation measures answer faithfulness, relevance and retrieval quality, and requires OpenAI as its judge even when the document Q&A uses Ollama.

Similar to LocalDocRAG