You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d75517
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: examples/hello_hybrid_sparse_dense.py
+44-8Lines changed: 44 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,26 @@
1
1
# A demo showing hybrid semantic search with dense and sparse vectors using Milvus.
2
+
#
2
3
# You can optionally choose to use the BGE-M3 model to embed the text as dense
3
-
# and sparse vectors, or simply use random generated vectors as the example.
4
-
5
-
# To use BGE-M3 model, you need to install the optional `model` module in pymilvus:
4
+
# and sparse vectors, or simply use random generated vectors as an example.
5
+
#
6
+
# You can also use the BGE CrossEncoder model to rerank the search results.
7
+
#
8
+
# Note that the sparse vector search feature is only available in Milvus 2.4.0 or
9
+
# higher version. Make sure you follow https://milvus.io/docs/install_standalone-docker.md
10
+
# to set up the latest version of Milvus in your local environment.
11
+
12
+
# To connect to Milvus server, you need the python client library called pymilvus.
13
+
# To use BGE-M3 model, you need to install the optional `model` module in pymilvus.
14
+
# You can get them by simply running the following commands:
15
+
#
16
+
# pip install pymilvus
6
17
# pip install pymilvus[model]
18
+
19
+
# If true, use BGE-M3 model to generate dense and sparse vectors.
20
+
# If false, use random numbers to compose dense and sparse vectors.
7
21
use_bge_m3=True
22
+
# If true, the search result will be reranked using BGE CrossEncoder model.
0 commit comments