biocypher / biochatter-next

The advanced implementation for BioChatter, using Next.js
MIT License
8 stars 7 forks source link

Sidebar #42

Closed slobentanzer closed 9 months ago

slobentanzer commented 10 months ago

Several cosmetic changes and smaller adjustments

slobentanzer commented 10 months ago

@fengsh27 I reimplemented the changes I made, but I now encounter several bugs with core functionality. I don't know if it's a problem on my side, but I restarted and cleared my system a couple of times, rebuilt the Docker Compose, changed browsers, so it would be good if you could check (and also review the changes I made here).

Bugs I observe:

fengsh27 commented 10 months ago

@slobentanzer Sure, I'll have a look

fengsh27 commented 10 months ago

@slobentanzer For the bugs:

image

fengsh27 commented 10 months ago

@slobentanzer I have made two submissions to show "Never show again" button. Would you please review them and confirm it is the desired effect. Additionally, please let me know whether the two other issues you mentioned have been resolved or not.

slobentanzer commented 10 months ago

Thanks, will do. Actually received a new machine today, will set that up and use as a test bed for the technical issues, will update once I managed that.

slobentanzer commented 10 months ago

@fengsh27 on the new machine the response mechanism with GPT works again, I guess it was a settings or cache issue. :)

I think I figured out the problem with the RAG button on the bottom of the chat: it is connected to the "use RAG" button in the RAG settings. The way I envisioned it, these two are independent. The settings are global, used to manage the vector database, embedded docs, etc. The global setting should only be changed once when the user decides to use the feature. The button in the chat, on the other hand, is local, only activated if the user want one specific question supplemented by RAG (and same with KG). It should be off by default in every new chat, and basically an "opt-in" decision for every new question by the user. It could also be nice to automatically turn it off after the one question has been sent. This behaviour could be a global setting.

The "New Persona" splash screen changes are good, but now we go into a new blank conversation, which is not what we wanted. If the splash screen is turned off, the "New Persona" button should lead to the list-like selection (Persona overview) of different personas (the one that was previously in the chat menu bar). This was the button I think (so leading to Path.Masks):

<ChatAction
         onClick={() => {
           navigate(Path.Masks);
         }}
         text={Locale.Chat.InputActions.Masks}
         icon={<MaskIcon />}
       />

Could you adjust these aspects?

fengsh27 commented 9 months ago

The "New Persona" splash screen changes are good, but now we go into a new blank conversation, which is not what we wanted. If the splash screen is turned off, the "New Persona" button should lead to the list-like selection (Persona overview) of different personas (the one that was previously in the chat menu bar). This was the button I think (so leading to Path.Masks):

Yes, I think I accomplish this quickly.

fengsh27 commented 9 months ago

I think I figured out the problem with the RAG button on the bottom of the chat: it is connected to the "use RAG" button in the RAG settings. The way I envisioned it, these two are independent. The settings are global, used to manage the vector database, embedded docs, etc. The global setting should only be changed once when the user decides to use the feature. The button in the chat, on the other hand, is local, only activated if the user want one specific question supplemented by RAG (and same with KG). It should be off by default in every new chat, and basically an "opt-in" decision for every new question by the user. It could also be nice to automatically turn it off after the one question has been sent. This behaviour could be a global setting.

@slobentanzer Let me clarify the usage of the "use RAG" settings,

  1. The global "use RAG" setting, found in RAG settings page, is specially used to control if users can upload documents and modify RAG settings like chunk size, overlap size and so on.
  2. The local "use RAG" setting, found in chat, is used to determine if we should include RAG supplements as context in conversation.

These two settings are independent.

  1. Optionally, we can provide a global setting that automatically turns off chat "use RAG" setting after each question.

Is this what we want to achieve?

slobentanzer commented 9 months ago

Is this what we want to achieve?

@fengsh27 yes, correct

fengsh27 commented 9 months ago

That's clear. It will take about 1-2 days to complete.

fengsh27 commented 9 months ago

I think I figured out the problem with the RAG button on the bottom of the chat: it is connected to the "use RAG" button in the RAG settings. The way I envisioned it, these two are independent. The settings are global, used to manage the vector database, embedded docs, etc. The global setting should only be changed once when the user decides to use the feature. The button in the chat, on the other hand, is local, only activated if the user want one specific question supplemented by RAG (and same with KG). It should be off by default in every new chat, and basically an "opt-in" decision for every new question by the user. It could also be nice to automatically turn it off after the one question has been sent. This behaviour could be a global setting.

@slobentanzer Let me clarify the usage of the "use RAG" settings,

  1. The global "use RAG" setting, found in RAG settings page, is specially used to control if users can upload documents and modify RAG settings like chunk size, overlap size and so on.
  2. The local "use RAG" setting, found in chat, is used to determine if we should include RAG supplements as context in conversation.

These two settings are independent.

  1. Optionally, we can provide a global setting that automatically turns off chat "use RAG" setting after each question.

Is this what we want to achieve?

@slobentanzer , 1, 2 have been implemented. Can you help to verify this is desired effect.

slobentanzer commented 9 months ago

@fengsh27 yes, seems to work fine now. There may still be some minor hiccups in the way the new conversations are started. E.g., the conversation that is initially created or the one that appears when you close all conversations in the history is still the plain "New Conversation"; this could maybe be replaced by one of the personas ("Plain Conversation"?).

But the RAG logic now works well; will merge this PR. Next up should be the integration of the BioChatter RagAgent as the main point of RAG interaction and extension to the KG query workflow through the same RagAgent class, right?