mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Reset the database

Open taranjeet opened this issue 2 years ago • 3 comments

  • it would also be nice if there was a method to reset the database. I have no idea about chroma, I'm sure you can just delete the db folder.
  • this issue is opened on behalf of discord user cachho, message link

taranjeet avatar Jun 23 '23 12:06 taranjeet

@cachho @taranjeet the chroma db docs mention this : Screenshot 2023-06-26 at 2 50 59 PM This will ideally delete the collection. The problem is we create collection only when the app is instantiated and trying to access add, add_local or query after a db reset will raise errors. Deleting the DB folder is feasible but I think it is not ideal :(

aaishikdutta avatar Jun 26 '23 09:06 aaishikdutta

This will ideally delete the collection. The problem is we create collection only when the app is instantiated and trying to access add, add_local or query after a db reset will raise errors. Deleting the DB folder is feasible but I think it is not ideal :(

agree, maybe we can just reinstate?

cachho avatar Jun 26 '23 11:06 cachho

I've been thinking about this a little, I still think the reset is good, but here's a scenario.

You have 5 videos indexed and 500 QnA pairs. You have them listed in a local file, so data loss isn't an issue.

You decide that 1 QnA pair is outdated, what do you do? A reset would definitely get you there, it's a solution with the big hammer, and it should definitely be a part of the package.

But the problem is that you will have to reembed, and spend tokens again, to generate the 499 remaining questions and the videos.

We could get closer to that by allowing to reset a certain datatype only (assuming chroma allows filtering like that).

But at the end of the day, I don't want to lose focus. By the time we are done we have built a full cli-administration tool. So the ideal solution (maybe it already exists) is something like Phpmyadmin/Pgadmin/Adminer for Chroma. And that should be developed independently of this package.

With that being said, a brute reset should still exist.

cachho avatar Jun 26 '23 11:06 cachho