apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.45k stars 973 forks source link

Inconsistency Vector Search Cosine Similarity #13386

Closed gauravj88 closed 1 month ago

gauravj88 commented 1 month ago

Description

I'm getting diffrent result when passign topk=1000 vs topk=100 https://hub.mangoapps.com/msc/NjA3NjI0XzQ4MTcyNzQ https://hub.mangoapps.com/msc/NjA3NjI1XzQ4MTcyODI

Version and environment details

solr 9.6 lucence latest version

msokolov commented 1 month ago

This is to be expected from approximate KNN search. If you want to get a sense of the accuracy you need to look at a larger number of results in aggregate rather than a single example.