Skip to content

Understanding SimilarityEvaluation and Similarity Threshold #577

Answered by SimFG
mayalinetsky-kryon asked this question in Q&A
Discussion options

You must be logged in to vote

This maximum distance actually depends on the VectorBase you set. For example, with the default faiss, the resulting search distance range should be 0-4. By default, the smaller the distance, the smaller the distance. At the same time, the range of similarity_threshold is 0-1.

For example, if the similarity_threshold is now set to 0.6, the distance obtained by using faiss between the two vectors is now 0.3. At this time, the smaller the similarity distance, the more similar they are. So the similarity value we get is: 4-0.3=3.7, and the smallest similarity value is 0.6*4=2.4. Because 3.7 is greater than 2.4, we judge that the current cache value is valid.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mayalinetsky-kryon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants