Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] incorrect OpenSearch Score for innerproduct in knn scriptscoring #1258

Closed
1 of 4 tasks
tstadel opened this issue Sep 19, 2022 · 0 comments · Fixed by #1447
Closed
1 of 4 tasks

[DOC] incorrect OpenSearch Score for innerproduct in knn scriptscoring #1258

tstadel opened this issue Sep 19, 2022 · 0 comments · Fixed by #1447
Assignees
Labels
2 - In progress Issue/PR: The issue or PR is in progress. Machine Learning
Milestone

Comments

@tstadel
Copy link

tstadel commented Sep 19, 2022

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request.
The formula for the OpenSearch Score of the innerproduct in the table at the bottom of https://opensearch.org/docs/latest/search-plugins/knn/knn-score-script/ is incorrect. According to this formula, an increasing innerproduct metric would lead to a lower OpenSearch Score, which is clearly the opposite of what is intended by the dotproduct similarity metric.

This is only a problem with the docs. In reality, OpenSearch correctly calculates the innerproduct OpenSearch Score for script scoring according to the formula in the table at the bottom of https://opensearch.org/docs/latest/search-plugins/knn/approximate-knn/ (adapted for the additional minus in the distance function).
Most likely this is a follow-up error regarding the once wrong innerproduct distance function reported in #397 (which once was the same as l1). It seems like the distance function has been corrected but the OpenSearch Score is still the one for l1.

What other resources are available?
related to #397

@Naarcha-AWS Naarcha-AWS added 1 - Backlog Issue: The issue is unassigned or assigned but not started and removed untriaged labels Sep 19, 2022
@Naarcha-AWS Naarcha-AWS self-assigned this Sep 19, 2022
@Naarcha-AWS Naarcha-AWS added this to the 2022-Q3 milestone Sep 19, 2022
@Naarcha-AWS Naarcha-AWS added 2 - In progress Issue/PR: The issue or PR is in progress. and removed 1 - Backlog Issue: The issue is unassigned or assigned but not started labels Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In progress Issue/PR: The issue or PR is in progress. Machine Learning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants