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

Sidebar #42

Merged
merged 17 commits into from
Jan 25, 2024
Merged

Sidebar #42

merged 17 commits into from
Jan 25, 2024

Conversation

slobentanzer
Copy link
Contributor

Several cosmetic changes and smaller adjustments

@slobentanzer
Copy link
Contributor Author

@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:

  • conversations do not work (long "working" dots and then an empty response field after timeout)
  • default values weird:
    • the RAG checkbox in the chat should be off by default, but it's on
    • the mask splash screen should be off by default (in the settings, it is off), but it shows up when pressing "New Persona"; when it shows up, additionally there is no "never show again" button

@fengsh27
Copy link
Collaborator

@slobentanzer Sure, I'll have a look

@fengsh27
Copy link
Collaborator

fengsh27 commented Jan 19, 2024

@slobentanzer For the bugs:

  • Conversation issue, it worked on my side. This issue is probably due to no api key or incorrect api key. You can double check if, in rag settings page, it can connect to database. Without api key, it would fail to connect to database.
  • RAG checkbox issue, it worked on my side. To ensure the browser is initial state, we can delete local storage in "Developer Tools", refer to the following image.

image

  • Mask splash screen issue: I can reproduce it on my machine. I'll check why it doesn't work.

@fengsh27
Copy link
Collaborator

fengsh27 commented Jan 22, 2024

@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
Copy link
Contributor Author

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
Copy link
Contributor Author

slobentanzer commented Jan 24, 2024

@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
Copy link
Collaborator

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
Copy link
Collaborator

fengsh27 commented Jan 24, 2024

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
Copy link
Contributor Author

Is this what we want to achieve?

@fengsh27 yes, correct

@fengsh27
Copy link
Collaborator

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

@fengsh27
Copy link
Collaborator

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
Copy link
Contributor Author

@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?

@slobentanzer slobentanzer merged commit b9b68d5 into main Jan 25, 2024
@slobentanzer slobentanzer deleted the sidebar branch January 25, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment