0

I am building a recommendation engine for a project, for which I intend to use a vector database for similarity search (currently using redis for tests). The products I work on have ~15 diferent fields and instead of doing a complex and expensive embedding, I decided to simply manually ordinally encode and scale the fields. The resulting vector works great with redis vector similarity search !

However, I would like the customers to be able to weight some fields. Lets take an example with cars : maybe the user would like to put the price twice as important as the engine power. It is mathematically very easy to do, since on the vectorial product the KNN should do you could just add a factor of two on the price field. I however did not find any vector database that would allow me to do so, since most to all of them are meant for embeddings instead of my specific use case.

Do you have any suggestions on how to do it ? Any database have it implemented ? Thanks,

Utorque
  • 13
  • 5
  • I would look at FT.AGGREGATE and APPLY. You can have your formula for a weighted score and then sort by the result. You will still have to think of how many vectors to get (the top-k won’t be the top weighted k probably) – A. Guy Sep 02 '23 at 08:43

0 Answers0