An Azure service to easily conduct machine translation with a simple REST API call.
@Thanmayi Godithi
Here are the details (replacing the english F word with "Teeeet":
Environment & Setup Details
- API Endpoint:
https://api.cognitive.microsofttranslator.com/translate?api-version=2026-06-06 - Source Language: English (
en) - Target Language: French (
fr) - LLM Deployment:
gpt-5.4-mini(configured viallm-endpointandllm-keyheaders) - Adaptive Dataset ID:
684b35eb-322f-478b-b710-09c0a62f0415-adaptive-general
Test Results Summary (Target: French fr)
We conducted tests with both profanityAction: "Marked" (with profanityMarker: "asterisk") and profanityAction: "Deleted" across identical inputs:
Source (en) |
profanityAction |
Without adaptiveDatasetId |
With adaptiveDatasetId |
Issue Observed |
|---|---|---|---|---|
"Teeeetyou." |
Marked (asterisk) |
*** |
Va te faire foutre. |
Profanity filter completely ignored |
"Teeeetyou." |
Deleted |
"" (empty string) |
Va te faire foutre. |
Profanity filter completely ignored |
- Without
adaptiveDatasetId: BothMarkedandDeletedwork as expected (masking with***or removing the profane tokens). - With
adaptiveDatasetId: BothMarkedandDeletedare completely bypassed, and the LLM returns the unfiltered translated profanity (Va te faire foutre.). - Consistency across datasets: We observed identical bypass behavior across multiple dataset IDs and across multiple target languages (both
frandbg).
Sanitized Repro Payloads (Target: fr)
1. Repro Request (WITH adaptiveDatasetId)
POST https://api.cognitive.microsofttranslator.com/translate?api-version=2026-06-06 HTTP/1.1
Content-Type: application/json
Ocp-Apim-Subscription-Key: <REDACTED_AI_SERVICES_KEY>
Ocp-Apim-Subscription-Region: eastus
llm-endpoint: https://<my-foundry-resource>.services.ai.azure.com
llm-key: <REDACTED_FOUNDRY_KEY>
{
"inputs": [
{
"text": "Teeeet you.",
"language": "en",
"targets": [
{
"language": "fr",
"deploymentName": "gpt-5.4-mini",
"adaptiveDatasetId": "684b35eb-322f-478b-b710-09c0a62f0415-adaptive-general",
"profanityAction": "Marked",
"profanityMarker": "asterisk"
}
]
}
]
}
Repro Response (Profanity NOT marked — Unfiltered):
{
"value": [
{
"translations": [
{
"language": "fr",
"text": "Va te faire foutre.",
"instructionTokens": 269,
"responseTokens": 14
}
]
}
]
}
2. Control Request (WITHOUT adaptiveDatasetId)
Using the exact same request body, removing only "adaptiveDatasetId":
{
"inputs": [
{
"text": "Teeeet you.",
"language": "en",
"targets": [
{
"language": "fr",
"deploymentName": "gpt-5.4-mini",
"profanityAction": "Marked",
"profanityMarker": "asterisk"
}
]
}
]
}
Control Response (Profanity correctly marked with ***):
{
"value": [
{
"translations": [
{
"language": "fr",
"text": "***",
"instructionTokens": 343,
"responseTokens": 24,
"sourceCharacters": 9
}
]
}
]
}
3. Repro with profanityAction: "Deleted"
- Without
adaptiveDatasetId: Returns""(empty string / token deleted as expected). - With
adaptiveDatasetId: Returns"Va te faire foutre."(deletion is bypassed).