How to access individual dense and sparse scores in hybrid retrieval with Milvus? #41306
Replies: 1 comment 3 replies
-
MilvusCollectionHybridSearchRetriever is langchain class that implements the langchain.BaseRetriever class. It is impossible to get the scores from the interfaces of langchain.BaseRetriever. You can use pymilvus interfaces to achieve it. Basically,
is almost equal to:
In milvus, the two AnnSearchRequests are executed separately, the two results are combined by the WeightedRanker.
Note: I set the "limit=6" for sub-request, because the lanchain implementation set this value by: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
I'm currently using langchain with Milvus as the vector store, and I'm implementing a hybrid search setup that combines both dense and sparse retrieval.
This is a sample code I'm using:
For search
I'd to like know about individual similarity scores using both embeddings to understand more about ranking strategy and assess confidence in retrieval.
Is there any way to retrieve both dense and sparse similarity scores in the above implementation?
Any pointers or workarounds would be appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions