Hybrid Search Mistral Embed
Hybrid Search with Mistral
This recipe will show you how to run hybrid search with embeddings from Mistral.
Requirements
-
Weaviate cluster
- You can create a 14-day free sandbox on WCD
- Embedded Weaviate
- Local deployment
- Other options
-
Mistral API key. Grab one here.
Connect to Weaviate
Only choose one option from the below.
Weaviate Cloud Deployment
Embedded Weaviate
Local Deployment
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 with a where filter
Find Jeopardy questions about elephants, where the category is set to Animals.