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

Don't re-query the database when using Pgvector #33

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

swerner
Copy link
Contributor

@swerner swerner commented Jan 3, 2024

Tentative fix for #32

It looks like there is some provider-specific code elsewhere in the file, but additionally when using pgvector, this method ends up doing two queries to the database.

This is just a hacky fix to get a conversation started - I noticed you have the pgvector.rb overrides file...maybe there's a similar pattern for the other vector dbs to just call the override methods instead of overloading this one with special cases for every one?

@andreibondarev andreibondarev self-requested a review January 4, 2024 02:10
Copy link
Collaborator

@andreibondarev andreibondarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swerner Thank you Scott! 🚀

@andreibondarev andreibondarev merged commit 10e04e6 into patterns-ai-core:main Jan 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotations from the neighbor gem are lost when using similarity_search with pgvector
2 participants