Difference between revisions of "Prompting"
(Created page with "= Overview = The prompt that is passed to an TMS or an LLM translation connection is a combination of: * The Translation Connection Level prompt. For example: <code>As a pro...") |
(→Overview) |
||
| (23 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. |
||
| − | The prompt that is passed to an TMS or an LLM translation connection is a combination of: |
||
| + | == Translation Connection Level == |
||
| − | * The Translation Connection Level prompt. For example: <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.</code> |
||
| + | Prompting can be passed to |
||
| − | * The Project Level Prompt: For example: <code>The application is Globalyzer and Localyzer described here https://lingoport.com/software-localization-tools/localyzer-l10n/</code> |
||
| + | * a TMS - e.g. Trados Enterprise - '''using PXML''' |
||
| − | * If InContext Server has astring associated image, that image for that string: For example: <code>Strings</code> |
||
| + | * an '''LLM''' connection - e.g. ChatGPT |
||
| − | * The text to translation: For example: <code>Strings</code> |
||
| − | The |
+ | The Translation Connection Level prompt is set here: |
| − | <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> |
||
| + | [[File:ConnectionPrompt.png|center|600px]] |
||
| − | If an image is associated, the prompt will include: |
||
| + | Note: The variables <code>${SOURCE_LOCALE}</code> and <code>${TARGET_LOCALE}</code> must be part of the prompt. |
||
| + | == Project Level Prompting == |
||
| − | The PXML section will look like: |
||
| + | 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 == |
||
| − | = Translation Connection Level = |
||
| − | Prompting can be passed to |
||
| − | * a TMS - e.g. Trados Enterprise - '''using PXML''' |
||
| − | * an '''LLM''' connection - e.g. ChatGPT |
||
| + | 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. |
||
| − | = Example = |
||
| + | == 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: |
||
| + | <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 Translation Connection Level prompt is set here: |
||
| + | * The '''Project''' Level Prompt: For example: |
||
| − | [[File:ConnectionPrompt.png|center|600px]] |
||
| + | <code>The application is Globalyzer and Localyzer, as described here https://lingoport.com/software-localization-tools/localyzer-l10n/</code> |
||
| − | Note: The variables <code>${SOURCE_LOCALE}</code> and <code>${TARGET_LOCALE}</code> must be part of the prompt. |
||
| + | * If InContext Server has a string '''associated image''', that image for that string: For example: |
||
| − | == ''Context Prompting'' == |
||
| + | <code>https://poc.lingoport.io/incontext-server/lookup?token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD&key=11405_82</code> |
||
| − | If the ChatGPT 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 to ChatGPT to provide the necessary information to better translate that string. |
||
| + | |||
| + | * The '''text''' to translation: For example: <code>Strings</code> |
||
| + | |||
| + | 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, 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: |
||
| + | |||
| + | <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: |
||
| + | <pre> |
||
| − | == Textual Prompting == |
||
| + | <?xml version="1.0" encoding="utf-8"?> |
||
| − | == MultiLingual Triangulation == |
||
| + | <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&amp;token=8JZGug2O004Q6q9Z00ruO5g04Lr8w7SD</lrm_incontext> |
||
| + | <llm_prompt>Now translate the following: Strings </llm_prompt> |
||
| + | <SID>KEY_17</SID> |
||
| + | <value>Strings/value> |
||
| + | </string> |
||
| + | </resources> |
||
| + | </pxml> |
||
| + | </pre> |
||
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>