How do I fix the wrong translation generation?

{
role: ‘user’,
content: ‘As the owner of a restaurant business, I manage my data using this format: [{“_id”:“64adce3a897a661ba27dcc4b”,“name”:{“TR”:“Yemekler”}}].\n’ +
" Please translate the Turkish values into Japanese, and represent the word ‘TR’ as Japanese.\n" +
’ After translating, please confirm that the data is created in the JA language by adding the language code Japanese at the end of the data.\n’ +
’ ’
}
LOG: [ { _id: ‘64adce3a897a661ba27dcc4b’, name: { JA: ‘Meals’ } } } ]

even though I give this prompt the log gpt generates a wrong translation for me, how can I avoid this.

how do I ensure that it always gives the right result?

1 Like

I have a playground preset for you to examine.
It uses the newly-released gpt-3.5-turbo-instruct model.
It uses multi-shot training to show the AI how to operate.

Press submit after loading this into the API playground, and you will generate the output for the last line.
Share link - TR to JA

You can reduce the number of “shots” until you find the AI doesn’t work as well.
You can “generate code” to get the settings that are used.
The API stop sequence must be used or I expect it will continue listing more translations that it made up.

I hope this gives you new ideas, and perhaps for others reminds how to use completion models.

Thank you for your answer. I couldn’t solve my problem. I am experimenting with the new feature “Fine-tuning” which allows us to train our own model and check if I can train my own model and always get the right result.

If you are having problems simply with poor language choices, but yet the form of output is being followed (as I demonstrated), then, especially for poorly-represented languages, you should also see how AI will perform when the parameters top_p and temperature are set to 0.0.

Also, a single word of a passage doesn’t allow for the best translation. A better style of question for the AI to answer:

In the context of the sentence “Also, a single word of a passage doesn’t allow for the best translation”, I’d like you to produce an English definition of the word “passage”, and then, informed by the definition, translate that word to Japanese for use in a similar sentence.

1 Like