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

Selective Storage of Chat Messages #124

Open
Emil-io opened this issue Oct 17, 2024 · 0 comments
Open

Selective Storage of Chat Messages #124

Emil-io opened this issue Oct 17, 2024 · 0 comments

Comments

@Emil-io
Copy link

Emil-io commented Oct 17, 2024

This builts up upon following Issue and the corresponding method for providing the chat history:

The current Conversational RAG approach includes supporting documents with user queries, which can significantly increase token usage. I would like more granular control over what gets stored in the conversation history to optimize token efficiency. Specifically:

For past conversation turns, only store the user query without the supporting documents in the ChatMessageStore. This keeps the historical chat history concise and relevant.

For the most recent conversation turn, include the supporting documents from the RAG component to provide full context to the LLM, but do not store this entire concatenated message with the documents in the ChatMessageStore.

This approach would help optimize the use of the context window by reducing unnecessary token usage, while still maintaining a clear and concise conversation history for future responses.

Correct me if I'm wrong with some of these assumptions or if this is already possible. There probably already exists a workaround for this, but I think this could still be interesting.

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

1 participant