langchain icon indicating copy to clipboard operation
langchain copied to clipboard

ChatVectorDBChain vs. agent + ConversationBufferMemory for chat

Open phiweger opened this issue 1 year ago • 1 comments

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!

phiweger avatar Mar 22 '23 12:03 phiweger

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 the source_document that it returns?

ankitbko avatar Mar 24 '23 06:03 ankitbko

ChatVectorDBChain was deprecated as mentioned here https://github.com/hwchase17/langchain/blob/master/langchain/chains/conversational_retrieval/base.py#L192

sondt2709 avatar Apr 10 '23 11:04 sondt2709

@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.

wangdong2023 avatar Jul 21 '23 01:07 wangdong2023

@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

sondt2709 avatar Jul 23 '23 12:07 sondt2709

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!

dosubot[bot] avatar Oct 22 '23 16:10 dosubot[bot]