langchain
langchain copied to clipboard
ChatVectorDBChain vs. agent + ConversationBufferMemory for chat
Hi,
I am a bit confused as to what is the best approach to implement the "chatting with a document store". There seem to be two approaches to do this:
- ChatVectorDBChain -- https://github.com/mayooear/gpt4-pdf-chatbot-langchain
- agent + ConversationBufferMemory -- https://github.com/jerryjliu/llama_index/blob/main/examples/chatbot/Chatbot_SEC.ipynb
Is there an advantage to using ChatVectorDBChain?
Thank you very much!
Jumping on this and adding another question -
- How do you use
ChatVectorDBChain
with an agent? If we create a function wrapper over ChatVectorDBChain and use it as tool, won't we loose thesource_document
that it returns?
ChatVectorDBChain
was deprecated as mentioned here https://github.com/hwchase17/langchain/blob/master/langchain/chains/conversational_retrieval/base.py#L192
@cver where can I find the reasoning behind deprecating ChatVectorDBChain
? ChatVectorDBChain
appears in a lot of tutorials from hwchase17, and I think it's the first thing a lot of people is using because of that.
@cver where can I find the reasoning behind deprecating
ChatVectorDBChain
?ChatVectorDBChain
appears in a lot of tutorials from hwchase17, and I think it's the first thing a lot of people is using because of that.
I have no idea but I think it's just a matter of naming
https://github.com/hwchase17/langchain/blob/v0.0.150/langchain/chains/conversational_retrieval/base.py#L211
just replace to ConversationalRetrievalChain
, it would be fine
Hi, @phiweger! 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, you were seeking clarification on the advantages of using ChatVectorDBChain compared to the agent + ConversationBufferMemory approach for implementing "chatting with a document store". Ankitbko and cver have provided some insights and questions in the comments. Ankitbko asked about using ChatVectorDBChain with an agent, while cver mentioned that ChatVectorDBChain has been deprecated and suggested using ConversationalRetrievalChain instead. Wangdong2023 also asked for the reasoning behind deprecating ChatVectorDBChain, to which cver suggested that it may be a matter of naming and provided a replacement.
Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your contribution to the LangChain repository!