Hybrid search in weaviate

hi, I’m working with hybrid search in Weaviate and have a few questions that need clarification:

  1. Is there a parameter to set a threshold value for hybrid search to filter out results with a minimum score? While I see the max_distance parameter, it appears to be specific to vector search.
  2. How is the score calculated in hybrid search? My understanding is that it might use Reciprocal Rank Fusion (RRF), but I’d like confirmation on this.
  3. How does the explainScore feature work in hybrid search? Since hybrid search combines keyword search and vector search, how does the explanation indicate whether the result is influenced by keyword search, vector search, or both?

Thank you in advance for your insights!

Hey @Rohini_vaidya, Happy New Year!

Regarding filters with hybrid search

The max distance parameter relates to the vector component in similarity searches as you mentioned. While we currently don’t have a min score parameter, that sounds like a valuable feature to suggest as feature Sign in to GitHub · GitHub.

If you’d like more control over keyword relevance, you can adjust the alpha parameter to lean more towards keyword-based searches. Details on balancing keyword and vector searches

For your second point:

Relative Score Fusion is the default fusion method starting from v1.24

Lastly, Hybrid Search uses both keywords and vector searches simultaneously. Here’s how it works:

  1. It retrieves the best results for both keyword (BM25) search and vector (nearXXX) search.

  2. An algorithm combines these results into a weighted output.

The alpha parameter allows you to control the weighting:

• Default: 0.75 (balanced between vector and keyword).

• 1: Pure vector search.

• 0: Pure keyword search.

Results are ranked based on a combination of BM25 and vector scores

Best regards,
Mohamed Shahin
Weaviate Support