Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Conversational Retrieval QA Chain - context update - question

Open haimco50 opened this issue 1 year ago • 5 comments

Is there any way to update the context of the Conversational Retrieval QA Chain (chatFlow from marketplace) - seems that that the context is "Hard Coded" with only the info coming from the vector store and there is no way to update it externally - ideally I want to have the ability to update it from a plan text file

haimco50 avatar Apr 04 '24 17:04 haimco50

Do you mean this one?

Screenshot 2024-04-05 003352

You need to save the template and then you can change it.

toi500 avatar Apr 04 '24 22:04 toi500

thanks for your answer - I know I can edit the prompt over this area , the issue is that I want to update it from an external file and potentially from some template file dynamicly, if the node component had another input with some prompt node that would be ideal or in other way somehow...

haimco50 avatar Apr 05 '24 09:04 haimco50

No sure what you want to accomplish here but when you use a Multi Retrieval QA Chain you can add a Vector Store Retriever node to let the model know when you use the info from a Vector Store and then, if you want to, use the Chain Tool to connect the whole chain to an Agent and let the Agent when to use the chain.

I do not think there is a easy way to do it "dynamically".

-- Screenshot 2024-04-05 144151

Screenshot 2024-04-05 144411

Here is the template of the whole chatfhow: Template (Multi Retrieval Chain) Chatflow.json

toi500 avatar Apr 05 '24 12:04 toi500

@haimco50 the ideal way is as follow: 1.) Upsert your data with different metadata to vector store 2.) Using Flowise API, you can override the config metadata filter:

{
  "question": "what is my name",
  "overrideConfig": {
     "pineconeMetadataFilter": {"source": "doc1"}
  }
}

HenryHengZJ avatar Apr 07 '24 18:04 HenryHengZJ

thanks much @toi500 and @HenryHengZJ for your suggestions - will try it out!

haimco50 avatar Apr 08 '24 10:04 haimco50