Skip to content

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. 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.git

    Install poetry

    pip install poetry

    Create a virtual environment with Python 3.10

    poetry env use python3.10

    Install app dependencies

    poetry install
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
chatgpt-retrieval-plugin (this)21.3kDev toolintermediate2.3 years agoDevelopers building custom GPTs that need to search their own document collections
llama_index52.8kLibraryintermediate10 days agoPython developers building retrieval-augmented generation (RAG) apps over private documents
langchain149kFrameworkintermediate4 days agoPython developers building LLM-powered applications
one-api37.3kAppintermediate10 months agoDevelopers who want one OpenAI-compatible endpoint for several model providers
9router31.8kDev toolintermediate9 days agoDevelopers who use AI coding tools and want to reduce spending
DocsGPT18.4kAppintermediate4 days agoTeams 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.