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

fix(vectorstores.py): fetch embedding for the near_vector method #133

Closed
wants to merge 4 commits into from
Closed

fix(vectorstores.py): fetch embedding for the near_vector method #133

wants to merge 4 commits into from

Conversation

hkhairy
Copy link

@hkhairy hkhairy commented Mar 24, 2024

The near_vector method accepts a parameter called "near_vector", for which the method will perform vector search to get the nearest vector(s). We should get the vector using the embedding object, just as we did in the hybrid search method, 4 lines above it.

the near_vector method accepts a parameter called "near_vector", for which the method will perform vector search to get the nearest vector(s). We should get the vector using the embedding object, just as we did in the `hybrid` search method, 4 lines above it.
@hsm207
Copy link
Collaborator

hsm207 commented Mar 25, 2024

@hkhairy thanks for your contribution!

Unfortunately, the team decided to remove calls to near_vector (see #141) in favor of using hybrid search to do the searches. This is a more flexible option since users can configure how much vector vs keyword search they want by configuring the alpha param.

So, I will close this PR.

Looking forward to collaborating with you in the future!

@hsm207 hsm207 closed this Mar 25, 2024
@hkhairy hkhairy deleted the fix/get-embedding-for-near-vector branch March 25, 2024 20:53
@hkhairy
Copy link
Author

hkhairy commented Mar 25, 2024

@hsm207
Okay, thanks for the headsup 🙌
I have to say, your solution is more robust, since it consolidates all the calls to embedding.embed_query in one place.

Looking forward to collaborating with you as well 👌

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.

2 participants