GPTCache icon indicating copy to clipboard operation
GPTCache copied to clipboard

[Enhancement]: Ability to use the vector-store as a cache

Open shashankram opened this issue 1 year ago • 3 comments

What would you like to be added?

Provide the ability to use the vector store in use for caching as well. For e.g., if I am using Weaviate, I would like to use it for both caching and vector storage.

Thanks

Why is this needed?

No response

Anything else?

No response

shashankram avatar Aug 08 '24 03:08 shashankram

I think this is not a very good idea, because in this caching process, the scalar data will generally be very large, that is, the data size of the questions and their answers is large, and it is not suitable to store them in the vector database, because the advantage of the vector database is vector storage and its search. If many scalars are placed in the vector database, on the one hand, it will not be conducive to retrieval, and on the other hand, it will greatly increase the pressure on the vector database and cause a waste of resources.

SimFG avatar Aug 08 '24 06:08 SimFG

I understand, though the operational complexity with using multiple datastores for caching and vectorization is high. For smaller deployments, I was wondering if using the vector store as a cache for the scalar data would be feasible.

shashankram avatar Aug 08 '24 14:08 shashankram

For this case, you can try using sqlite.

SimFG avatar Aug 09 '24 02:08 SimFG