Introducing PyMilvus Integration with Embedding Models
Jun 5, 2024Stephen Batifol

Summary
This post introduces the integration of embedding and reranking models within the PyMilvus SDK, enabling users to generate dense and sparse vectors and apply reranking for improved search relevance. It demonstrates practical usage with Milvus Lite, covering dense embeddings using `DefaultEmbeddingFunction` (e.g., `all-MiniLM-L6-v2`), sparse embeddings with `BM25EmbeddingFunction` (including fitting and saving model parameters), and reranking with `JinaRerankFunction`. The post details the installation of the `pymilvus[model]` package and provides code examples for each integration.
More from the Benchmarking and Performance Analysis trail
- Troubleshooting a Search Slowdown After Upgrading Milvus: Lessons from the WPS Team
- How to Safely Upgrade from Milvus 2.5.x to Milvus 2.6.x
- How to Debug Slow Search Requests in Milvus
- Hands-On with VDBBench: Benchmarking Vector Databases for POCs That Match Production
- https://zilliz.com/blog/vdbbench-1-0-benchmarking-with-your-real-world-production-workloads