With the alibabacloud-milvus-manage Skill, you can use natural language commands to create clusters, check their status, configure public network access, manage collections, and perform text, scalar, and vector searches, as well as BM25 full text search and multi-path hybrid search. You can also implement key features such as image import with text-to-image search, and joint audio/video import with cross-modal search.
Prerequisites
You have installed the alibabacloud-milvus-manage Skill. You can get it from:
You can install the Skill in the following clients:
You have configured the Alibaba Cloud Command Line Interface (CLI) and authenticated your identity. Run
aliyun configure listto view your current configuration.You have a Virtual Private Cloud (VPC) and a vSwitch ready. The Skill will guide you to select existing network resources during execution.
You have created the Milvus service-linked roles (SLRs). The first time you use Milvus, you must create AliyunServiceRoleForCloudMilvus and AliyunServiceRoleForMilvus.
Use case
The alibabacloud-milvus-manage Skill covers eight end-to-end validation scenarios, divided into two categories: cluster management and service validation.
Scenario 1: Cluster management
Create a cluster
Enter a natural language command in the Skill client to create a Milvus instance. The Skill automatically selects a VPC and vSwitch, configures component specifications, and creates the instance.
Example Skill command:
/alibabacloud-milvus-manage Create a Milvus instance of version 2.6 in Hangzhou zone J with password <custom_password>Result:
// Skill automatically completes VPC/VSwitch selection, component spec configuration, then calls the create API
// Response:
{"success": true, "data": {"instanceId": "c-xxxxxxxxxxxx****", "orderId": "28456242743****"}}
// Creation parameters:
// - Region: cn-hangzhou, Zone: cn-hangzhou-j
// - Version: 2.6, Spec: standalone_pro, 4 CU
// - Billing method: PayAsYouGoView instance status
After the instance is created, use the Skill to view its running status, endpoints, and specification details.
Example Skill command:
/alibabacloud-milvus-manage Check the creation statusResult:
// Skill calls the list API and detail API to query instance status
Instance list:
c-xxxxxxxxxxxx**** | milvus-skill-test | status=running | v=2.6
Instance details:
- Internal endpoint: c-xxxxxxxxxxxx****-internal.milvus.aliyuncs.com
- Port: 19530
- Total CUs: 4
- Instance status: running (changes from creating to running in about 3 minutes)Enable public network access
Enable public network access for the instance and configure an IP whitelist for local development or test connections.
Example Skill command:
/alibabacloud-milvus-manage Enable public network access for the cluster and add my local IPResult:
// Skill automatically retrieves local IP and calls updatePublicNetworkStatus API
Public network access enabled:
- Public endpoint: c-xxxxxxxxxxxx****.milvus.aliyuncs.com:19530
- Whitelist: <local_public_IP>/32Query collections
Connect to the instance and query basic information and sample data for all collections.
Example Skill command:
/alibabacloud-milvus-manage Query all collections and show 3 records for eachResult:
// Skill connects to the instance using pymilvus and queries the collection list
Connection: MilvusClient(uri='http://c-xxxxxxxxxxxx****.milvus.aliyuncs.com:19530', token='root:***')
Collection list: [] (new instance has no collections, as expected)Scenario 2: Service validation
Text import and search validation
Import text data into Milvus and validate scalar search, vector search, and hybrid search. The Skill automatically creates a collection with AI Function-powered auto-embedding, inserts data, and then performs multiple types of searches.
Example Skill command:
/alibabacloud-milvus-manage I have a <data_file_path>/articles.jsonl
file where each line contains title, content, and embedding fields. Import it into the article_db collection;
create it if it doesn't exist. After importing, randomly construct scalar search and vector search tests based on the file contentReplace <data_file_path> with the actual path to the JSONL file. Each line in the file is a JSON object that contains the title and content fields.
Result:
// Skill automatically creates article_db collection (with AI Function: text-embedding-v3, 768 dimensions)
// Inserts 10 article records (only text is provided; embeddings are generated automatically)
Collection created: article_db
Fields: id, title, content, embedding
AI Function: text-embedding-v3 (dim=768)
Data inserted: 10 recordsThe Skill automatically performs the following search validations: scalar search (exact or fuzzy match based on field values, such as title like "%vector%"), vector search (ann search based on semantic similarity), and hybrid search (vector search combined with scalar filtering conditions).
We recommend that you use Milvus AI Embedding for vector data processing and search.
Version requirement: The Milvus instance version must be 2.6 or later.
Alternative: If the current instance version does not support this feature, provide pre-processed vector data.
// Scalar search: title like "%vector%"
Result: found "Introduction to Vector Databases"
// Vector search: "What is machine learning and deep learning"
Results:
top1: "Summary of Machine Learning Algorithms" (distance=0.7125)
top2: "Natural Language Processing Technologies" (distance=0.5164)
top3: "Introduction to Vector Databases" (distance=0.4779)
// Hybrid search: "database technologies" + filter='content like "%vector%"'
Results:
top1: "Introduction to Vector Databases" (distance=0.6001)
top2: "Milvus Best Practices" (distance=0.5276)Full text search and hybrid search
Create a collection configured with both BM25 full text search and text-embedding-v3 semantic vectors, and validate the combined effects of multiple search methods. The AI Function in Milvus 2.6 supports simultaneous BM25 and embedding configuration. You only need to insert raw text, and both types of vectors are generated automatically.
Example Skill command:
/alibabacloud-milvus-manage I want to do Chinese full-text search in Milvus. Create a new collection with title
and content text fields, use BM25 for full-text search, and add text-embedding-v3 for semantic search with
1024 dimensions. After creation, insert all data from the file, then test vector search, scalar search, full-text + embedding
hybrid search, and full-text + scalar + vector hybrid search using content from the fileResult:
// Skill creates hybrid_search_test collection
// Configures both BM25 Function (chinese analyzer) and text-embedding-v3 AI Function (1024 dimensions)
// Inserts 10 article records (only text is provided; BM25 sparse vectors and embedding dense vectors are generated automatically)
Collection created: hybrid_search_test
BM25 Function: content_sparse (chinese analyzer)
AI Function: text-embedding-v3 (dim=1024)
Data inserted: 10 recordsThe Skill automatically performs five types of search validations: vector search (semantic retrieval based on text-embedding-v3), scalar search (fuzzy match based on field values), BM25 full text search (keyword retrieval based on the BM25 algorithm), full-text + embedding hybrid search (BM25 and vector search fused with RRFRanker), and three-way hybrid search (BM25 + scalar filtering + vector ANN fused with RRFRanker).
// Vector search: "How to build a semantic search system"
Results:
top1: "Introduction to Vector Databases" (distance=0.5575)
top2: "Milvus Best Practices" (distance=0.5402)
// Scalar search: content like "%Milvus%"
Results: found "Introduction to Vector Databases" and "Milvus Best Practices"
// BM25 full-text search: "vector database semantic search"
Results:
top1: "Introduction to Vector Databases" (BM25 score=13.3037)
// Full-text + embedding hybrid search (RRFRanker): "deep learning and neural networks"
Results:
top1: "Summary of Machine Learning Algorithms" (score=0.0328)
// Three-way hybrid search (BM25 + scalar filter + vector ANN, RRFRanker):
// BM25="index retrieval vector", filter='title contains Milvus or vector', ANN="database indexing and retrieval technologies"
Results:
top1: "Introduction to Vector Databases" (score=0.0325)
top2: "Milvus Best Practices" (score=0.0325)Image import and search
Import image data into Milvus, automatically generate embeddings through the qwen3-vl-embedding multimodal embedding model, and validate text-to-image search. The images used in this example can be downloaded from here.
Example Skill command:
/alibabacloud-milvus-manage Import all images from the <image_directory_path>/banana
directory, then try searching with "yellow banana"Replace <image_directory_path> with the actual path to the image directory. The Milvus server must be able to access image URLs. We recommend that you upload images to an OSS bucket in the same region and use signed URLs.
Result:
// Skill creates multimodal_test collection
// Uses qwen3-vl-embedding multimodal model to automatically generate embeddings
// Uploads images to same-region OSS, passes signed URLs to Milvus
Collection created: multimodal_test
Fields: id, file_path, file_type, description, mm_value, embedding
AI Function: qwen3-vl-embedding
Data inserted: 6 records (3 banana images + 2 cat images + 1 airplane video)
// Text-to-image search: "yellow banana"
Results:
top1: banana/img2 (distance=0.5005)
top2: banana/img3 (distance=0.4953)
top3: banana/img1 (distance=0.4882)
// Text-to-image search: "cute cat"
Results:
top1: cat2 (distance=0.5265)
top2: cat1 (distance=0.4893)Cross-modal search
Import images and videos together and validate cross-modal retrieval capabilities including image-to-image search and image-to-video search.
Example Skill command:
/alibabacloud-milvus-manage First import 2 files from the tiger_cat directory and airplane1.mp4 into the database,
then use any file from tiger_cat to search for similar product images and return the top 3. Then use an image to search for similar videosResult:
// Image-to-image search: search similar images using cat1 image URL
Results:
top1: cat1 (distance=0.9996)
top2: cat2 (distance=0.9476)
top3: banana/img1 (distance=0.7483)
// Image-to-video search: search using cat1 image URL + filter='file_type=="video"'
Results:
top1: airplane.mp4 (distance=0.7180)