-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add top_k parameter to ChatMessageRetriever #8258
Comments
can I get this issue? |
Thanks for the initiative @MetroCat69 Sure, please feel free to create a draft pull request early on so that we can give feedback. |
What's the proper name here top_k, last_k or something else cc @TuanaCelik @Emil-io @julian-risch ? |
Maybe last_k, so that people do not think it also filters down to the best matching text messages? Also it better describes what this parameter is doing, but this is just my opinion. |
Yeah, good points @Emil-io thank you - I'll update the PR to use |
Hmm, but we also then deviate from retriever + top_k usage. Hmm, really not sure how to name this one. @TuanaCelik @julian-risch ? |
I think we are making a mistake by calling this a A retriever has too much connotation for something that will be retrieving based on similarity, embedding, etc. In which case TLDR: I don't think we should use @anakin87 - What's your take on this? |
I'm just commenting on the best name to give to this parameter (not the component name). I think something like |
|
Is your feature request related to a problem? Please describe.
The ChatMessageRetriever for RAG + Chat always provides the whole conversation history. That way, at some point the context window is exceeded.
Describe the solution you'd like
Something similar to a top_k parameter in the init of the component. That way, only a specified number of the latest chat messages is retrieved.
This could the also potentially be provided to a summary prompt node, that summarizes multiple ChatMessages.
Describe alternatives you've considered
Custom logic, where the last chat messages are stored separately and are concatenated to the query.
The text was updated successfully, but these errors were encountered: