Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat history is not included in the prompt (model is not aware of previous interactions) #393

Open
Dlas1212 opened this issue Aug 15, 2023 · 7 comments

Comments

@Dlas1212
Copy link

Dlas1212 commented Aug 15, 2023

The issue persists with this. Ticket should be re opened. When using ConversationalRetrievalQAChain the history if your message does not persist.

Detail: I am using Externally Managed Memory, which clearly states you can also pass the chat history in explicitly by omitting the memory option and supplying a chat_history string or array of HumanMessages and AIMessages directly into the chain.call method

When you pass in your history and ask it something along of lines of "My name is Joe", then AI will usually respond with "Hi Joe, how are you?" and if your follow up question is "What is my name?" Even when passing in the chat_history the AI will respond with I do not have access to that information.

The closed ticket that should be re-opened because this is not solved: #65

@harrycruz
Copy link

harrycruz commented Aug 21, 2023

Hello, I am currently facing the exact same issue. It looks chat_history is being completely ignored. When printing the chain's reponse, the only items in the chat_history are the question and answer itself. See it below:

{'question': 'Options for financing', 'chat_history': [HumanMessage(content='Options for financing', additional_kwargs={}, example=False), AIMessage(content='There is no information provided in the given context about options for car financing.', additional_kwargs={}, example=False)], 'answer': 'There is no information provided in the given context about options for car financing.'}

@jklein33
Copy link

Anyone come up with a solution to this?

@saud121
Copy link

saud121 commented Jan 21, 2024

anyone have a solution?

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 21, 2024
Copy link

dosubot bot commented Apr 21, 2024

Hi, @Dlas1212

I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog and am marking this issue as stale. The issue involves the ConversationalRetrievalQAChain not persisting chat history, resulting in the AI responding with "I do not have access to that information." Several users have reported facing the same issue, and there's interest in finding a solution.

Could you please confirm if this issue is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository? If it is, please let the gpt4-pdf-chatbot-langchain team 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!

@Dlas1212
Copy link
Author

@saud121 @jklein33 @harrycruz

I believe this is still active right?

@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 21, 2024
Copy link

dosubot bot commented Apr 21, 2024

@mayooear Could you please assist with the issue involving the ConversationalRetrievalQAChain not persisting chat history, as reported by @Dlas1212? Thank you!

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@jklein33
Copy link

@Dlas1212 yeah the solution is to not use langchain bc it's trash. My system improved dramatically by removing langchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants