-
Notifications
You must be signed in to change notification settings - Fork 159
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
[vertexai] Add Hybrid Search Capabilities to VertexAI Vector Search #628
Open
lspataroG
wants to merge
20
commits into
langchain-ai:main
Choose a base branch
from
lspataroG:vector-search-hybrid
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lspataroG
changed the title
[vertexai] Add Hybrid Search Capability to VertexAI Vector Search
[vertexai] Add Hybrid Search Capabilities to VertexAI Vector Search
Dec 1, 2024
lkuligin
requested changes
Dec 2, 2024
libs/vertexai/langchain_google_vertexai/vectorstores/_searcher.py
Outdated
Show resolved
Hide resolved
…-google into vector-search-hybrid
@lkuligin I am not sure why it is timing out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🆕 New Feature: Add Hybrid Search Capability to Vector Search, see here.
add_texts_with_embeddings
to be able to pass both dense and sparse embeddings (useful anyway as many users already have precomputed embeddings).similarity_search_by_vector_with_score
to take in input a sparse embedding in addition to the dense one, added parameterrrf_ranking_alpha
(default to 1) to be able to weight between dense and sparse importance during search.similarity_search_by_vector_with_score
return both scores inside a dictionary with format:[(Document, {"sparse_score": 0.2, "dense_score": 0.7})]
, otherwise the previous output format is preserved:[(Document, 0.7)]
.test_add_texts_with_embeddings
andtest_similarity_search_by_vector_with_score_output_shape