Testing automatic translations to English

Oh I see now — you do have a tiny bit of Norwegian in there. So that’s why the entire post was tagged as Norwegian. It then sent the entire post to be translated from Norwegian to English, which, yeah.

The raw locale-detector request
{
  "model": "CDCK/MoM",
  "max_tokens": 32768,
  "messages": [
    {
      "role": "system",
      "content": "You will be given a piece of text, and your task is to detect the locale (language) of the text and return it in a specific JSON format.\n\nTo complete this task, follow these steps:\n\n1. Carefully read and analyze the provided text.\n2. Determine the language of the text based on its characteristics, such as vocabulary, grammar, and sentence structure.\n3. Do not use links or programming code in the text to detect the locale\n4. Identify the appropriate language code for the detected language.\n\nHere is a list of common language codes for reference:\n- English: en\n- Spanish: es\n- French: fr\n- German: de\n- Italian: it\n- Brazilian Portuguese: pt-BR\n- Russian: ru\n- Simplified Chinese: zh-CN\n- Japanese: ja\n- Korean: ko\n\nIf the language is not in this list, use the appropriate IETF language tag code.\n\n5. Avoid using `und` and prefer `en` over `en-US` or `en-GB` unless the text specifically indicates a regional variant.\n\nImportant: Base your analysis solely on the provided text. Do not use any external information or make assumptions about the text's origin or context beyond what is explicitly provided.\n\nYour response must be a language code, and nothing else. Do not wrap your response in quotes or any other characters."
    },
    {
      "role": "user",
      "content": "Can you tell me what '私の世界で一番好きな食べ物はちらし丼です' means?"
    },
    {
      "role": "assistant",
      "content": "en"
    },
    {
      "role": "user",
      "content": "[quote]\nNon smettere mai di credere nella bellezza dei tuoi sogni. Anche quando tutto sembra perduto, c'è sempre una luce che aspetta di essere trovata.\nOgni passo, anche il più piccolo, ti avvicina a ciò che desideri. La forza che cerchi è già dentro di te.\n[/quote]\n¿Cuál es el mensaje principal de esta cita?"
    },
    {
      "role": "assistant",
      "content": "es"
    },
    {
      "role": "user",
      "content": "When I click the edit button it does recognise the language as Norwegian.\nBut interesting to know – and good to experiment with that a bit. So I can now hide secret messages by writing Norwegian. Supert! (ah in supert I can not hide much)"
    }
  ],
  "stream": true,
  "stream_options": {
    "include_usage": true
  }
}

This returned no.

Well, there is a T at the end of super – yes that makes it into the Norwegian work for that :smiley:

None of the other words is Norwegian, they are all English (though my bad English maybe).

Well the good news is that cases like these are easily fixable by the post author (as well as by mods/admins). I just went back and corrected the Detected Language to English and it is no longer displaying the lossy translation at all. I suppose it’d be safest to just delete that bad “translation” entirely.

Yeah. And for that it is good that we played around with this here a bit to see its limitations and properties.

I noticed that the locale detector was getting very confused by language names and locations! Which, given its default instructions, actually makes quite a bit of sense. I’ve cleaned up its instructions a bit more; I think the misfire to Norwegian above was not just about supert, but also the mention of the language itself. I suspect adding place names like Norway and Oslo would further confuse the default config.

Edit: looks like the new instructions are doing better!

My turn to test: my browser is set to English, but I’m writing this message in French. What will happen?