Retrievers
A way of storing data such that it can be queried by a language model. The only interface this object must expose is a getRelevantDocuments
method which takes in a string query and returns a list of Documents.
📄️ ChatGPT Plugin Retriever
This example shows how to use the ChatGPT Retriever Plugin within LangChain.
📄️ Remote Retriever
This example shows how to use the a Remote Retriever in a RetrievalQAChain to retrieve documents from a remote server.
📄️ Supabase Hybrid Search
Langchain supports hybrid search with a Supabase Postgres database. The hybrid search combines the postgres pgvector extension (similarity search) and Full-Text Search (keyword search) to retrieve documents. You can add documents via SupabaseVectorStore addDocuments function. SupabaseHybridKeyWordSearch accepts embedding, supabase client, number of results for similarity search, and number of results for keyword search as parameters. The getRelevantDocuments function produces a list of documents that has duplicates removed and is sorted by relevance score.
📄️ VectorStore
The main supported type of Retriever is one backed by a Vector Store.