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

Chat Ordering Newest to Oldest #391

Closed
Adam-D-Lewis opened this issue Apr 15, 2024 · 8 comments · Fixed by #445
Closed

Chat Ordering Newest to Oldest #391

Adam-D-Lewis opened this issue Apr 15, 2024 · 8 comments · Fixed by #445
Labels

Comments

@Adam-D-Lewis
Copy link

Feature description

Currently chats are listed oldest first (highest) in ragna ui. It seems more helpful more most use cases to reverse that order and have newer chats appear higher in the chat list in the side bar of ragna ui.

Value and/or benefit

Better UX

Anything else?

No response

@Adam-D-Lewis Adam-D-Lewis added the type: enhancement 💅 New feature or request label Apr 15, 2024
@pmeier
Copy link
Member

pmeier commented Apr 15, 2024

@smeragoel Any objections here?

@smeragoel
Copy link

No objections, this is the ideal approach. You have my vote ➕

@blakerosenthal
Copy link
Contributor

blakerosenthal commented Apr 18, 2024

Hey folks, I'm getting up to speed with the codebase and am noticing we don't have any tests in tests/deploy/ui. Would this be a good issue to start filling those in? Thoughts on UI tests for this project in general?

@pmeier
Copy link
Member

pmeier commented Jul 10, 2024

Following the discussion started in #445 (comment), we need to define what "newest" and "oldest" mean. There are currently two contenders to order chats:

  1. Add a new timestamp to the chat, which hold the creation date
  2. Extract the timestamp from the messages of a chat and use the latest one

I initially preferred 1., but I'm leaning towards 2. now for these reasons:

  • We don't need to add new metadata. Since we have a welcome message after preparation, at least in the UI we'll always have something to order the chats by. For the API we can just add chats that have no messages, i.e. the ones that were created but not prepared yet, to the end of the list or the like.
  • The chart ordering would not be static. Meaning, the chat that the user used most recently will be at the top. Otherwise, long-standing chats might be at the bottom of the list although the user still wants to access them regularly. @arjxn-py Could you check how LLM providers (OpenAI, Anthropic, etc.) handle this?

@Adam-D-Lewis Since you have reported this, what would you prefer?

@Adam-D-Lewis
Copy link
Author

Option 2 so you see the chat with the most recent message at the top would be my preference.

@arjxn-py
Copy link
Contributor

Could you check how LLM providers (OpenAI, Anthropic, etc.) handle this?

Based upon my experience of using these LLM interfaces, I could easily identify that the approach they follow is that they sort the chat order based upon the last usage of the chat.
However i took some time to find some official reference to back up what I say, I couldn't find any authentic reference for something very specific like this but I'm confident about that they must be using the timestamp of last message in the chat.

@pmeier
Copy link
Member

pmeier commented Jul 10, 2024

However i took some time to find some official reference to back up what I say

Sorry, I should have been more clear. A screenshot or even your testimony would have been sufficient. I just want to make sure if we make a change here, that we not deviate from what others are doing without a clear reason to do so.

arjxn-py added a commit to arjxn-py/ragna that referenced this issue Jul 10, 2024
@arjxn-py
Copy link
Contributor

Sorry, I should have been more clear. A screenshot or even your testimony would have been sufficient. I just want to make sure if we make a change here, that we not deviate from what others are doing without a clear reason to do so.

Totally no worries. I'm pretty sure that our approach is aligned with what others are doing already.

I also did some workaround for the same in #445 & now i can see chats being ordered based upon the last usage of the chat.

arjxn-py added a commit to arjxn-py/ragna that referenced this issue Jul 11, 2024
pmeier pushed a commit that referenced this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants