explaingit

zylon-ai/private-gpt

57,215PythonAudience · developerComplexity · 4/5MaintainedLicenseSetup · moderate

TLDR

Run AI question-answering on your own documents without sending data to the cloud. Uses local embeddings and retrieval to keep everything private.

Mindmap

mindmap
  root((repo))
    What it does
      Ask questions on documents
      Keep data private
      Works offline
    How it works
      Parse and chunk documents
      Generate embeddings locally
      Retrieve relevant chunks
      Feed to LLM for answers
    APIs and interfaces
      High-level chat API
      Low-level retrieval API
      Gradio web interface
    Tech stack
      FastAPI backend
      LlamaIndex RAG
      OpenAI-compatible
    Use cases
      Search contracts
      Query internal reports
      Air-gapped environments

Things people build with this

USE CASE 1

Search and ask questions about contracts, legal documents, or compliance files without uploading to cloud services.

USE CASE 2

Build a private document Q&A system for healthcare records, financial reports, or other sensitive internal data.

USE CASE 3

Deploy an offline AI assistant in air-gapped environments where internet access is restricted or prohibited.

USE CASE 4

Create custom workflows that retrieve specific document chunks and feed them to your own language model.

Tech stack

PythonFastAPILlamaIndexGradioOpenAI API

Getting it running

Difficulty · moderate Time to first run · 30min

Requires OpenAI API key and local LLM/embedding model setup; downloading model weights may take additional time depending on internet speed.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and license text.

In plain English

PrivateGPT is a production-ready Python application that lets you ask questions about your own documents using large language models (LLMs) while keeping all of your data completely private. The core problem it solves is this: tools like ChatGPT are powerful, but they require sending your data to third-party servers, a serious concern for healthcare providers, law firms, banks, and other organizations handling sensitive information. PrivateGPT runs entirely on your own machine or server, so no data ever leaves your environment. Under the hood, PrivateGPT uses a technique called Retrieval Augmented Generation, or RAG. When you upload documents, the system parses and splits them into chunks, generates numerical representations called embeddings, and stores everything locally. When you ask a question, it retrieves the most relevant chunks and feeds them to the LLM alongside your question, producing an answer grounded in your actual documents rather than the model's training data alone. The project exposes two API layers. The high-level API handles document ingestion and chat with minimal setup. The low-level API gives developers direct access to embeddings and chunk retrieval so they can build custom workflows on top of the same infrastructure. A ready-to-use chat interface built with Gradio is also included for testing without writing any code. You would reach for PrivateGPT when you need to search or interrogate internal documents, contracts, reports, manuals, research files, and cannot or will not use a cloud AI service. It works offline, making it suitable for air-gapped environments. Technically, the backend is a FastAPI server (Python), the RAG pipeline is powered by LlamaIndex, and it follows the OpenAI API standard so it integrates with any client that already speaks that protocol.

Copy-paste prompts

Prompt 1
How do I set up PrivateGPT to chat with my own PDF documents while keeping everything on my local machine?
Prompt 2
Show me how to use the low-level API in PrivateGPT to retrieve document chunks and build a custom question-answering workflow.
Prompt 3
What are the steps to deploy PrivateGPT in an air-gapped environment with no internet access?
Prompt 4
How do I integrate PrivateGPT with my existing OpenAI API client to switch from cloud-based to private document search?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.