The OpenAI Translator is a plugin developed for Trados Studio 2022 and above that uses the language models provided through the OpenAI API. OpenAI is an artificial intelligence research organization dedicated to developing advanced AI systems while ensuring their safety and accessibility.
Table of Contents
Introduction
The plugin supports several features to help the user while working on a translation project:
- provide an alternative translation or translations based on a prompt defined by the user
- provide additional information about the source/target content, again based on a prompt by the user
- settings to define whether the translations are returned automatically for every segment, or whether the user triggers the translations when needed
- five default prompts
- the ability to create as many user defined prompts as required
Installation
The plugin can be installed either by downloading it from the RWS AppStore and double clicking the sdlplugin file, or by installing it automatically through the integrated appstore in Trados Studio. Once installed you will find the icon to launch the OpenAI plugin in the View ribbon:
Once launched you can place it wherever you find it most appropriate in the normal way. This article might be helpful if you don't know how to reposition windows in Trados Studio.
Performance
The speed to access the OpenAI models provided via the API can be influenced by the level of traffic at any given time, and may vary accordingly, resulting in potential fluctuations in performance. If you do have any questions we recommend you subscribe to the OpenAI community where you can use the forums there for up to date information that could be relevant with regard to performance.
Settings
Once installed, and moved into a position you prefer, you'll find something like this:
The Settings to prepare the plugin for use can be accessed by clicking on th small cog symbol in the top left-hand corner of the application. This will open up the Settings view which provides two tabs:
General
In here you can do the following:
- signup for an OpenAI account.
- add your API key,
- specify the model you wish to work with,
- set the application to automatically search for translation suggestions,
1. Signup for an OpenAI Account
In order to use the plugin each user will need to have an API key which is provided by OpenAI. There is a link in General tab of the settings for the plugin which will take you to a page where you can create your account:
1a. Data Privacy
Users are responsible for ensuring that they take responsibility for the data they submit through the OpenAI API because they are the ones who generate and input the data, which may contain sensitive or personal information. When using an application like Trados Studio that incorporates the OpenAI API as a feature, the developers of the application are not responsible for the users' data as their role is primarily to facilitate the integration and functionality of the API within the software. The onus is on the users to be mindful of the content they share and to adhere to the terms and conditions set forth by both Trados Studio and the OpenAI API to maintain data privacy and security.
Users will have ready agreed to the terms and conditions for using Trados Studio and the RWS AppStore. For convenience only we have provided two links to useful documentation related to the privacy policy of OpenAI:
https://openai.com/policies/privacy-policy
https://openai.com/policies/api-data-usage-policies
Although efforts will be made to keep this wiki updated, it is ultimately the user's responsibility to ensure compliance with their obligations concerning the information processed through Trados Studio and any associated plugins.
2. Add your API key
Once you have created your account you will be able to generate API keys through your account settings. At the time of preparing this wiki you will find the appropriate menu items under your account settings here:
https://platform.openai.com/account/api-keys
Keep your API keys safe as you will be billed for use and you may not wish to provide access to others free of charge.
Once you have your key simply copy/paste it into the API Key field in your settings:
The key will be stored in your user settings file here:
%appdata%\Trados AppStore\OpenAI Translator\Settings\Settings.xml
3. Specify the Model
In the context of artificial intelligence, a model refers to a mathematical and computational representation of a system that can be trained to recognize patterns, make predictions, or generate outputs based on input data. Models are typically trained using large datasets and often utilize deep learning techniques, such as neural networks, to achieve their goals.
The supported models in this plugin are GPT-4, GPT-3.5-turbo, and text-davinci-003, and they are all language models developed and supported by OpenAI. They are designed to process and generate text, with each having different capabilities, size, and performance.
GPT-4 is a large multimodal model that accepts text inputs and emits text outputs, with future plans for image inputs. It is known for its broader general knowledge and advanced reasoning capabilities compared to previous models. GPT-4 is capable of interpreting visual data and has a larger dataset (45 GB more) than GPT-3.5. While GPT-4 is not perfect, it has adopted measures to ensure safer responses compared to GPT-3.5.
GPT-3.5-turbo is a language model designed specifically for conversational interfaces. Unlike previous GPT-3 models, which accepted a prompt string and returned a completion, GPT-3.5-turbo uses a conversation-in and message-out approach, making it more suitable for chat applications. GPT-4 is considered more reliable, creative, and able to handle more nuanced instructions than GPT-3.5.
Text-davinci-003 is another GPT-3 model and is a predecessor to GPT-4 and GPT-3.5-turbo, with less advanced capabilities and features.
You can control which model you wish to use by selecting it from the dropdown in the settings:
In practice the more recent the model the slower the performance as these are more heavily used by users. So for some contexts you may find you can still achieve the sort of output you require in less time by working with a model that is not the latest one.
4. Automatic Searching
The plugin works by default when you manually trigger the search. Checking this setting allows you to automatically trigger the search each time you enter a new segment:
It is not checked by default because there are two important reasons for not doing this:
- there is a cost associated with each search, and
- you may only wish to use the search for some content for data privacy reasons and therefore require more control
Prompts
Introduction
The second tab in the settings relates to the prompts. What is a prompt? In the context of using OpenAI, a prompt is essentially an input text that guides the language model towards generating relevant and coherent output based on the context or pattern provided. It sets the foundation for the AI to perform various language processing tasks. Designing an effective prompt is key to getting the desired output from the OpenAI model. The importance of prompts lies in the fact that they determine the quality and accuracy of the language model's output. A well-designed prompt can help to generate accurate and relevant output, while a poorly designed prompt can lead to irrelevant or inaccurate output. Thus, understanding the role and importance of prompts is essential for effectively using OpenAI's language models.
For example, an AI language model can recognize and interpret various tones of voice in text, which can be important for accurate translation or generating contextually appropriate responses. Some common types of tone of voice that an AI language model may recognise include:
- Formal: Professional, respectful, and precise language, often used in official documents, business correspondence, and academic writing.
- Informal: Casual, colloquial, and relaxed language, commonly found in everyday conversation, social media, and personal correspondence.
- Friendly: Warm, approachable, and positive language, which expresses a sense of camaraderie and empathy.
- Authoritative: Confident, knowledgeable, and assertive language, conveying expertise and credibility.
- Persuasive: Convincing and compelling language, often used to influence the reader's opinion or decision.
- Descriptive: Detailed and vivid language, commonly used in storytelling, journalism, or marketing materials.
- Sarcastic: Language that conveys irony, often with the intent of humor or criticism, by stating the opposite of what is meant.
- Humorous: Language that is intended to evoke laughter or amusement, often employing wit, puns, or other comedic elements.
- Emotional: Language that is expressive of feelings, such as love, anger, sadness, or excitement.
- Neutral: Language that is objective, unbiased, and free from emotion or opinion.
This is not exhaustive, or mandatory, but it should provide some guidance on the sort of language you may use in a prompt. A good way to help devise your prompt is to play with it in the playgound available in your OpenAI account first and refine it until you start to get the sort of results youre looking for. Alternatively you can use the plugin itself and check the results in context.
Using the default prompts
The OpenAI Translator plugin doesn't allow the sort of free prompts you might see, or use, when playing with ChatGPT, or using the OpenAI Playground. The reason for this is that we are specifically dealing with translation and so the prompt designer follows some basic principles and rules:
- It must contain 3 placeable parameters
- {0} - the language of the search text
- {1} - the language of the translation
- {2} - the search text, taken from the selected source or target segment
- the parameters will be dynamically substituted with the language identifiers & search text when requesting translations
To simplify the understanding of how this is used 5 prompts are provided by default.
Default translation: Translate this text from {0} into {1}: {2}
Formal translation: Translate this text from {0} into {1}, with a formal tone of voice: {2}
Multiple translations: Provide 5 translations of this text from {0} into {1}, using the same tone of voice: {2}
Reduced length: Translate this text from {0} into {1}, with a formal tone of voice and character length does not exceed this text: {2}
No 3rd person singular pronouns: Translate this text from {0} into {1}, with a neutral tone of voice without these pronouns "he, she, him, her, his, hers, himself, herself": {2}
Creating your own prompts
If the defaults don't provide you with what you need then you can simply create your own. The beauty of a tool like this is that you can use natural language to refine the prompt and don't need any more skills than the ones you already have as a translator. For example you can either edit an existing prompt to refine it slightly by selecting the prompt and then clicking on Edit:
This will open the Edit Prompt window where you can now make any changes yo like to the prompt name, or text of the prompt itself:
There is also a useful checkbox option to "Show an explanation with the translation". This can be very handy if you are trying to follow a more complex style guide with rules that may require you explaining your choice for the translation. For example:
Here we have created a prompt to provide three additional translations of the source text to specifically ensure removal of any Gender Bias from the text. We added the need to not refer to a particular gender because when designing the prompt the suggestions contained the pronouns he/she and these needed to be excluded according to the styleguide we are working to in this example. We also checked the box to explain why the translation was used (we'll come back to this when explaining how to use the application).
You can create as many prompts as you wish and these will also be saved to:
%appdata%\Trados AppStore\OpenAI Translator\Settings\Settings.xml
It is recommended that you keep a copy of your prompts somewhere safe just in case you lose your settings file or need to transfer the prompts to another computer. In this case it is enough to back up the settings file itself as this can also be transferred between computers and simply stored in the same location on another machine. But DO NOT FORGET that this also contains your personal API key.
Using the Plugin
Once you have worked through the settings, and have at least provided an API key, you use the plugin by selecting the prompt you wish to use:
In this case we have selected "Multiple translations" as the prompt, selected from the list of defaults. We can then decide whether we want to do this from the source or the target. In this case we created the prompt to work from the source so we will select from the source by clicking on the Search from Source icon:
This will then return a result based on the prompt, something like this:
The screenshot above is best explained as follows:
- the original source text, in this case Hebrew
- the five different translations using track changes to show the differences where applicable
- apply translation icons that can be used to apply the preferred translation if applicable
- the model used, in this case gpt-3.5-turbo
- the check box, checked, to show the difference between the suggested translations and one currently in use
I can uncheck the box in 5. and then it may be clearer to review:
Another example, this time you may be reviewing an English text to remove any gender bias. For this we created an en-US to en-GB project and then selected the Gender Bias prompt we created in the section on prompts. This returns three alternatives and also adds a note explaining why this alternative was created:
If I decide I want the second one I can apply the translation as explained above and it is inserted into the target segment with the NMT label showing where the translation originated from:
Also note that when I do this the "Note" containing the explanation is not transferred across to the target segment.
Customer Experience
tbc.