# es-model-customization

Part of **ES**

# Elasticsearch Embedding Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|----------|---------------|---------------|-------------|
| Customize Embedding Model | Console > AI Search > Model Service > Create Model | RAM user with required model service permissions, MaxCompute project or OSS Bucket with training data, AccessKey ID and secret with read/write permissions | Create and train a custom text embedding or embedding dimensionality reduction model using business data from MaxCompute or OSS |

## Operation Steps

### Customize Embedding Model

**Navigation**: Console > AI Search > Model Service > Create Model

**Prerequisites**:
- RAM user with required model service permissions
- MaxCompute project or OSS Bucket containing properly formatted training data
- AccessKey ID and AccessKey secret with read and write permissions for the data source

1. Navigate to the AI Search Open Platform console  
   - Element: **AI Search Open Platform** (link) — located in the top navigation bar  
   - Notes: Ensure you are in the correct region (e.g., cn-shanghai)

2. Go to the Model Service section  
   - Element: **Model Service** (menu) — in the left navigation panel under AI Search

3. Click the **Create Model** button to start model customization  
   - Element: **Create Model** (button) — in the main content area  
   - Notes: A new model creation form will open

4. Select the model type  
   - Element: **Embedding Dimensionality Reduction** (radio) — in the form fields  
   - Element: **Text Embedding** (radio) — alternative option in the same group  
   - Notes: Choose based on your use case; both require training data

5. Enter a unique name for your model  
   - Element: **Model name** (text_input) — in the form  
   - Notes: This name will be used when invoking the service later

6. Choose a base model from the dropdown  
   - Element: **Base model** (dropdown) — in the form fields  
   - Options include: `ops-embedding-dim-reduction-001`, `ops-text-embedding-001`

7. Select your training data source  
   - Element: **Training data source** (dropdown) — in the form  
   - Options: **MaxCompute** or **OSS**

8. If using **MaxCompute**, fill in the following fields:  
   - Element: **Region** (dropdown) — select the region of your MaxCompute project  
   - Element: **Project name** (text_input) — enter your MaxCompute project name  
   - Element: **AccessKey ID** (text_input) — provide the AccessKey ID with permissions  
   - Element: **AccessKey secret** (text_input) — provide the corresponding secret  
   - Element: **Table name** (text_input) — specify the table containing training data  
   - Element: **Table partition** (text_input) — optional; enter if your table is partitioned  
   - Element: **Training fields** (text_input) — specify primary key and vector fields (String-type)  
   - Element: **Query-doc pairs** (text_input) — describe or reference the required data format  
   - Notes: The RAM user must have `GetTableFields` permission to view available fields

9. If using **OSS**, fill in these fields instead:  
   - Element: **Region** (dropdown) — select the OSS bucket region  
   - Element: **OSS Bucket** (text_input) — enter your bucket name  
   - Element: **Doc data** (text_input) — specify the path or identifier for training data in OSS  
   - Element: **OSS Endpoint** (text_input) — this field is auto-filled after other OSS parameters are set

10. Review all configurations and confirm model creation  
    - Element: **Confirm** (button) — appears after form completion  
    - Notes: Two options appear in the confirmation dialog:  
      - Click **Create and Train** to start training immediately  
      - Click **Create** to save without starting training  

11. Wait for training to complete (if started)  
    - Notes: Training progress can be monitored in the Model Service list. Deployment occurs automatically after successful training.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Model name | text_input | Yes | — | The name used to invoke the embedding dimensionality reduction service |
| Model type | radio | Yes | Embedding Dimensionality Reduction, Text Embedding | The type of model to train |
| Base model | dropdown | Yes | ops-embedding-dim-reduction-001, ops-text-embedding-001 | The base model for training |
| Training data source | dropdown | Yes | MaxCompute, OSS | Specifies where the training data is stored |
| Region | dropdown | Yes | — | The region where your MaxCompute project or OSS Bucket is located |
| Project name | text_input | Yes | — | The name of your project in MaxCompute |
| AccessKey ID | text_input | Yes | — | AccessKey ID with read/write permissions for MaxCompute |
| AccessKey secret | text_input | Yes | — | Secret corresponding to the AccessKey ID |
| Table name | text_input | Yes | — | Name of the MaxCompute table storing training data |
| Table partition | text_input | No | — | Partition information of the table |
| Training fields | text_input | Yes | — | Primary key field and String-type vector fields; requires GetTableFields RAM permission |
| Query-doc pairs | text_input | Yes | — | Data must follow the sample format shown in the console |
| OSS Bucket | text_input | Yes | — | Name of your OSS Bucket |
| Doc data | text_input | Yes | — | Training data path or identifier in OSS |
| OSS Endpoint | text_input | No | — | Automatically generated after configuring other OSS fields |

## FAQ

Q: Where can I find the sample data format for query-doc pairs?
A: The console displays a sample data format when you reach the relevant form field. Refer to that example to structure your training data correctly.

Q: Can I change the base model after creating the custom model?
A: No. The base model is fixed at creation time. You must create a new model if you want to use a different base model.

Q: What permissions does my RAM user need to access MaxCompute table fields?
A: Your RAM user must have the `GetTableFields` permission for the MaxCompute project to select training fields in the console.

Q: Is it possible to pause or stop training once it has started?
A: The documentation does not mention pausing or stopping training. Once initiated via "Create and Train", the process runs to completion or failure.

Q: Do I need to manually deploy the model after training?
A: No. Deployment happens automatically after successful training. The model becomes available for invocation under its assigned name.

## Pricing & Billing

### Billing Model
Billing is based on compute units (CUs). Each CU is priced at CNY 3.87. The actual number of CUs consumed depends on the volume and dimensionality of your training data.

### Price Reference
| Tier | Input Price | Output Price | Other Price |
|------|-------------|--------------|-------------|
| default | CNY 3.87 per CU | — | — |

### Free Tier
None specified.

### Billing Notes
Each CU is priced at CNY 3.87. The actual number of CUs consumed depends on the volume and dimensionality of your training data.