explaingit

openai/chatgpt-retrieval-plugin

Analysis updated 2026-06-21

21,210PythonAudience · developerComplexity · 4/5Setup · hard

TLDR

A self-hosted FastAPI service that gives ChatGPT or any AI assistant access to your own documents by storing and searching them with vector embeddings, you control where the data lives.

Mindmap

mindmap
  root((chatgpt-retrieval-plugin))
    What it does
      Semantic doc search
      Grounds AI answers
      Custom GPT backend
    Tech Stack
      Python FastAPI
      OpenAI Embeddings
      Vector DB options
    Use Cases
      Internal doc search
      Customer support bot
      Personal knowledge base
    Audience
      Developers
      AI builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a Custom GPT that can answer questions based on your company's internal documentation.

USE CASE 2

Add semantic document search to a customer support bot so it can retrieve relevant help articles.

USE CASE 3

Create a personal assistant that searches through your own notes and files with natural language queries.

USE CASE 4

Replace a heavy search setup with a lightweight self-hosted retrieval backend for a helpdesk or CRM.

What is it built with?

PythonFastAPIOpenAIPoetryPineconeWeaviateQdrantPostgres

How does it compare?

openai/chatgpt-retrieval-pluginairbytehq/airbyterasahq/rasa
Stars21,21021,20921,153
LanguagePythonPythonPython
Setup difficultyhardhardhard
Complexity4/54/54/5
Audiencedeveloperdatadeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an OpenAI API key and a running vector database instance (e.g., Pinecone, Qdrant, or Postgres with pgvector).

In plain English

The ChatGPT Retrieval Plugin is a backend service that lets ChatGPT and similar applications search through your personal or work documents by asking questions in plain language. Instead of relying only on what an AI model already knows, the plugin gives the model access to your own files and returns the most relevant snippets when you ask about them. It is a standalone retrieval backend you can plug into Custom GPTs, the function-calling and Assistants APIs, or the older (now deprecated) ChatGPT plugins model. The idea is semantic search. When you upload documents, the plugin breaks each one into smaller chunks of text, turns each chunk into a numerical embedding using an OpenAI embedding model, and stores those embeddings in a vector database. When you ask a question, your question is also turned into an embedding, and the plugin finds the chunks whose embeddings are mathematically closest in meaning. The matching text is returned so the model can ground its answer in your actual content. You get more granular control than the built-in file-upload features in ChatGPT, for example you can tune chunk length and pick the embedding model. You would use this if you want a self-hosted retrieval layer behind a Custom GPT or your own assistant, and you care about choosing where the data lives. The repository is structured as a FastAPI server (in the server directory), a datastore layer that handles different vector database providers, services for chunking and metadata extraction and PII detection, scripts for processing and uploading documents, example configurations, and a local server setup for testing on your own machine. The plugin manifest and OpenAPI schema live under the .well-known directory. The backend is written in Python (the quickstart targets Python 3.10) and is installed with Poetry. It needs a bearer token and your OpenAI API key, plus environment variables for the vector database you choose. It supports many vector database providers including Pinecone, Weaviate, Zilliz, Milvus, Qdrant, Redis, Chroma, Postgres, Supabase, AnalyticDB, Llama Index, Elasticsearch, MongoDB Atlas, Azure Cognitive Search, and Azure CosmosDB Mongo vCore. It can also be configured for Azure OpenAI deployments.

Copy-paste prompts

Prompt 1
I want to build a Custom GPT that searches my company's internal docs. Help me set up the chatgpt-retrieval-plugin with Qdrant as the vector database, walk me through the environment variables I need and how to chunk and upload my PDFs.
Prompt 2
Using the chatgpt-retrieval-plugin FastAPI server, write a Python script that reads a folder of .txt files, chunks them, and uploads them to the plugin's /upsert endpoint.
Prompt 3
I'm connecting the chatgpt-retrieval-plugin to Supabase Postgres as my vector store. What configuration do I need and how do I run the server locally with Poetry?
Prompt 4
Show me how to query the chatgpt-retrieval-plugin's /query endpoint from a JavaScript frontend to do semantic search over uploaded documents.

Frequently asked questions

What is chatgpt-retrieval-plugin?

A self-hosted FastAPI service that gives ChatGPT or any AI assistant access to your own documents by storing and searching them with vector embeddings, you control where the data lives.

What language is chatgpt-retrieval-plugin written in?

Mainly Python. The stack also includes Python, FastAPI, OpenAI.

How hard is chatgpt-retrieval-plugin to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is chatgpt-retrieval-plugin for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub openai on gitmyhub

Verify against the repo before relying on details.