Search code examples
large-language-modelflowise

How to quickly "reset" when prototyping with Flowise with an in-memory Vector DB


When prototyping with Flowise, I'll create a flow with a document uploader, an in-memory vector DB, and a chat agent to trigger the flow. When I want to "reset" the prototype, and try something else (fast iteration), I don't know how to clear the data out so I can try something different. (See flow in picture.)

I've tried is changing my data that's to be uploaded, deleting the in-memory database and the file uploader, adding them in again, and clicking save. However the chat agent still responds as the same as before.

What's a fast way to clear the chat flow of previously uploaded data?enter image description here


Solution

  • What’s not intuitive is that “save” operation needs to be done to regenerate code changes each time AND chat cache needs to be cleared.

    To reset a chat flow so you can feed it new data (as shown in the original poster's picture) you need to do the following:

    1. make the changes wanted to the data file accessed by the file uploader (see attached picture) click "Clear Chat History" icon and click Save icon
    2. delete in-memory vector store and click Save icon
    3. add in new in-memory vector store and click Save icon

    Then in the next chat, it will check it's cached chat history but it will be blank so then: the new data will flow from the file uploader, and be embedded into the in-memory vector store, and the new data in the vector store will be used to pass along the top "winners" from the DB to the LLM and the chat agent will sort out what it wants to generate.

    More background and screenshots here.