UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
15.09k stars 2.46k forks source link

symmetric vs asymmetric search #2267

Open siddhsql opened 1 year ago

siddhsql commented 1 year ago

w.r.t. https://www.sbert.net/examples/applications/semantic-search/README.html A critical distinction for your setup is symmetric vs. asymmetric semantic search:

why does symmetric vs asymmetric search make any difference as far as the model is concerned? why does the model care about this? I was thinking of using all-MiniLM-L6-v2 for an application but I will be doing asymmetric search on a knowledge base and this model falls under symmetric search, so should I not use it? what is a good model to generate embeddings for asymmetric search? i assume the same model should be used to generate the embedding for both the query and the documents - is that correct?

adding to above, on one hand the docs say that using correct model (symmetric vs asymmetric) is critical for the task. and on the other hand this example is provided as reference for doing semantic search on a KB and what model does it use? it uses multi-qa-MiniLM-L6-cos-v1 which is a symmetric search model as listed on symmetric search models page. what gives?

Bobolx00 commented 1 year ago

Same question... Have i found some usefull resources?