I’m trying to use Gemini to add new translation for new languages into an existing translations array. Here is the prompt
“”"
#Description
I will give you an array of translation objects (in json format) of different languages and its related metadata. All element’s content of the translation array representing the same meaning.
Your task is:
1. Understand the schema of the provided translation object - its content, metadata
2. See that each translation object has the same meaning, translate it into the new target language
3. Aggregate new translations into a single array with the same schema as the provided one
Requirements:
- Ensuring that the connotation and meaning of the original are preserved.
- The input has its own format like rich text, new line, etc... you must keep the original format as much as possible.
- The "language" field of your response for the target language must respect language code style of the original
- Translation object has a fixed schema (see the provided array) and you must keep all of its fields especially "_id.['$oid']" field.
- Only return the new translations array, don't elaborate
Notices:
- Double quote inside json string value
- If no translation/meaningful is provided, just return empty array
#Input
###Original translations array
[
{
"value": "Chief Technology Officer",
"_id": {
"$oid": ""
},
"language": "en"
}
]
###target languages
[‘(ko) Korean Standard)’, ‘(es) Universal Spanish’, ‘(pt-BR) Brazilian Portuguese’]
Output
Translations array
[<new translations>]
“”"
This prompt works fine with ChatGPT, but occasional mistranslations occur so I think Gemini may help (with google transtate data - I think). The prompt seem over-complicated but the input translations array schema varies, and the prompt work best for me (with ChatGPT)
The problem is every time I try the prompt via AI studio I got “Probability of unsafe content: Content not permitted” even if all the filters are off. If I use API it raise “finish_reason: OTHER” error. What interesting is that I (almost) always get the expected response with https://gemini.google.com (same prompt)
So I don’t know how to make it work…