
ChatGPT Retrieval Plugin
A self-hosted backend that lets ChatGPT and other OpenAI tools search your own documents by meaning.
- Stars
- 21.3k
- Forks
- 3.6k
- Licence
- MIT
- Language
- Python
- Last update
- 2.3 years ago
- Type
- Dev tool
This repository is archived and no longer maintained.
What it is
This is a standalone retrieval server written in Python that stores embeddings of your documents in a vector database and answers natural-language queries against them. It is meant to be used as a backend for custom GPTs, function calling, or the Assistants API, giving them access to personal or organizational documents. The README notes that ChatGPT and the Assistants API already support retrieval from uploaded files, so this project is mainly for teams that want more control over chunking, embedding models, and storage.
- Connect a custom GPT to a vector database of company documents
- Use one of the supported vector databases, such as Pinecone, Qdrant, or Chroma, as the storage layer
- Run a local server for testing retrieval against localhost
- Process and upload documents from different sources using the scripts directory
Great for
- Developers building custom GPTs that need to search their own document collections
- Teams that want control over chunk length, embedding model, and vector database choice
- Engineers integrating retrieval into function calling or the Assistants API
- People who can run a Python FastAPI server and set environment variables
Not ideal for
- Non-technical users who just want to upload files to ChatGPT; the README says built-in file retrieval is available for that
- Anyone needing active maintenance, since the repository is archived and last pushed in July 2024
- Projects that cannot use an OpenAI API key for embeddings, as the setup requires one
How to get it
- 1
Clone and build from source
You'll need: Python 3.10 · Poetry · An OpenAI API key · A supported vector database account or instance
Clone the repository
git clone https://github.com/openai/chatgpt-retrieval-plugin.gitInstall poetry
pip install poetryCreate a virtual environment with Python 3.10
poetry env use python3.10Install app dependencies
poetry install - 2
Run it
- Create a bearer token and set the required environment variables, including DATASTORE, BEARER_TOKEN, and OPENAI_API_KEY
- Set EMBEDDING_DIMENSION and EMBEDDING_MODEL, and add the variables for your chosen vector database
- Activate the environment with poetry shell
- Start the server following the Running the API Locally section of the README
- 3
Get the most out of it
- Pick the embedding model and dimension that fit your accuracy and cost needs, using the Choosing an Embeddings Model section
- Review the docs/providers directory for setup details for your vector database
- Use the scripts directory to batch process and upload documents from different sources
- Read the Personalization and Authentication Methods sections to tailor access control
Downloads
Strengths
- Supports many vector database providers, as listed in the README
- Gives granular control over chunking, embedding model, and dimension
- Released under the MIT license
Trade-offs
- The repository is archived, so it is unlikely to receive updates
- The README marks the ChatGPT plugins model as deprecated
- Setup involves many environment variables across several providers
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| chatgpt-retrieval-plugin (this) | 21.3k | Dev tool | intermediate | 2.3 years ago | Developers building custom GPTs that need to search their own document collections |
| llama_index | 52.8k | Library | intermediate | 11 days ago | Python developers building retrieval-augmented generation (RAG) apps over private documents |
| langchain | 149k | Framework | intermediate | 4 days ago | Python developers building LLM-powered applications |
| one-api | 37.3k | App | intermediate | 10 months ago | Developers who want one OpenAI-compatible endpoint for several model providers |
| 9router | 31.8k | Dev tool | intermediate | 9 days ago | Developers who use AI coding tools and want to reduce spending |
| DocsGPT | 18.4k | App | intermediate | 4 days ago | Teams that want an internal assistant over their own documents and wikis |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.