-
Couldn't load subscription status.
- Fork 1.2k
feat: make distance_metric configurable in vector stores #3375
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
base: main
Are you sure you want to change the base?
feat: make distance_metric configurable in vector stores #3375
Conversation
b967086 to
a0e0c70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ChristianZaccaria ! Thanks for your PR, nice work. I proposed some improvements.
llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py
Outdated
Show resolved
Hide resolved
|
I made a comment on the issue. Would like to discuss this more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see linked issue
- Configurable distance_metric enabled for PGVector. - Added plumbing to support configuring more distance metrics for each vector provider.
a0e0c70 to
9658581
Compare
| Raises: | ||
| NotImplementedError: If the distance metric is not supported yet | ||
| """ | ||
| if distance_metric != "COSINE": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sqlite-vec supports other distance metrics.
see here:
https://github.com/asg017/sqlite-vec/blob/main/site/api-reference.md#distance-functions-distance
but I think it's defined during the table creation: https://github.com/asg017/sqlite-vec/blob/a2dd24f27ec7e4a5743e58f5ab6835deea5db58d/tests/afbd/test-afbd.py#L81
What does this PR do?
Make
distance_metricconfigurable in vector stores:We should create GitHub issues for each provider.
Closes #3213
Test Plan