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