semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Bug: The Milvus connector search metric type is incorrect

Open shuaihuadu opened this issue 8 months ago • 0 comments

Describe the bug The metricType parameter in the SearchAsync method of the Milvus connector is incorrect.

The current code hard-codes the milvus search metric type to SimilarityMetricType.Ip, which causes the issue where even if the Metric type is specified as SimilarityMetricType.Cosine when creating the MilvusMemoryStore, SimilarityMetricType.IP is still used during the search.

To Reproduce

The source code:

semantic-kernel/dotnet/src/Connectors/Connectors.Memory.Milvus /MilvusMemoryStore.cs#L449

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image

Platform

shuaihuadu avatar Jul 02 '24 16:07 shuaihuadu