2026-11-24 · Prompt Optimization
When using GLM for translation, the biggest problem usually isn't accuracy — it's consistency: the same term gets rendered one way today and another tomorrow, and the tone drifts between formal and casual. The fix is simple: spell out "how to translate these terms," "what the tone sounds like," and "what format to output" directly in the prompt, leaving the model no room to freelance. Both GLM-4 and the GLM-5 series handle long context and follow instructions well, and they're strong in both Chinese and English — the clearer your instructions, the steadier the output. The workflow below runs on the first try in the playground and transfers as-is to BigModel API calls.
Don't scatter terms across paragraphs — feed them to the model as a structured list. A three-column format works best: source term, designated translation, and a note (optional — why this rendering, or which alternatives to avoid). GLM follows table- and list-style instructions reliably, and a three-column list saves tokens while being hard to overlook. Place the glossary at the top of the prompt, before the source text — models tend to "remember" early content best when processing long inputs.
"Keep the tone professional" is useless — the model doesn't know what your "professional" looks like. The effective move is to give one or two example sentences in the target style, e.g.: "Tone reference: 'This agreement shall take effect on the date of execution by both parties.'" The model immediately knows you want contract-speak, not blog-speak. Register varies even within a single language (legal, marketing, technical docs), so one reference sentence per register beats ten lines of adjectives.
Copy directly and replace the bracketed placeholders:
You are a professional translator rendering the following from 【source language】 into 【target language】. 【GLOSSARY — follow strictly】 | Source term | Designated translation | Note | | cloud deployment | cloud deployment | Never render as "cloud-based" | | API key | API key | Keep "API" in English | | seat-based pricing | per-seat pricing | Avoid literal "seat" wording | 【TONE REFERENCE】 Match the style and formality of: "【one example sentence in the target style】". Target reader: 【e.g., enterprise technical decision-makers】. 【FORMAT RULES】 1. Output only the translation — no explanations or preamble. 2. Preserve the original paragraph, list, and heading structure. 3. For proper nouns not in the glossary, keep the source form and add a translation in parentheses on first mention. 【SOURCE TEXT】 【paste source】
When translating multiple passages in one go, the risk is inconsistency across them. Have GLM translate the first passage, then carry the same terminology and tone through everything that follows:
Task: translate multiple passages from 【source language】 into 【target language】 with full-document consistency. Rules: 1. Use the glossary below throughout; never substitute an unlisted rendering. 2. I'll provide a "tone-setting translation" at the start — all subsequent passages must match its terminology, tone, and sentence length. 3. If a proper noun isn't covered by the glossary, translate it from context and flag it with 【NEW TERM】 — do not handle it silently. 4. Separate each passage's translation with "--- ---". 【GLOSSARY】 | Source | Translation | | 【term】 | 【translation】 | 【TONE-SETTING PASSAGE (first passage — I'll provide it, or you translate it)】 【paste first passage, or the approved translation】 【PASSAGES TO TRANSLATE】 【paste subsequent passages】
The clever part is rule 3: new terms no longer get handled casually — they're flagged for your decision, which sharply cuts review costs.
First, stating what NOT to do often beats stating what to do. Common failure: the model prefixes output with "Here's the translation:", or unifies mixed languages on its own. Writing "output only the translation" and "leave other languages embedded in the source untouched" in the format rules beats rework later. Second, GLM's Chinese is strong — for Chinese-to-English tasks, add "avoid literal Chinglish; prefer idiomatic English" and the English output reads noticeably more natural. Style-level instructions like this genuinely steer the model.
Write these templates once and they become reusable assets. Test them in the web playground on real documents, tune the glossary and tone reference until output is stable, then drop the whole prompt into a BigModel API call as the system prompt or message prefix — combined with tool calling, it becomes an automated translation pipeline. Maintain the glossary as its own file and update it per project: the ceiling of your translation quality is usually the quality of your glossary.
本文为使用方法整理,内容选自网上公开资料,供参考;本站为非官方资讯站,产品能力以官方页面为准。