-
Notifications
You must be signed in to change notification settings - Fork 82
Conversation
This PR migrates from weaviate to sqlite-vec. I tried to keep the logic flow the same as before. Initial tests show prompt augmented correctly after matching a search.
Bumps [click](https://github.com/pallets/click) from 8.1.7 to 8.1.8. - [Release notes](https://github.com/pallets/click/releases) - [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst) - [Commits](pallets/click@8.1.7...8.1.8) --- updated-dependencies: - dependency-name: click dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Animated gif
Bump click from 8.1.7 to 8.1.8
This PR migrates from weaviate to sqlite-vec. I tried to keep the logic flow the same as before. Initial tests show prompt augmented correctly after matching a search.
query_sql = """ | ||
WITH distances AS ( | ||
SELECT name, type, status, description, | ||
vss_distance(embedding, ?) as distance |
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.
We need to use cosine distance here. I could not find documentation on vss_distance function, and not sure which kind of distance it computes. I see a vec_distance_cosine function which we can use instead.
https://alexgarcia.xyz/sqlite-vec/api-reference.html#vec_distance_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.
Thanks ! well captured , as per slack: I started out with sqlite-vss and then got a warning it was deprecated, so flipped to the sqlite-vec, but left the old similarity distance call in place which weirdly still worked
The merge-base changed after approval.
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.
Looks good!
The merge-base changed after approval.
Migrate to sqlite-vec
This PR migrates from weaviate to sqlite-vec.
I tried to keep the logic flow the same as before. Initial tests show prompt augmented correctly after matching a search.
How to test
Load the packages into the database:
Select a package from data and test in chat " is malicious-crates-dummy from crates safe to use?"
You should then see:
Closes: #437