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

Modify existing chat + RAG cookbook to include previous user chat messages #7868

Open
Tracked by #7626
mrm1001 opened this issue Jun 14, 2024 · 5 comments
Open
Tracked by #7626
Assignees
Labels
P1 High priority, add to the next sprint topic:agent

Comments

@mrm1001
Copy link
Member

mrm1001 commented Jun 14, 2024

Modify the demo colab to support memory for user messages.

@mrm1001 mrm1001 added P1 High priority, add to the next sprint topic:agent labels Jun 14, 2024
@TuanaCelik
Copy link
Member

For context: deepset-ai/haystack-cookbook#90

This is the PR that we were about to merge in the cookbooks repo. But we didn't because of the user messages not being saved in memory.

@julian-risch
Copy link
Member

@vblagoje Let's talk about this issue when you start working on it.

@vblagoje
Copy link
Member

For increased visibility: @annthurium @TuanaCelik I have updated the proposed notebook to include user's questions. The main change is the direct question injection into OutputAdapter which in turn saves both question and answer (we already saved that one). I adjusted prompt a bit and used gpt-4 to get fewer "wrong" answers.

I suggest to devrel team to take the notebook referenced above, run it yourself, adjust it where needed (perhaps reduce verbosity etc) and LMK if there is anything else needed for it.

@TuanaCelik
Copy link
Member

@vblagoje - thanks for creating this. However this leaves me with the question about the output adaptor. I thought there was some work by you and @julian-risch to remove the output adaptor? In this scenario we need to have it in here because it's the only way we have the user messages correct?

@TuanaCelik
Copy link
Member

May I suggest a solution similar to this: https://colab.research.google.com/drive/1kJqMWRrP96YoXek6WIZNlnh-fW1fRvKe?usp=sharing

This means users do not have to worry about output adapters etc as it's all wrapped up in a Memory component.
AND, since Vlad is working on a message writer, we may also not even need that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority, add to the next sprint topic:agent
Projects
None yet
Development

No branches or pull requests

4 participants