langchain
langchain copied to clipboard
VectorStoreToolkit uses deprecated VectorDBQA, langchain needs create_retrieval_qa_agent
-
VectorStoreToolkit
,VectorStoreRouterToolkit
rely onVectorStoreQATool
andVectorStoreQAWithSourcesTool
-
VectorStoreQATool
andVectorStoreQAWithSourcesTool
rely onVectorDBQA
andVectorDBQAWithSourcesChain
respectively. - Although
VectorDBQA
andVectorDBQAWithSourcesChain
are deprecated, there are currently no replacements available. - As a result, an agent initialized by
create_vectorstore_agent
continually callsraise_deprecation
in agent executor. To address this issue, LangChain needs following:create_retrieval_qa_agent
,RetrievalQAToolKit
,RetrievalQAWithSourcesTool
.
I made a PR #2885
When running VectorDBQAWithSourcesChain, I keep getting a warning in the terminal that I should use RetrievalQAWithSourcesChain.
The issue with RetrievalQAWithSourcesChain is the "retriever" arg which no longer accepts a vectorstore anymore. It needs some kind of BaseRetriever type.
Any idea how to get around this?
@NikhilSehgal123 I think you can use .as_retriever()
method in such case.
@NikhilSehgal123 cc: @hwchase17 I updated those legacy code as well, they will use as_retriever()
method within VectorStoreQATool
, VectorStoreQAWithSourcesTool
. Check the updated PR (#2885) for more details.
Hi, @amicus-veritatis! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, the issue you reported was regarding the VectorStoreToolkit in LangChain relying on deprecated VectorDBQA and VectorDBQAWithSourcesChain, which caused an agent initialized by create_vectorstore_agent to continually call raise_deprecation in the agent executor. You made a pull request (#2885) to address this issue, suggesting the use of the .as_retriever()
method and updating the legacy code in the PR to use as_retriever()
method within VectorStoreQATool
and VectorStoreQAWithSourcesTool
.
I wanted to check with you if this issue is still relevant to the latest version of the LangChain repository. If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.
Thank you for your contribution and for helping us improve LangChain! Let me know if you have any further questions or concerns.