Hybrid Search with Keyword and Vector Search

TLDR R.A.I.D asked about controlling weights between keyword-based and vector-based search results, with emphasis on personal customization. Kishore Nallan confirmed this option will be possible in the 0.25 release.

Powered by Struct AI
Jul 04, 2023 (5 months ago)
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
10:22 AM
I am looking into hybrid search for personalizing the results from my keyword based search. I want keyword search to define the candidate set and item popularity to define the main sort order. But I want use vector similarity to boost items similar to an embedding specified in the query.
How can I control the weights/balance between the keyword based search result (and item popularity sorting) and the contribution from the vector search part?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:07 PM
👋 This is possible in the upcoming 0.25 release. We have release candidate build available, if you want to test.
Jul 05, 2023 (5 months ago)
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
08:54 AM
Thank you Kishore Nallan

Regarding the gist on hybrid search:

When reading the gist it looks like we have to provide a semantic model and let Typesense generate embeddings for each item using this model.

We are not aiming for a hybrid of keyword and /semantic search/. We have our own local model for generating embeddings. We would like to enrich our index with one embeddings for each item. And then manually provide another embedding at query-time.

We then want the hybrid search result to be a mix of the keyword search and vector search (based on similarity on embeddings).

Is this possible?
And can we control the weights between the keyword- and the vector-search? Or is it fixed to 0.7 vs 0.3?