Difference between revisions of "Prompting"
(→Project Level Prompting) |
(→Overview) |
||
| (12 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | = |
+ | == Introduction == |
| − | Some translation connections can take advantage of LLM style prompting. Lingoport provides the ability to pass prompting Localyzer to either TMS with LLM as part of their workflow, or directly to an LLM |
+ | Some translation connections can take advantage of LLM style prompting. Lingoport provides the ability to pass prompting Localyzer to either TMS with LLM as part of their workflow, or directly to an LLM. |
| + | == Translation Connection Level == |
||
| + | Prompting can be passed to |
||
| + | * a TMS - e.g. Trados Enterprise - '''using PXML''' |
||
| + | * an '''LLM''' connection - e.g. ChatGPT |
||
| + | |||
| + | The Translation Connection Level prompt is set here: |
||
| + | |||
| + | [[File:ConnectionPrompt.png|center|600px]] |
||
| + | |||
| + | Note: The variables <code>${SOURCE_LOCALE}</code> and <code>${TARGET_LOCALE}</code> must be part of the prompt. |
||
| + | |||
| + | == Project Level Prompting == |
||
| + | |||
| + | For projects on-boarded with a TMS/PXML or an LLM, the advanced settings allows for additional prompting at the project level, for all strings in that project: |
||
| + | |||
| + | [[File:ProjectPrompt.png|center|600px]] |
||
| + | |||
| + | == Context Prompting == |
||
| + | |||
| + | If the translation connection is configured with an InContext server, then when a context has been associated with a string (See [[Individual_Project_Tasks#Context_Capture | String Manager / Context]]), the context will be passed in order to provide the necessary information to better translate that string. |
||
| + | |||
| + | == More Details == |
||
The prompt that is passed to an TMS or an LLM translation connection is a combination of: |
The prompt that is passed to an TMS or an LLM translation connection is a combination of: |
||
| + | * The '''Translation Connection''' Level prompt. For example: |
||
| − | * The '''Translation Connection''' Level prompt. For example: <code>As a professional translator, translate an application user interface text from ${SOURCE_LOCALE} to ${TARGET_LOCALE}. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation.</code> |
||
| + | |||
| − | * The '''Project''' Level Prompt: For example: <code>The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/</code> |
||
| + | <code>As a professional translator, translate an application user interface text from ${SOURCE_LOCALE} to ${TARGET_LOCALE}. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation.</code> |
||
| − | * If InContext Server has a string '''associated image''', that image for that string: For example: <code>https://acme.lingoport.io/incontext-server/lookup?token=Vozst6xmKxw5qVQ3cw921Hj9NEKX70&key=183101_251</code> |
||
| + | |||
| + | * The '''Project''' Level Prompt: For example: |
||
| + | |||
| + | <code>The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/</code> |
||
| + | |||
| + | * If InContext Server has a string '''associated image''', that image for that string: For example: |
||
| + | |||
| + | <code>https://poc.lingoport.io/incontext-server/lookup?token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD&key=11405_82</code> |
||
| + | |||
* The '''text''' to translation: For example: <code>Strings</code> |
* The '''text''' to translation: For example: <code>Strings</code> |
||
The resulting prompt without an image: |
The resulting prompt without an image: |
||
| − | <code> As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Now translate the following: Strings</code> |
+ | <code> As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Now translate the following: Strings</code> |
If an image is associated, the prompt will include: |
If an image is associated, the prompt will include: |
||
| − | <code> As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Use the image only if it is relevant to understanding the text (e.g., location, image, signs, or symbols). If the image does not correspond to the text, ignore it. Now translate the following: Strings</code> |
+ | <code> As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Use the image only if it is relevant to understanding the text (e.g., location, image, signs, or symbols). If the image does not correspond to the text, ignore it. Now translate the following: Strings</code> |
| − | |||
| + | == Sample PXML == |
||
The PXML section will look like: |
The PXML section will look like: |
||
| Line 25: | Line 56: | ||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||
| + | <pxml> |
||
| − | <resources> |
||
| + | <!-- system_prompt is a concatenation of the translation connection system prompt and the project prompt in Localyzer --> |
||
| + | <system_prompt><![CDATA[ As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/. ]]></system_prompt> |
||
| + | <resources> |
||
<string translate="1" segmentID="2" minLength="" maxLength="10"> |
<string translate="1" segmentID="2" minLength="" maxLength="10"> |
||
| − | <lrm_incontext>https://poc.lingoport.io/incontext-server/lookup?key= |
+ | <lrm_incontext>https://poc.lingoport.io/incontext-server/lookup?key=11405_82&amp;token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD</lrm_incontext> |
| + | <llm_prompt>Now translate the following: Strings </llm_prompt> |
||
| − | <llm_prompt>As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Now translate the following: Strings </llm_prompt> |
||
<SID>KEY_17</SID> |
<SID>KEY_17</SID> |
||
<value>Strings/value> |
<value>Strings/value> |
||
</string> |
</string> |
||
</resources> |
</resources> |
||
| + | </pxml> |
||
</pre> |
</pre> |
||
| − | |||
| − | = Translation Connection Level = |
||
| − | Prompting can be passed to |
||
| − | * a TMS - e.g. Trados Enterprise - '''using PXML''' |
||
| − | * an '''LLM''' connection - e.g. ChatGPT |
||
| − | |||
| − | The Translation Connection Level prompt is set here: |
||
| − | |||
| − | [[File:ConnectionPrompt.png|center|600px]] |
||
| − | |||
| − | Note: The variables <code>${SOURCE_LOCALE}</code> and <code>${TARGET_LOCALE}</code> must be part of the prompt. |
||
| − | |||
| − | == Project Level Prompting == |
||
| − | |||
| − | For projects on-boarded with a TMS/PXML or an LLM, the advanced settings allows for additional prompting at the project level, for all strings in that project: |
||
| − | |||
| − | [[File:ProjectPrompt.png|center|600px]] |
||
| − | |||
| − | == Context Prompting == |
||
| − | |||
| − | If the translation connection is configured with an InContext server, then when a context has been associated with a string (See [[Individual_Project_Tasks#Context_Capture | String Manager / Context]]), the context will be passed in order to provide the necessary information to better translate that string. |
||
Latest revision as of 15:38, 4 December 2025
Contents
Introduction
Some translation connections can take advantage of LLM style prompting. Lingoport provides the ability to pass prompting Localyzer to either TMS with LLM as part of their workflow, or directly to an LLM.
Translation Connection Level
Prompting can be passed to
- a TMS - e.g. Trados Enterprise - using PXML
- an LLM connection - e.g. ChatGPT
The Translation Connection Level prompt is set here:
Note: The variables ${SOURCE_LOCALE} and ${TARGET_LOCALE} must be part of the prompt.
Project Level Prompting
For projects on-boarded with a TMS/PXML or an LLM, the advanced settings allows for additional prompting at the project level, for all strings in that project:
Context Prompting
If the translation connection is configured with an InContext server, then when a context has been associated with a string (See String Manager / Context), the context will be passed in order to provide the necessary information to better translate that string.
More Details
The prompt that is passed to an TMS or an LLM translation connection is a combination of:
- The Translation Connection Level prompt. For example:
As a professional translator, translate an application user interface text from ${SOURCE_LOCALE} to ${TARGET_LOCALE}. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation.
- The Project Level Prompt: For example:
The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/
- If InContext Server has a string associated image, that image for that string: For example:
https://poc.lingoport.io/incontext-server/lookup?token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD&key=11405_82
- The text to translation: For example:
Strings
The resulting prompt without an image:
As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Now translate the following: Strings
If an image is associated, the prompt will include:
As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/. Use the image only if it is relevant to understanding the text (e.g., location, image, signs, or symbols). If the image does not correspond to the text, ignore it. Now translate the following: Strings
Sample PXML
The PXML section will look like:
<?xml version="1.0" encoding="utf-8"?>
<pxml>
<!-- system_prompt is a concatenation of the translation connection system prompt and the project prompt in Localyzer -->
<system_prompt><![CDATA[ As a professional translator, translate an application user interface text from English to Latin. Special considerations for UI: Brevity is crucial, Clarity over creativity, Consistency with UI patterns, Action-oriented language. Return only the translated text-no explanation. The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/. ]]></system_prompt>
<resources>
<string translate="1" segmentID="2" minLength="" maxLength="10">
<lrm_incontext>https://poc.lingoport.io/incontext-server/lookup?key=11405_82&token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD</lrm_incontext>
<llm_prompt>Now translate the following: Strings </llm_prompt>
<SID>KEY_17</SID>
<value>Strings/value>
</string>
</resources>
</pxml>