Specify in the documentation of the HnswLibDocIndex that 'cosine' refers to cosine distance, not cosine similarity.
In the hnswlib documentation they claim it to be similarity, but it actually is distance. I opened an issue on their side, and they will change it in their documentation.
Specify in the documentation of the
HnswLibDocIndexthat 'cosine' refers to cosine distance, not cosine similarity.In the hnswlib documentation they claim it to be similarity, but it actually is distance. I opened an issue on their side, and they will change it in their documentation.