Hybrid Search Multilingual V2.0
Dependencies
Connect to Weaviate
Create a collection
Collection stores your data and vector embeddings.
Import Data
Hybrid Search
The alpha parameter determines the weight given to the sparse and dense search methods. alpha = 0 is pure sparse (bm25) search, whereas alpha = 1 is pure dense (vector) search.
Alpha is an optional parameter. The default is set to 0.75.
Hybrid Search only
The below query is finding Jeopardy questions about animals and is limiting the output to only two results. Notice alpha is set to 0.80, which means it is weighing the vector search results more than bm25. If you were to set alpha = 0.25, you would get different results.
Hybrid Search on a specific property
The properties parameter allows you to list the properties that you want bm25 to search on.
Hybrid Search with a where filter
Find Jeopardy questions about elephants, where the category is set to Animals.
Hybrid Search with a custom vector
You can pass in your own vector as input into the hybrid query, by using the vector parameter.