Skip to content

Commit d9a1905

Browse files
committed
add adaptive custom translation documentation
1 parent 9229cb5 commit d9a1905

File tree

1 file changed

+79
-50
lines changed

1 file changed

+79
-50
lines changed

articles/ai-services/translator/custom-translator/azure-ai-foundry/concepts/adaptive-custom-translation.md

Lines changed: 79 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Adaptive custom translation in Azure is a capability of the Translator Text API
2222

2323
Key Differences
2424
* **Custom translator**: You provide your data to build a new, tailored translation model, which is then deployed for use.
25-
* **Adaptive custom translation**: Instead of constructing a new model, it uses an existing base model and incrementally improves it in real time by learning from user corrections and added data. This approach eliminates the need to rebuild models from scratch and supports continuous refinement.
26-
25+
* **Adaptive custom translation**: Instead of constructing a new model, it uses an existing base model and incrementally improves it in real time by learning from user corrections and added data.
2726

2827
> [!IMPORTANT]
2928
> - The Adaptive custom translation API (v1.0 preview) enables adaptCT dataset indexes lifecycle management capabilities.
@@ -40,54 +39,60 @@ Key Differences
4039
| **Speed** | Quickly incorporates and applies dataset updates within minutes, allowing for immediate adjustments in translation behavior and output. | Completes model training over a variable period—potentially up to 48 hours—depending on the dataset size and computational capacity. Updates require retraining and redeployment to reflect changes. |
4140
| **Maintenance** | Simplifies operational management by focusing on dataset index updates and integrity checks, removing the need for ongoing model maintenance. | Supports sustained translation quality with periodic maintenance, including retraining and redeployment, to keep the model current and accurate. |
4241

43-
* Choose the standard Azure AI custom translator to create a custom neural machine translation model trained on your domain-specific documents. This option is ideal when you require specialized terminology, unique styles, and a fully tailored, high-quality solution.
42+
* Choose **Azure AI custom translator** to create a custom neural machine translation model trained on your domain-specific documents. This option is ideal when you require specialized terminology, unique styles, and a fully tailored, high-quality solution.
4443

45-
* Choose Azure adaptive custom translation when you need continuous learning and real-time adaptation. It's best for workflows with user interactions and corrections, such as chatbots or help desks, where feedback improves translation quality dynamically.
44+
* Choose **Azure adaptive custom translation** when you need continuous learning and real-time adaptation. It's best for workflows with user interactions and corrections, such as chatbots or help desks, where feedback improves translation quality dynamically.
4645

4746

4847
## Base URL
4948

50-
The base URL for all adaptive custom translation API endpoints is:
49+
Here's the base URL for all adaptive custom translation API requests:
5150

5251
```http
5352
https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/
5453
```
5554

5655
## Authentication
5756

58-
All API requests require authentication using one or more of the following methods:
57+
Each request to an Azure AI service must include an authentication header. This header passes along a resource key or authentication token, which is used to validate your subscription for a service or group of services. You can choose one of the following methods for authentication:
58+
59+
* Authenticate with a [single-service regional](../../../text-translation/reference/authentication.md#authenticating-with-a-regional-resource), [single-service-global](#authenticating-with-a-global-resource), or [multi-service](./../../text-translation/reference/authentication.md#authenticating-with-a-multi-service-resource) resource key.
60+
* Authenticate with a [bearer token](./../../text-translation/reference/authentication.md#authenticating-with-an-access-token).
61+
* Authenticate with [Microsoft Entra ID](../../../how-to/microsoft-entra-id-auth.md) is a cloud-based identity solution designed to manage user access and permissions for Microsoft services, resources, and applications. Microsoft Entra ID enables you to authenticate requests to your Azure AI resources without the need for passwords or keys.
5962

60-
### Required Headers
63+
Form more information about Azure resources, *see* [Azure resources for Azure AI translation](../../../how-to/create-translator-resource.md)
64+
65+
### Required headers
6166

6267
| Header | Value | Required | Description |
6368
|--------|-------|----------|-------------|
6469
| `Ocp-Apim-Subscription-Key` | Your subscription key | **True** | Azure AI Translator subscription key |
6570
| `Ocp-Apim-Subscription-Region` | Your resource region | **True** | Azure resource region (for example, "eastus2") |
6671
| `Authorization` | `Bearer <your-token>` | **True** | OAuth Bearer token for enhanced authentication |
6772

68-
## API Operations
73+
## API operations
6974

70-
The Adaptive custom translation API is organized into three main operation categories:
75+
The Adaptive custom translation API is organized into three main operation categories([project operations](#project-operations-1), [document operations](#document-operations-1), and [dataset index operations](#dataset-index-operations-1)):
7176

72-
### 1. Project Operations
77+
### Project operations
7378
* [Get All Projects](#get-all-projects)
7479
* [Get Project](#get-project)
7580
* [Create Project](#create-project)
7681

77-
### 2. Document Operations
82+
### Document operations
7883
* [Get Adaptive Documents](#get-documents)
7984
* [Import Adaptive Documents (TMX/TSV)](#import-documents-tsv-tmx)
8085
* [Get Import Job Status](#get-import-job-status)
8186

82-
### 3. Dataset Index Operations
87+
### Dataset index operations
8388
* [Create Dataset Index](#create-dataset-index)
8489
* [Get Dataset Index](#get-dataset-index)
8590
* [Get All Dataset Indexes](#get-all-dataset-indexes))
8691
* [Delete Dataset Index](#delete-dataset-index)
8792

88-
## Project Operations
93+
## Project operations
8994

90-
### Get All Projects
95+
### Get all projects
9196

9297
Retrieves all projects available to the authenticated user.
9398

@@ -97,7 +102,7 @@ Retrieves all projects available to the authenticated user.
97102
GET /workspaces/
98103
```
99104

100-
#### Request Example
105+
#### Request example
101106

102107
**Windows**
103108
```bash
@@ -113,7 +118,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
113118
-H "Ocp-Apim-Subscription-Region: <your-region>"
114119
```
115120

116-
### Get Project
121+
### Get project
117122

118123
Retrieves details for a specific project.
119124

@@ -129,7 +134,7 @@ Retrieves details for a specific project.
129134
|-----------|------|----------|-------------|
130135
| `workspaceId` | string | **True** | Unique identifier for the project |
131136

132-
#### Request Example
137+
#### Request example
133138

134139
**Windows**
135140
```bash
@@ -145,7 +150,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
145150
-H "Ocp-Apim-Subscription-Region: <your-region>"
146151
```
147152

148-
### Create Project
153+
### Create project
149154

150155
Creates a new project for organizing adaptCT translation dataset data and indexes.
151156

@@ -155,15 +160,15 @@ Creates a new project for organizing adaptCT translation dataset data and indexe
155160
POST /workspaces
156161
```
157162

158-
#### Request Headers
163+
#### Request headers
159164

160165
| Header | Value | Required |
161166
|--------|-------|----------|
162167
| `Content-Type` | `application/json` | **True** |
163168
| `Ocp-Apim-Subscription-Key` | Your subscription key | **True** |
164169
| `Ocp-Apim-Subscription-Region` | Your resource region | **True** |
165170

166-
#### Request Body
171+
#### Request body
167172

168173
```json
169174
{
@@ -183,7 +188,7 @@ Creates a new project for organizing adaptCT translation dataset data and indexe
183188
| `subscription.billingRegionCode` | string | **True** | Billing region code (for example, "USE2") |
184189
| `subscription.subscriptionKey` | string | **True** | Subscription key for billing |
185190

186-
#### Request Example
191+
#### Request example
187192

188193
**Windows**
189194
```bash
@@ -203,9 +208,9 @@ curl -X POST "https://<your-resource-name>.cognitiveservices.azure.com/translato
203208
-d "{\"name\": \"my-workspace\", \"subscription\": {\"billingRegionCode\": \"USE2\", \"subscriptionKey\": \"<your-key>\"}}"
204209
```
205210

206-
## Document Operations
211+
## Document operations
207212

208-
### Get Documents
213+
### Get documents
209214

210215
Retrieves a paginated list of documents in a project.
211216

@@ -222,14 +227,14 @@ Retrieves a paginated list of documents in a project.
222227
| `workspaceId` | string | **True** | Project identifier |
223228
| `pageIndex` | integer | False | Page index for pagination (default: 0) |
224229

225-
#### Request Headers
230+
#### Request headers
226231

227232
| Header | Value | Required |
228233
|--------|-------|----------|
229234
| `Authorization` | `Bearer <token>` | **True** |
230235
| `Content-Type` | `multipart/form-data` | False |
231236

232-
#### Request Example
237+
#### Request example
233238

234239
**Windows**
235240
```bash
@@ -243,7 +248,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
243248
-H "Authorization: Bearer <token>"
244249
```
245250

246-
### Import Documents (TSV, TMX)
251+
### Import documents (TSV, TMX)
247252

248253
Imports adaptive documents in TSV and TMX format to a project.
249254

@@ -259,20 +264,20 @@ Imports adaptive documents in TSV and TMX format to a project.
259264
|-----------|------|----------|-------------|
260265
| `workspaceId` | string | **True** | Project identifier |
261266

262-
#### Request Headers
267+
#### Request headers
263268

264269
| Header | Value | Required |
265270
|--------|-------|----------|
266271
| `Authorization` | `Bearer <token>` | **True** |
267272

268-
#### Request Body (Multipart Form Data)
273+
#### Request body (multipart form data)
269274

270275
| Field | Type | Required | Description |
271276
|-------|------|----------|-------------|
272277
| `DocumentDetails` | string | **True** | JSON string containing document metadata |
273278
| `FILES` | file | **True** | TSV or TMX file to upload |
274279

275-
#### DocumentDetails JSON Format
280+
#### DocumentDetails JSON format
276281

277282
```json
278283
[{
@@ -286,7 +291,9 @@ Imports adaptive documents in TSV and TMX format to a project.
286291
}]
287292
```
288293

289-
#### TMX Request Example (English to supported target language, for example, French)
294+
#### TMX request example
295+
296+
***English to supported target language, for example, French.***
290297

291298
**Windows**
292299
```bash
@@ -305,7 +312,7 @@ curl -X POST "https://<your-resource-name>.cognitiveservices.azure.com/translato
305312

306313
```
307314

308-
### Get Import Job Status
315+
### Get import job status
309316

310317
Retrieves the status of a document import job.
311318

@@ -321,13 +328,13 @@ Retrieves the status of a document import job.
321328
|-----------|------|----------|-------------|
322329
| `jobId` | string | **True** | Import job identifier |
323330

324-
#### Request Headers
331+
#### Request headers
325332

326333
| Header | Value | Required |
327334
|--------|-------|----------|
328335
| `Authorization` | `Bearer <token>` | **True** |
329336

330-
#### Request Example
337+
#### Request example
331338

332339
**Windows**
333340
```bash
@@ -341,7 +348,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
341348
-H "Authorization: Bearer <token>"
342349
```
343350

344-
## Dataset Index Operations
351+
## Dataset index operations
345352

346353
### Create Dataset Index
347354

@@ -359,13 +366,13 @@ Creates a new dataset index for adaptive translation using specified documents.
359366
|-----------|------|----------|-------------|
360367
| `workspaceId` | string | **True** | Project identifier |
361368

362-
#### Request Headers
369+
#### Request headers
363370

364371
| Header | Value | Required |
365372
|--------|-------|----------|
366373
| `Content-Type` | `application/json` | **True** |
367374

368-
#### Request Body
375+
#### Request body
369376

370377
```json
371378
{
@@ -385,7 +392,7 @@ Creates a new dataset index for adaptive translation using specified documents.
385392
| `SourceLanguage` | string | **True** | Source language code |
386393
| `TargetLanguage` | string | **True** | Target language code |
387394

388-
#### Request Example
395+
#### Request example
389396

390397
**Windows**
391398
```bash
@@ -401,7 +408,7 @@ curl -X POST "https://<your-resource-name>.cognitiveservices.azure.com/translato
401408
-d "{\"documentIds\": [\"1457362\"],\"IndexName\": \"my-index\",\"SourceLanguage\": \"en\",\"TargetLanguage\": \"de\"}"
402409
```
403410

404-
### Get Dataset Index
411+
### Get dataset index
405412

406413
Retrieves details for a specific dataset index.
407414

@@ -417,7 +424,7 @@ Retrieves details for a specific dataset index.
417424
|-----------|------|----------|-------------|
418425
| `indexId` | string | **True** | Index identifier |
419426

420-
#### Request Example
427+
#### Request example
421428

422429
**Windows**
423430
```bash
@@ -429,7 +436,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
429436
cucurl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/index/<indexId>"
430437
```
431438

432-
### Get All Dataset Indexes
439+
### Get all dataset indexes
433440

434441
Retrieves all dataset indexes in a project.
435442

@@ -445,7 +452,7 @@ Retrieves all dataset indexes in a project.
445452
|-----------|------|----------|-------------|
446453
| `workspaceId` | string | **True** | Project identifier |
447454

448-
#### Request Example
455+
#### Request example
449456

450457
**Windows**
451458
```bash
@@ -457,7 +464,7 @@ curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator
457464
curl -X GET "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/index?workspaceId=<workspaceId>"
458465
```
459466

460-
### Delete Dataset Index
467+
### Delete dataset index
461468

462469
Deletes a specific dataset index.
463470

@@ -473,7 +480,7 @@ Deletes a specific dataset index.
473480
|-----------|------|----------|-------------|
474481
| `indexId` | string | **True** | Dataset index identifier |
475482

476-
#### Request Example
483+
#### Request example
477484

478485
**Windows**
479486
```bash
@@ -485,11 +492,11 @@ curl -X DELETE "https://<your-resource-name>.cognitiveservices.azure.com/transla
485492
curl -X DELETE "https://<your-resource-name>.cognitiveservices.azure.com/translator/customtranslator/api/texttranslator/v1.0/index/<indexId>"
486493
```
487494

488-
## Translate With Dataset Index
495+
## Translate with dataset index
489496

490497
[Use Text Translation API](/azure/ai-services/translator/text-translation/preview/overview)
491498

492-
## Error Responses
499+
## Error responses
493500

494501
The API returns standard HTTP status codes. Common error responses:
495502

@@ -501,12 +508,34 @@ The API returns standard HTTP status codes. Common error responses:
501508
| 404 | Not Found - Resource not found |
502509
| 500 | Internal Server Error - Service error |
503510

504-
## Best Practices
511+
## Best practices
512+
513+
1. **Authentication**: Use Bearer tokens for document operations
514+
1. **Error Handling**: Implement proper error handling and retry logic for API calls
515+
1. **Project Organization**: Use descriptive names for projects and dataset indexes to maintain organization
516+
1. **Document Management**: Ensure TSV and TMX files are properly formatted with well aligned source-target pairs
517+
518+
## Troubleshooting
519+
520+
1. **Authentication Errors**
521+
522+
* Verify your Azure tokens are valid and not expired.
523+
* Check that all required environment variables are set.
524+
* Ensure your Azure services are properly configured.
525+
526+
1. **Translation Failures**
527+
528+
* Verify TRANSLATION_KEY and TRANSLATOR_URL are correct.
529+
* Check that your Azure Cognitive Services subscription is active.
530+
* Ensure the target language is supported.
531+
532+
1. **Index Creation Issues**
533+
534+
* Verify documents are properly uploaded before creating indices.
535+
* Check that the Custom Translator API endpoint is accessible.
536+
* Ensure your subscription has sufficient quota.
537+
505538

506-
1. **Authentication**: Use Bearer tokens for document operations
507-
2. **Error Handling**: Implement proper error handling and retry logic for API calls
508-
3. **Project Organization**: Use descriptive names for projects and dataset indexes to maintain organization
509-
4. **Document Management**: Ensure TSV and TMX files are properly formatted with well aligned source-target pairs
510539

511540
## Next Steps
512541

0 commit comments

Comments
 (0)