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

[vertexai] Add Hybrid Search Capabilities to VertexAI Vector Search #628

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

lspataroG
Copy link
Contributor

🆕 New Feature: Add Hybrid Search Capability to Vector Search, see here.

  • Introduced function add_texts_with_embeddings to be able to pass both dense and sparse embeddings (useful anyway as many users already have precomputed embeddings).
  • Modified function similarity_search_by_vector_with_score to take in input a sparse embedding in addition to the dense one, added parameter rrf_ranking_alpha (default to 1) to be able to weight between dense and sparse importance during search.
  • If a sparse embedding is passed then 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)].
  • Add tests: test_add_texts_with_embeddings and test_similarity_search_by_vector_with_score_output_shape

@lspataroG 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
@lspataroG lspataroG requested a review from lkuligin December 3, 2024 10:29
@lspataroG
Copy link
Contributor Author

@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants