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

Ability to specify the distance threshold when calling similarity_search #590

Open
andreibondarev opened this issue Apr 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@andreibondarev
Copy link
Collaborator

andreibondarev commented Apr 25, 2024

Description

In Discord it was asked whether we can specify a distance threshold when calling the Vectorsearch#ask method. The need is to return ALL record based on their relevance score as opposed to returning a static number of k: record.

Tasks

  • Explore whether vectorsearch DBs support a distance threshold parameter. If yes -- we should implement it. If no -- we should not because then it could be done on the client side.
  • Modify vectorsearch#ask(), vectorsearch#similarity_search_by_vector() and vectorsearch#similarity_search() methods to accept distance_gte: ("distance greater than or equal") parameter to set this threshold.

Note: We might need to normalize/standardize the distance scores that various vectorsearch engines return.

@andreibondarev andreibondarev added the enhancement New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant