Azure Translator Adaptive API: profanityAction ignored when adaptiveDatasetId is specified

Nikolay Yordanov 45 Reputation points
2026-09-17T08:31:48.9033333+00:00

When calling POST /translate?api-version=2026-06-06:

  • Without adaptiveDatasetId: profanityAction: "Marked" and profanityMarker: "Asterisk" correctly masks profanities (***).
  • With adaptiveDatasetId: profanityAction (Marked or Deleted) is completely ignored, and raw profanity is returned in the output text.

Is bypassing profanity filtering expected when an Adaptive Dataset is attached, or is this a known issue in the preview pipeline?

Azure Translator in Foundry Tools

1 answer

Sort by: Oldest
  1. Nikolay Yordanov 45 Reputation points
    2026-09-17T11:08:00.94+00:00

    @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 via llm-endpoint and llm-key headers)
    • 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: Both Marked and Deleted work as expected (masking with *** or removing the profane tokens).
    • With adaptiveDatasetId: Both Marked and Deleted are 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 fr and bg).

    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).

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.