DistanceStrategy used for faiss #2729
Replies: 1 comment
-
🤖 It's great to see your interest in contributing to Langchain-Chatchat! Your observation about the distance strategy in the faiss_cache.py module is valuable. If you believe that using 'MAX_INNER_PRODUCT' instead of 'METRIC_INNER_PRODUCT' would be more appropriate, I encourage you to go ahead and create a pull request with your proposed change. Your contribution will help improve the accuracy and efficiency of Langchain-Chatchat. Thank you for considering to contribute! This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In faiss_cache.py module, when init faiss instance, the current code is using METRIC_INNER_PRODUCT as distance_strategy, shouldn't this be 'MAX_INNER_PRODUCT'?
since there is no METRIC_INNER_PRODUCT in langchain_community.vectorstores.utils.DistanceStrategy, only:
besides, in langchain_community.vectorstores.faiss, during index initialisation, we can see the logic as below:
Beta Was this translation helpful? Give feedback.
All reactions