Skip to content

Add top_k parameter to ChatMessageRetriever #8258

@Emil-io

Description

@Emil-io

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.

Metadata

Metadata

Assignees

Labels

P2Medium priority, add to the next sprint if no P1 available

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions