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

Default minrelevancescore to zero

Open awharrison-28 opened this issue 2 years ago • 3 comments

Motivation and Context

A default minRelevanceThreshold of 0.7 works well with OpenAI's ada embeddings generation, but not necessarily with other models. It also is likely to return no results as the most relevant item could be less than 0.7. To ensure that similarity search always returns at least one result, this limit should default to 0.

Description

minRelevanceThreshold for similarity search is 0.0 across the board.

Contribution Checklist

  • [ ] The code builds clean without any errors or warnings
  • [ ] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [ ] All unit tests pass, and I have added new tests where possible
  • [ ] I didn't break anyone :smile:

awharrison-28 avatar May 12 '23 21:05 awharrison-28

Folks, I don't have enough context to submit this one. Given the discussion, I'd like to have a quick chat about it. Let's follow up.

shawncal avatar May 16 '23 17:05 shawncal

@awharrison-28, @dluc, were you able to connect about this change? Shall we proceed, modify, or close?

shawncal avatar May 19 '23 19:05 shawncal

@awharrison-28 @dluc I'm going to flip this to "Draft" to get it off the queue. Please follow up - reopen and ping me to merge, or "Close with comment" if we're not going to take this change.

shawncal avatar May 23 '23 18:05 shawncal

Closing PR. @awharrison-28 feel free to reopen if/when ready to submit.

shawncal avatar Jun 12 '23 19:06 shawncal