Settings Reference for PromptLoc MT
Getting Started
Before using the application for the first time, please complete the following setup steps:
1. Configure OpenAI Settings
- Go to File → OpenAI settings.
- Enter and save your OpenAI API Key.
2. Configure MemoQ Server Connection
- Go to File → MemoQ configuration.
- Base Address: Enter your server URL (e.g.,
https://example.company.com).- Do not include the port number in the address field.
- Port: Enter the port number separately (e.g.,
8081).- Example: If your server address is
https://example.company.com:8081, enterhttps://example.company.comin Base Address and8081in Port.
- Example: If your server address is
- Login Credentials:
- Create a user in MemoQ with Resource Lookup rights. (See MemoQ Documentation).
- Enter this user's Username and Password in the configuration form.
- WS API Configuration (Optional):
- If using the WS API, enter the WS API Port and WS API Key. You can find these details in your server deployment tool or by contacting MemoQ support.
- Important: Ensure the Resources API is enabled on your MemoQ server. It is free but may need to be activated by support.
3. Activate Software License
- Go to File → Software license.
- Copy the displayed value and email it to marton@edimart.com for activation.
Configuration Reference
File → MemoQ configuration
This menu allows you to manage connections to MemoQ servers.
- Multiple Logins / Nicknames:
- You can configure and save multiple server logins (e.g., for connecting directly to different client servers).
- Assign Nicknames to these connections to easily switch between them in the future.
- Projects Folder:
- This folder is used for temporary storage of
mqxlifffiles downloaded via the WS API. - It also stores translation logs and the translated mqxliff files.
- This structure ensures traceability and logging for all processed jobs.
- This folder is used for temporary storage of
- Folder Size Warning:
- Warn if folder size exceeds (MB): Set a threshold to receive alerts if your projects folder becomes too large, helping you manage disk space.
- Treat same-language files as one for internal examples:
- Unchecked (Default): "On-the-fly" matches (internal fuzzy matches) are reset for each file.
- Checked: PromptLoc MT builds a temporary Translation Memory (TM) from the raw machine translations as it processes the job. It reuses fuzzy and exact matches from this internal TM across all files in the batch (provided they share the same language pair). This improves consistency across multiple files in a single job.
File → OpenAI settings
Configure your connection to OpenAI and file paths.
- Embedding Model:
- Define the specific embedding model to use for analyzing reference files (e.g.,
text-embedding-3-large).
- Define the specific embedding model to use for analyzing reference files (e.g.,
- Performance Settings:
- Embedding Batch Size: The number of segments sent to OpenAI in a single embedding request.
- Max Concurrent Requests: The maximum number of parallel embedding requests to avoid API rate limits.
- Default Prompt Folder:
- Specify the directory where your prompt templates are stored.
- Tip: Use a shared network folder if multiple Project Managers (PMs) need to access the same set of standard prompts.
File → Advanced processing settings
Fine-tune how the Large Language Model (LLM) processes your translations.
- LLM Parameters:
- Temperature: Controls randomness (0.0 - 1.0). Lower values make the output more deterministic.
- Verbosity: Controls the verbosity level of the model's output (Low, Medium, High).
- Reasoning Effort: Controls how much time reasoning models (like
o1oro3-mini) spend "thinking" before generating a response.
- Thresholds & Limits:
- Match Rate Threshold (%): The minimum similarity score required for a TM match to be included as an example.
- Ref. Similarity Threshold (%): The minimum cosine similarity score required for a reference segment to be included in the context.
- References per Segment: The maximum number of reference segments to inject for each source segment.
- Processed Segment Status:
- Choose the status to assign to segments after translation (e.g., "Machine Translated", "Edited", "Confirmed").
- Tag Mapping:
- Determines whether tags in the LLM response should be mapped to the Source or Target segments.
- The response will contain placeholders like
{{1}},{{2}}. These are replaced by the actual tag content from the chosen segment. Note that extra or missing tags are not resolved automatically.
- Populate JSON input schema:
- Checked (Recommended): The application automatically injects segment data into a rich JSON structure.
- Customize Fields: You can toggle which data fields to include (e.g., Source Text, Terms, MemoQ Examples) and rename the JSON keys used in the request to match your prompt template.
- If data is missing for a specific field (e.g., no terms found for a segment), that property is omitted from the request to save tokens.
- Note: For detailed instructions on prompting with this mode, see the Prompting Guide.
Interface & Operation Guide
Selecting a Source File or Project
- Local Mode (File or Folder):
- File: Use the unified dropdown or click "Browse..." to select a single
.mqxliffor.xlifffile. - Folder: Select a folder containing multiple translation files. When a folder is selected, additional controls appear to let you navigate through the files (
<,>). - Output: Translated files are saved in a
PromptLocMT_Outputsubfolder within the source directory.
- File: Use the unified dropdown or click "Browse..." to select a single
- Connected Project Mode:
- Click Connect to Project to browse your MemoQ server.
- Select a project and specific documents to download.
- Download: Files are downloaded to your configured
Projects Folderinside a timestamped subdirectory (e.g.,ProjectsFolder\ProjectName_yyyy-MM-dd_HH-mm). - Output: Translated files and logs are saved in the same timestamped folder structure (
PromptLocMT_Output\translatedand...\logs). - Server Update: When processing finishes, the translated file is automatically uploaded to the MemoQ server, and the document is updated.
Outputs and Logging
- Translated Files: Located in
[SourceFolder]\PromptLocMT_Output\translated. - Logs: Located in
[SourceFolder]\PromptLocMT_Output\logs. - UI Log: The application displays a real-time log of the process. You can click on log entries to see detailed JSON payloads and responses.
Prompt Selection & Client Metadata
- Prompt Dropdown: Select a prompt template from your configured
Default Prompt Folder. - Client Matching:
- Prompt templates can contain a special metadata line:
### CLIENT METADATA: ClientName. - When you connect to a MemoQ project, the application reads the project's "Client" field.
- Prompts that match the project's client are automatically prioritized (sorted to the top) in the dropdown list.
- You can manually add client metadata to a prompt by selecting it while connected to a project; the application will ask if you want to add the current client to the template.
- Prompt templates can contain a special metadata line:
Example Workflows
This guide provides example workflows for using PromptLoc MT in different scenarios. While many other use cases are possible, these examples cover the most common tasks.
1. Translation
This is the standard workflow for translating documents using the power of LLMs combined with MemoQ resources.
Modes of Operation
- Local Mode:
- Select an individual
.mqxlifffile or a folder containing them from your local disk. - Resource matching (TMs/TBs) must be done manually or via the "Match by Client" feature.
- Results are saved locally. You must manually import them back into MemoQ.
- Select an individual
- Connected Project Mode:
- Click "Connect to Project" to browse your MemoQ server.
- Select a project and specific documents to download.
- Resources (TMs/TBs) are automatically matched based on the project settings on the server.
- When processing completes, the translated file is automatically uploaded to the server, and the document is updated.
Configuration
- Write to: Set to Target.
- Resources: Ensure relevant Translation Memories and Term Bases are selected to provide context.
Example Prompts
Legacy Mode Prompt:
Use the following terminology:
%TERMS%
Use these examples for style:
%EXAMPLES%
Rich Schema Mode Prompt:
Input Format:
- "source_text": The text to translate.
- "terms": Mandatory terminology.
- "memoq_examples": Past translation examples.
Return a JSON object with the translated text for each segment key.
2. Revision
In this workflow, you use the LLM to review or edit existing translations (e.g., from a different engine or a human draft). This requires the Rich Schema Mode.
Configuration
- Write to: Set to Target (this overwrites the existing target with the revised version).
- Schema Settings:
- Enable Populate JSON input schema.
- Ensure Target Text is checked (so the LLM can see the draft).
- You might rename the key
target_texttodraft_translationin the settings to make it clearer for the LLM.
Example Prompt (Schema Mode Only)
- "source_text": The original source.
- "draft_translation": A draft translation that needs review.
- "terms": Mandatory terminology.
Your task is to revise the "draft_translation" to ensure accuracy and fluency.
- Fix any terminology errors based on the "terms" provided.
- Improve style and grammar.
- If the draft is perfect, return it unchanged.
Return a JSON object with the revised translations.
3. Preparation (Source Rephrasing)
This workflow is useful when the source text is poorly written (e.g., machine-generated or non-native speaker) and you want to improve it before translation, or if you simply need to paraphrase text.
Configuration
- Write to: Set to Source (this overwrites the source segment in the MQXLIFF).
- Schema Settings:
- Enable Populate JSON input schema.
- Check Source Text.
- Uncheck other context fields like references or terms if they are not relevant for rephrasing.
Example Prompt
- Do not translate the text.
- Preserve the original meaning.
- Fix any typos or awkward phrasing.
Return a JSON object with the rewritten source text.
Other Use Cases
These are just a few examples. PromptLoc MT is flexible:
- Terminology Extraction: Ask the LLM to identify potential terms from the source.
- Quality Assurance: Ask the LLM to analyze the source/target pair and output a critique (though you would need to parse the critique).
- Style Adaptation: Use prompts to rewrite the target text into a specific tone (e.g., "Marketing", "Formal", "Playful").
Experiment with different prompts and schema configurations to find what works best for your project!
Prompting Guide for PromptLocMT
This application supports two distinct prompting modes: Legacy Mode (Simple) and Rich Schema Mode (Advanced). The mode is determined by the "Use JSON Schema" setting in the Processing Settings.
1. Legacy Mode (Simple JSON)
In this mode, context (glossaries, examples, etc.) is injected directly into the text of your prompt using placeholders. The input data sent to the LLM is a simple JSON dictionary of source segments.
Placeholders
You must include these placeholders in your prompt template. The application will replace them with the relevant data before sending the request to the LLM.
| Placeholder | Description |
|---|---|
%SOURCELANG% |
The name of the source language (e.g., "English"). |
%TARGETLANG% |
The name of the target language (e.g., "German"). |
%TERMS% |
A list of allowed terms found in the Termbase (TB), formatted as source = target. |
%FORBIDDENTERMS% |
A list of forbidden terms found in the TB, formatted as source ≠ target. |
%REFERENCES% |
Relevant reference segments found in the reference files or embeddings. |
%EXAMPLES% |
Translation examples (fuzzy matches) found in the Translation Memory (TM), formatted as Source\nTarget pairs. |
Input Data Structure
The LLM receives the prompt followed by a simple JSON object containing the segments to translate:
"segment1": "The source text for the first segment.",
"segment2": "The source text for the second segment."
}
Example Legacy Prompt
Use the following terminology:
%TERMS%
Avoid these forbidden terms:
%FORBIDDENTERMS%
Use these references for context:
%REFERENCES%
Here are some examples of past translations:
%EXAMPLES%
Translate the following JSON segments. Return only the translated JSON object.
2. Rich Schema Mode (Advanced)
In this mode, context (terms, examples, references) is not injected into the prompt text. Instead, it is structured inside the input JSON object itself for each segment. This allows for granular, segment-level context.
Placeholders
Most placeholders are disabled in this mode because the data is in the JSON.
| Placeholder | Behavior in Schema Mode |
|---|---|
%SOURCELANG% |
Active. Replaced with the source language name. |
%TARGETLANG% |
Active. Replaced with the target language name. |
%TERMS% |
Removed. (Data is in the terms JSON field). |
%FORBIDDENTERMS% |
Removed. (Data is in the forbidden_terms JSON field). |
%REFERENCES% |
Removed. (Data is in the references JSON field). |
%EXAMPLES% |
Removed. (Data is in memoq_examples or internal_examples JSON fields). |
Input Data Structure
The LLM receives the prompt followed by a rich JSON object. Your prompt must instruct the LLM to read this structure.
"segment1": {
"source_text": "The text to translate.",
"terms": { "term": "translation" },
"forbidden_terms": [ { "source": "bad_term", "forbid": ["avoid_this"] } ],
"references": [ "Similar sentence context..." ],
"memoq_examples": [ { "source": "Old source", "target": "Old target" } ],
"maxlength": 100
},
...
}
JSON Fields
The keys used in the input JSON can be customized in the Processing Settings. The defaults are:
source_text: The segment text to be translated.target_text: Existing target text (if any).terms: Dictionary of mandatory terms for this segment.forbidden_terms: List of terms to avoid for this segment.references: Contextual reference text specific to this segment.memoq_examples: TM matches from MemoQ.internal_examples: Fuzzy matches from within the current file batch.comments: Comments from the XLIFF file.maxlength: The maximum allowed length for the translation (if > 0).
Example Schema Prompt
Input Structure:
The input is a JSON object where each key (e.g., "segment1") represents a text segment. Each segment value is an object containing:
- `source_text`: The text to translate.
- `terms`: A dictionary of mandatory terminology (source -> target).
- `forbidden_terms`: A list of terms to avoid.
- `references`: Contextual reference text.
- `memoq_examples` / `internal_examples`: Previous translation examples for style/consistency.
- `maxlength`: Maximum allowed length for the translation (if > 0).
Instructions:
Translate each `source_text` into %TARGETLANG%.
- Strictly adhere to the `terms` provided for each segment.
- Use `examples` and `references` to guide your style and consistency.
- Return a single JSON object where keys match the input (e.g., "segment1") and values are the translated strings.