openai /chatgpt-retrieval-plugin

The ChatGPT Retrieval Plugin lets you easily find personal or work documents by asking questions in natural language.

★ 21,278⑂ 3,571
PythonCreated 2023-03-23
21,278
stars
+1+1+23
3,571
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

ChatGPT Retrieval Plugin

Build Custom GPTs with a Retrieval Plugin backend to give ChatGPT access to personal documents.
!Example Custom GPT Screenshot

 Introduction

The ChatGPT Retrieval Plugin repository provides a flexible solution for semantic search and retrieval of personal or organizational documents using natural language queries. It is a standalone retrieval backend, and can be used with ChatGPT custom GPTs, function calling with the chat completions or assistants APIs, or with the ChatGPT plugins model (deprecated). ChatGPT and the Assistants API both natively support retrieval from uploaded files, so you should use the Retrieval Plugin as a backend only if you want more granular control of your retrieval system (e.g. document text chunk length, embedding model / size, etc.).

The repository is organized into several directories:

| Directory                       | Description                                                                                                                |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| datastore       | Contains the core logic for storing and querying document embeddings using various vector database providers.              |
| docs                 | Includes documentation for setting up and using each vector database provider, webhooks, and removing unused dependencies. |
| examples         | Provides example configurations, authentication methods, and provider-specific examples.                                   |
| local_server | Contains an implementation of the Retrieval Plugin configured for localhost testing.                                       |
| models             | Contains the data models used by the plugin, such as document and metadata models.                                         |
| scripts           | Offers scripts for processing and uploading documents from different data sources.                                         |
| server             | Houses the main FastAPI server implementation.                                                                             |
| services         | Contains utility services for tasks like chunking, metadata extraction, and PII detection.                                 |
| tests               | Includes integration tests for various vector database providers.                                                          |
| .well-known   | Stores the plugin manifest file and OpenAPI schema, which define the plugin configuration and API specification.           |

This README provides detailed information on how to set up, develop, and deploy the ChatGPT Retrieval Plugin (stand-alone retrieval backend).

 Table of Contents

- Quickstart
- About
  - Retrieval Plugin
  - Retrieval Plugin with custom GPTs
  - Retrieval Plugin with function calling
  - Retrieval Plugin with the plugins model (deprecated)
  - API Endpoi

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON