PygmalionAI / paphos-backend

The official service back-end.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Figure out how to model chats/group chats/messages

0x000011b opened this issue · comments

commented

By far our most important data will be messages. They'll be read somewhat often, written often and their integrity is paramount (since they'll be used as training data for future model versions). Some points to keep in mind:

  • I'd like to have group chats be a feature (multiple users/characters in a chat).
  • An option to regenerate the last message will exist, but we can't delete from the DB when it's used - we want to save the original message as negative training data for the reward model.
  • Message ratings will be a thing. How will this work with multiple users? One rating per user? Disabled on rooms with multiple users? Only room creators can rate?
  • I'd like a feature that allows people to "reset" the chat to a previous moment in time by deleting the last X messages. I'm not sure I'd like to implement this via a hard delete on the DB though.
commented

Another thing worth keeping in mind: column order to avoid wasted space.

I'm only now starting to learn backend stuff, meaning I can't speak at all about the technical side of this, but I'll touch a bit on the first and third bullet points publicly so that others can jump in if they want to.
I think multi-user chat would be a really fun thing, and it would be cool to have it implemented. What I suggest is that multiple users can rate a response, and the final score would be an average of every user's input into the model. Only the latest response in a room would be rated and the final score will be submitted once the next bot message is generated. Regeneration of responses could be a room-creator only feature for now and in the future, we can perhaps implement an option where a message can be regenerated by consensus of everyone or a majority of people in the room.

commented

adding onto point two it would be nice to cycle through responses so if you regenerate a couple times you can pick the best out of however many you generated and continue with that one

commented

for the last point i think it's a good idea to for a "chat" to only store a list of hashes or indexes of messages so if a user wants to revert to a previous point in the conversation they can "delete" the messages while keeping all the data to be used for training data and without having to store messages multiple times