All Products
Search
Document Center

MaxCompute:Use MaxCompute Remote Models to Automatically Generate E-commerce Product Descriptions

Last Updated:Jun 13, 2026

This topic describes how to use MaxCompute remote models to automatically generate e-commerce product descriptions.

Scenario overview

As e-commerce and live-streaming businesses grow rapidly, the “photo-to-listing” cycle for product selection faces increasing pressure to shorten. Traditional manual annotation relies on annotators’ experience and subjective judgment, and processing massive volumes of data incurs high costs. Long-term, large-scale adoption encounters dual challenges in cost and quality control. Using AI for multimodal data processing has become a primary trend. This topic demonstrates how to access unstructured data stored in OSS using Object Table, and process it with MaxCompute remote models and AI Functions through a case study that generates image tags and summaries in an e-commerce scenario.

Solution benefits

  • Use MaxCompute Object Table to directly access data stored in OSS without complex data migration.

  • Use your own models deployed in Elastic Algorithm Service (EAS). Model service resources are used efficiently.

  • Avoid complex user-defined function encapsulation. Use MaxCompute AI Functions with simple SQL statements to extract and process image data.

Environment preparation

  • Activate MaxCompute and create a MaxCompute project. Skip this step if already completed.

  • Deploy a multimodal large language model in the Platform for AI (PAI) console under Elastic Algorithm Service (EAS). For details, see Overview of EAS. Skip this step if already completed.

  • Activate OSS and store the images to be processed in OSS. Skip this step if already completed.

  • Network connectivity:

    • If you use the VPC endpoint of PAI EAS, activate leased line connectivity and specify the configured network connection name when calling the AI Function. For configuration steps, see Access VPC (leased line direct connection).

    • If you use the Internet Endpoint of PAI EAS, configure it as an available external network address for MaxCompute before calling the AI Function. For configuration steps, see Access public network.

Data preparation

  1. Upload the e-commerce images to be processed to OSS. This example uses 50 product poster images from the Alibaba Cloud Tianchi public dataset: Poster Design Text-Image Dataset.

  2. Create an Object Table.

    SET odps.namespace.schema=true; -- Enable tenant-level schema syntax.
    
    CREATE OBJECT TABLE IF NOT EXISTS image_demo
    WITH SERDEPROPERTIES ('odps.properties.rolearn'='acs:ram::1393************:role/aliyunodpsdefaultrole')
    LOCATION 'oss://oss-cn-shanghai-internal.aliyuncs.com/mllm-demo/jpg-test/';
    
    -- Refresh metadata to cache image metadata in MaxCompute.
    ALTER TABLE image_demo REFRESH METADATA;
    
    SELECT COUNT(*) AS ROW_COUNT FROM image_demo; 
    
    +------------+
    | row_count  |
    +------------+
    | 50         |
    +------------+

Create a remote model

  1. Deploy the Omni multimodal model in the PAI EAS console and obtain the model service name, Endpoint, and Token.

  2. Register the Omni multimodal remote model in MaxCompute.

    CREATE MODEL PAI_EAS_Qwen25_Omni_3B WITH VERSION v1 
    OPTIONS(
        MODEL_SOURCE_TYPE = 'REMOTE',
        MODEL_TYPE = 'MLLM',
        TASKS = 'text-generation',
        PAI_EAS_MODEL_NAME = 'Qwen2.5-Omni-3B',
        PAI_EAS_SERVICE_NAME = 'demo_remote_model', 
        ENDPOINT = 'http://***********.cn-shanghai.pai-eas.aliyuncs.com',
        APIKEY = 'your-api-key',
        PAI_EAS_SYNC_MODE = 'true'
    )
    COMMENT "PAI EAS remote model";
    
    
    ALTER MODEL PAI_EAS_Qwen25_Omni_3B ADD VERSION v2 
    INPUT(data BINARY, promt STRING) 
    WITH OPTIONS(
        MODEL_SOURCE_TYPE = 'REMOTE',
        MODEL_TYPE = 'MLLM',
        TASKS = 'text-generation',
        PAI_EAS_MODEL_NAME = 'Qwen2.5-Omni-3B',
        PAI_EAS_SERVICE_NAME = 'demo_remote_model', 
        ENDPOINT = 'http://************.cn-shanghai.pai-eas.aliyuncs.com',
        APIKEY = 'your-api-key',
        PAI_EAS_SYNC_MODE = 'true'
    )
    COMMENT "PAI EAS remote model binary input";
  3. View the remote model.

    desc model PAI_EAS_Qwen25_Omni_3B;
    
    ID = 20250909024319251glhmocwqddl
    +------------------------------------------------------------------------------------+
    |                  Model Information                                                 |
    +------------------------------------------------------------------------------------+
    | Owner:                    ALIYUN$***********************                           |
    | Project:                  pd_test_model                                            |
    | Schema:                   default                                                  |
    | Model Name:               PAI_EAS_Qwen25_Omni_3B                                   |
    | Model Type:               MLLM                                                     |
    | Source Type:              REMOTE                                                   |
    | Default Version:          v1                                                       |
    | CreateTime:               2025-09-04 10:29:28                                      |
    | LastModifiedTime:         2025-09-09 10:43:11                                      |
    | Model ID:                 46311b6397494a84ad23c5a4********                         |
    | Comment:                  PAI EAS remote model url input                           |
    +------------------------------------------------------------------------------------+
    |                Version Information                                                 |
    +------------------------------------------------------------------------------------+
    | Owner:                    ALIYUN$***********************                           |
    | Project:                  pd_test_model                                            |
    | Schema:                   default                                                  |
    | Model Name:               PAI_EAS_Qwen25_Omni_3B                                   |
    | Model Type:               MLLM                                                     |
    | Source Type:              REMOTE                                                   |
    | Version Name:             v1                                                       |
    | Version ID:               c389823cd0324b72b1c0d55***********                       |
    | Path:                                                                              |
    | CreateTime:               2025-09-04 10:29:28                                      |
    | LastModifiedTime:         2025-09-04 10:29:28                                      |
    | apikey:                   Yzc4*******mNzFkMGM********4YzEwZjY1NTA*********NzkyNw== |
    | endpoint:                 http://13933481********.cn-shanghai.pai-eas.aliyuncs.com |
    | pai_eas_model_name:       Qwen2.5-Omni-3B                                          |
    | pai_eas_service_name:     demo_eas_model                                           |
    | pai_eas_sync_mode:        true                                                     |
    | remote_service_type:      PAI-EAS                                                  |
    +------------------------------------------------------------------------------------+
    | Input           | Type       | Comment                                             |
    +------------------------------------------------------------------------------------+
    +------------------------------------------------------------------------------------+
    
    OK

Data analytics

Use the MaxCompute AI_GENERATE function to classify images and generate descriptive summaries:

SET odps.namespace.schema=true; 

SELECT
  key,
  AI_GENERATE(
    PAI_EAS_Qwen25_Omni_3B, v1, image_url,
    "Identify and extract the product category from the e-commerce sales poster. Return only one of the following six options: Beauty, Apparel, Daily Use, Food, Other, Electronics. Do not include any other text or information.","IMAGE"
  ) as item_catagory,
  AI_GENERATE(
    PAI_EAS_Qwen25_Omni_3B, v1, image_url,
    "You are a professional e-commerce copywriter. Generate a product description summary based on the provided e-commerce sales poster.
     Requirements: 1. The summary must accurately reflect key information from the poster, such as product features and promotions. 2. Ensure fluent, readable language with no special characters or garbled text. Keep it under 50 characters. 3. Use Chinese only, except for English brand names. Do not mix in any English words.
     Example: Pure cotton T-shirt on limited-time offer—buy one, get one free! Only 3 days left!"
  ) as item_description
  from (
    select GET_SIGNED_URL_FROM_OSS(
      'pd_test_model.default.image_demo', key, 604800
    ) as image_url, key as key
    from pd_test_model.default.image_demo
) Limit 10;


-- If reading BINARY data.
SELECT
  key,
  AI_GENERATE(
    PAI_EAS_Qwen25_Omni_3B, v2, image_binary,
    "Identify and extract the product category from the e-commerce sales poster. Return only one of the following six options: Beauty, Apparel, Daily Use, Food, Other, Electronics. Do not include any other text or information"
  ) AS item_catagory,
  AI_GENERATE(
    PAI_EAS_Qwen25_Omni_3B, v2, image_binary,
    "You are a professional e-commerce copywriter. Generate a product description summary based on the provided e-commerce sales poster.
     Requirements: 1. The summary must accurately reflect key information from the poster, such as product features and promotions. 2. Ensure fluent, readable language with no special characters or garbled text. Keep it under 50 characters. 3. Use Chinese only, except for English brand names. Do not mix in any English words.
     Example: Pure cotton T-shirt on limited-time offer—buy one, get one free! Only 3 days left!"
  ) AS item_description
  FROM (
    SELECT GET_DATA_FROM_OSS(
      'pd_test_model.default.image_demo', key
    ) AS image_binary, key AS key
    FROM pd_test_model.default.image_demo
) Limit 10;

Click to view execution results

ID = 2025090909524183gsu********
Log view:
https://logview.alibaba-inc.com/logview/?h=http://server-ip:8008/daily&p=pd_test_model&i=2025********4183gsuq57sqddl&token=********
----------------------------------------------------------------------------------------------
                    STAGES        STATUS  TOTAL  COMPLETED  RUNNING  PENDING  BACKUP
M1_job_0 .................    TERMINATED      1          1        0        0       0
----------------------------------------------------------------------------------------------
STAGES: 01/01    [==========================>>] 100%  ELAPSED TIME: 11.65 s    
----------------------------------------------------------------------------------------------
+--------------------+---------------+------------------+
| key                | item_catagory | item_description |
+--------------------+---------------+------------------+
| alimamazszw-1.jpg  | Food          | Limited-time beef offer at Western restaurant—order now for a gift, served with fresh basil leaves. Don’t miss this delicious deal! |
| alimamazszw-10.jpg | Electronics   | New-feature fan on flash sale—lowest price ever! Shop now! |
| alimamazszw-11.jpg | Electronics   | Stylish helmet on sale with MIPS protection technology—CNY 270 off, now only CNY 729! Limited-time offer—act fast! |
| alimamazszw-12.jpg | Beauty        | mi**ggy Ultra-Fine Smooth Eyeliner Gel—soft, smooth, and smudge-proof. Buy two, get CNY 10 off—limited-time offer! |
| alimamazszw-13.jpg | Electronics   | Special offer on IX35 wiper blades—today’s deal! Grab yours now! |
| alimamazszw-14.jpg | Daily Use     | Biological tissue adhesive produced by Beijing ** Co., Ltd.—for wound closure in animal experiments only. Valid for 1 year. |
| alimamazszw-15.jpg | Beauty        | ** Hair Growth Essence—awakens follicles and promotes new hair growth. |
| alimamazszw-16.jpg | Beauty        | Radiant blush on limited-time offer—buy one, get one free! More surprises on Carnival Day! |
| alimamazszw-17.jpg | Beauty        | ** Skincare Cream in black-and-white packaging—order 6 pieces and get 6 gifts worth CNY 2,340! Limited-time offer—while supplies last! |
| alimamazszw-18.jpg | Daily Use     | ** Mouthwash in multiple flavors on promotion—CNY 30 coupon available! Limited quantity—shop now! |
+--------------------+---------------+------------------+