LangChain shifts from vector databases to flexible retrievers
LangChain has overhauled its retrieval architecture to support external tools like OpenAI's ChatGPT Retrieval Plugin, making it easier for developers to query custom data.

LangChain has introduced a new Retriever abstraction to replace its previous vector database-centric chains. This architectural shift aims to make it easier for developers to utilize retrieval systems constructed outside of the LangChain ecosystem, while also encouraging experimentation with alternative search methods such as hybrid search, metadata filtering, and graph-based indexing.
Under the new system, the framework is transitioning its existing chains to the new standard. For instance, the widely used VectorDBQA chain has been renamed to RetrievalQA, and ChatVectorDBChain is now ConversationalRetrievalChain. The company explained that the Conversational prefix will now indicate the use of memory, whereas the Chat prefix will denote the use of a chat model. To maintain backward compatibility, developers can easily convert existing vector stores into the new format using the as_retriever method.
The new Retriever interface is designed to be highly permissive, requiring only a single method called get_relevant_documents that accepts a query string and returns a list of documents. By enforcing this simple signature, LangChain allows external tools to plug directly into its chains. As part of this update, LangChain has integrated its first external retriever: OpenAI's recently open-sourced ChatGPT Retrieval Plugin.
While the legacy vector database chains will continue to function for the time being, LangChain recommends that developers transition to the new Retrieval chains as soon as possible. The company plans to focus all future development and support on this new abstraction, which it believes will unlock better question-answering capabilities and enable superior long-term memory for artificial intelligence agents.
This is our own summary of reporting by LangChain Blog



