#community-help

Hybrid Search and Auto Embedding in Typesense

TLDR Md inquired about hybrid search and auto embedding. Jason explained how to use it and clarified the software version compatibility. Md confirmed v25 works well.

Powered by Struct AI

1

1

6
1mo
Solved
Join the chat
Aug 19, 2023 (1 month ago)
Md
Photo of md5-4c155ba3e9038148c2637f40aa514679
Md
05:27 PM
For hybrid search, is it required to enable auto embedding? What if the data is inserted with embeddings from backend ?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:29 PM
You can do this, but then you will have to generate embeddings for the query term yourself and send those vectors with vector_query parameter and the keyword in the q parameter. Typesense will then do a hybrid search
05:31
Jason
05:31 PM
If you use built-in embeddings, then you Typesense will generate the embeddings for the query as well, and you don’t have to use the vector_query parameter, just send the keyword in the q parameter

1

Md
Photo of md5-4c155ba3e9038148c2637f40aa514679
Md
05:33 PM
I had tried multi search previously where the search keyword is embedded and then passed and another search is regular,
Already from v24 embedding column is populated with data. Will it work similarly ? Or I need to change the schema to enable auto embedding for better performance ?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:06 PM
It will work similarly, but only in v0.25.

In v0.24 we didn’t allow using q and vector_query together
Aug 22, 2023 (1 month ago)
Md
Photo of md5-4c155ba3e9038148c2637f40aa514679
Md
07:40 AM
I tried multi search and then merged results but yesterday tried v25 which works great.

1