Glossary Service
2 min read
The Glossary Service identifies matching source terms and adds their source-target pairs to the translation prompt as terminology guidance. The language model applies this guidance when producing the translation.
Glossary guidance does not guarantee verbatim substitution. Use Translation Memory for wording that must be reused exactly.
Set up the workbook
Create an XLSX glossary workbook and upload it to the Knowledge Base. A glossary template can be downloaded here:
example_glossary.xlsxExcel spreadsheet
The uploaded workbook is associated with a Knowledge Base scope. Use that scope ID as scope_id in the glossary configuration.
The Scope ID is available in the Knowledge Base URL, as highlighted below.
Workbook structure
Translator V2 reads the first worksheet.
The first row contains language column names.
Each subsequent row contains corresponding source and target terms or phrases.
Empty cells and non-text values are ignored.
Avoid duplicate source terms so each entry has one clear target value.
Column names
Use recognizable Translator language labels, such as English, French, Simplified Chinese, Traditional Chinese (Taiwan), and Traditional Chinese (Hong Kong). Common language names and codes can also be recognized.
An optional Default column can provide fallback values when a specific language column is unavailable.
How language columns are selected
When the source language is detected, Translator V2 uses its matching source column when available, with
Defaultas a fallback. The selected target-language column is used when available, withDefaultas a fallback.When the source language cannot be detected,
Defaultis used as the source column and a matching target-language column is required.There is no automatic English fallback. Keep Simplified and Traditional Chinese variants in their corresponding columns.
How terms are matched
Terms without Chinese, Japanese, or Korean characters are matched case-insensitively and respect word or phrase boundaries.
High-confidence similar spellings may also match for non-CJK terms.
Chinese, Japanese, and Korean terms use exact substring matching without fuzzy matching.
Only pairs matching the source text are added to the translation prompt. Multiple matching pairs can be supplied together.
Configuration
Default
The Glossary Service is disabled by default:
{
"glossaryConfig": null
}Enabled example
{
"glossaryConfig": {
"scope_id": "scope_111111111111111111111111",
"filename": "glossary.xlsx",
"active": true
}
}Parameters
Parameter | Description | Type | Default |
|---|---|---|---|
| Knowledge Base scope containing the glossary workbook. | String or null |
|
| Exact filename of the glossary workbook. | String or null |
|
| Whether glossary guidance is enabled. | Boolean |
|
Fallback behavior
If the Glossary Service is inactive, its workbook is missing or unreadable, the workbook contains no usable terms, compatible language columns are unavailable, or no terms match the source text, translation continues without glossary guidance.