Getting British Spelling Instead of American Spelling From AI

Getting British Spelling Instead of American Spelling From AI

如何让 AI 使用英式拼写而非美式拼写

You put “use British English spelling” in the system prompt. The first three paragraphs are fine. By paragraph nine there is a color, and by the end there is an organization. The instruction was not ignored; it was outvoted. 你在系统提示词中加入了“使用英式英语拼写”。前三段表现良好,但到了第九段出现了“color”(美式拼写),结尾又出现了“organization”(美式拼写)。指令并没有被忽略,而是被“投票否决”了。

The symptom: The characteristic pattern is not uniform failure. It is a document that starts correct and degrades — and the degradation is usually inconsistent within the document, so you get colour in one paragraph and color two paragraphs later, sometimes in the same sentence as behaviour. Long outputs are worse than short ones, and a long conversation is worse than a single call. 症状表现:这种典型的模式并非完全失效。文档往往开头正确,随后逐渐退化——而且这种退化在文档内部通常是不一致的。你可能会在一段中看到“colour”,两段后又变成“color”,有时甚至在同一个句子中出现“behaviour”(英式拼写)。长文本输出比短文本更糟糕,长对话比单次调用更糟糕。

A second symptom is domain-specific: the spelling holds in ordinary prose and fails in technical contexts. Code comments, API field names, CSS properties and library names are American by convention (color is a CSS property; serialize is what the method is called), and text near them pulls the surrounding prose across. Both patterns point at the same cause, and it is not that the model did not read the instruction. 第二个症状具有领域特异性:在普通散文中拼写尚能保持,但在技术语境下就会失效。代码注释、API 字段名、CSS 属性和库名称通常遵循美式习惯(例如 color 是 CSS 属性;serialize 是方法名),而靠近这些词的文本会将周围的散文也“拉”向美式拼写。这两种模式指向同一个原因:并不是模型没有读取指令。

Why it drifts back: Each token is sampled from a distribution conditioned on everything in the context. The system prompt is part of that context, but so are the two thousand tokens the model has generated since, and so is the enormous prior from training data in which American spelling outnumbers British by a wide margin in almost every technical domain. 为何会发生偏移:每个 Token 都是根据上下文条件分布采样生成的。系统提示词是上下文的一部分,但模型在此之后生成的两千个 Token 也是上下文,训练数据中海量的先验知识同样如此——在几乎所有技术领域,美式拼写的数量都远超英式拼写。

At the start of a response the instruction is close by and there is little else in the context, so it dominates. As the response grows, the local statistics of the text being generated carry more weight relative to a single instruction several thousand tokens back. And the drift is self-reinforcing in exactly the way described in mid-answer code-switching: once one American spelling is in the context, the conditional probability of the next one rises. 在回答开始时,指令距离很近,且上下文中几乎没有其他内容,因此指令占据主导地位。随着回答变长,生成文本的局部统计特征相对于几千个 Token 之前的单一指令权重更大。这种偏移具有自我强化效应,正如回答中途发生“代码切换”时的情况:一旦上下文中出现了一个美式拼写,下一个美式拼写出现的条件概率就会上升。

The key insight for fixing it is that spelling is not a mode the model is in. There is no British-English state that gets set and then holds. Each word is an independent draw, influenced by context, and a single instruction cannot beat a strong prior across two thousand independent draws. That is why “ask more firmly”, “put it in capitals” and “repeat the instruction three times” all produce marginal improvements and none of them produces reliability. 解决问题的关键在于认识到:拼写并非模型的一种“模式”。不存在一个可以被设置并保持的“英式英语状态”。每个词都是受上下文影响的独立抽取,单一指令无法在两千次独立抽取中战胜强大的先验知识。这就是为什么“更坚定地要求”、“使用大写字母”和“重复指令三次”只能带来微小的改善,而无法保证可靠性的原因。

Every class of word that differs

存在差异的词汇类别

The differences are systematic, which is what makes a deterministic fix possible. There are seven productive classes plus a list of one-offs. 这些差异是系统性的,这使得确定性的修复成为可能。除了零星的特例,主要有七类词汇存在差异。

  • -our / -or. colour, behaviour, favour, honour, labour, neighbour, humour, rumour, vapour, flavour, harbour, endeavour. Note the exceptions that keep -or in both: horror, error, mirror, terror. Note also that the -our is dropped in some derived forms even in British English: humorous, laborious, vigorous. -our / -or. 例如 colour, behaviour 等。注意那些在两种拼写中都保留 -or 的例外:horror, error, mirror, terror。还要注意,即使在英式英语中,某些派生词也会去掉 -our,如 humorous, laborious, vigorous。

  • -re / -er. centre, metre, theatre, litre, fibre, sombre, calibre, spectre. Careful: meter is correct British English for a measuring device, and metre only for the unit of length. -re / -er. 例如 centre, metre, theatre 等。注意:meter 在英式英语中指测量设备,而 metre 仅指长度单位。

  • -ce / -se noun-verb pairs. British distinguishes the noun licence from the verb license, the noun practice from the verb practise, the noun defence from American defense. American collapses the first two. This class is the hardest to fix mechanically, because it needs the part of speech. -ce / -se 名词-动词对。 英式英语区分名词 licence 和动词 license,名词 practice 和动词 practise,名词 defence(美式为 defense)。美式英语将前两组合并了。这一类最难通过机械方式修复,因为它需要识别词性。

  • Doubled consonants before a suffix. travelled, cancelled, modelling, labelled, marvellous, counsellor, jeweller, signalling. American uses a single l. Running the other way, British has a single l in skilful, fulfil, enrol where American doubles it. 后缀前的双写辅音。 例如 travelled, cancelled 等。美式英语只用一个 l。反之,在 skilful, fulfil, enrol 中,英式英语用一个 l,而美式英语则双写。

  • -ogue / -og. catalogue, dialogue, analogue, monologue. American allows the short forms. -ogue / -og. 例如 catalogue, dialogue 等。美式英语允许使用简写形式。

  • ae / oe digraphs. paediatric, anaemia, encyclopaedia, foetus, oesophagus, manoeuvre. Mostly medical, and they matter disproportionately because medical writing is where a wrong spelling is most conspicuous. ae / oe 连字。 例如 paediatric, anaemia, encyclopaedia 等。多为医学词汇,它们的重要性远超其他,因为在医学写作中,拼写错误最为显眼。

  • -yse / -yze. analyse, paralyse, catalyse. This one is not optional in British English — unlike -ise/-ize, discussed below, there is no British tradition of -yze. -yse / -yze. 例如 analyse, paralyse 等。这在英式英语中没有选择余地——不像下面讨论的 -ise/-ize,英式英语中不存在 -yze 的传统。

  • One-offs. aluminium/aluminum, tyre/tire, kerb/curb, cheque/check, grey/gray, storey/story (a floor), plough/plow, draught/draft, programme/program (though program is correct British English for the computing sense), speciality/specialty, whilst/while. 特例。 如 aluminium/aluminum, tyre/tire, kerb/curb, cheque/check, grey/gray, storey/story(楼层), plough/plow, draught/draft, programme/program(注:program 在计算机语境下是正确的英式拼写), speciality/specialty, whilst/while。

The -ize trap

-ize 的陷阱

The most common mistake in a spelling instruction is asserting that British English uses -ise and American uses -ize. It is not that simple, and getting it wrong makes your instruction incoherent. Oxford University Press house style, used by the Oxford English Dictionary and by a number of British academic publishers, uses -ize in British English on etymological grounds — organize, realize, recognize. Most other British publishing, including most newspapers and the Cambridge house style, uses -ise. Both are correct British English. The OED documents its own -ize convention. 拼写指令中最常见的错误是断言“英式英语用 -ise,美式英语用 -ize”。事实并非如此简单,弄错这一点会让你的指令前后矛盾。牛津大学出版社的内部风格(被《牛津英语词典》及多家英国学术出版商采用)基于词源学在英式英语中使用 -ize,如 organize, realize, recognize。而大多数其他英国出版物(包括大多数报纸和剑桥大学出版社风格)则使用 -ise。两者在英式英语中都是正确的。《牛津英语词典》记录了其自身的 -ize 惯例。

Two consequences. First, decide which convention you want and say so by name — “British English with -ise spellings” or “Oxford spelling” — rather than saying “British spelling” and hoping. Second, if you choose -ise, note that a set of verbs takes -ise in both conventions because the ending is not the Greek suffix: advertise, advise, comprise, compromise, despise, devise, exercise, improvise, revise, supervise, surmise, surprise, televise. A blind ize → ise substitution is safe; the reverse is not, because it produces advertize and surprize. 由此产生两个结论。第一,确定你想要的惯例并明确指出——例如“使用 -ise 拼写的英式英语”或“牛津拼写”——而不是只说“英式拼写”然后碰运气。第二,如果你选择 -ise,请注意有一组动词在两种惯例中都使用 -ise,因为其结尾并非希腊语后缀:如 advertise, advise, comprise 等。盲目地将 ize 替换为 ise 是安全的;反之则不然,因为这会产生 advertize 和 surprize 等错误。

The fix that holds

有效的修复方案

Prompting reduces the rate; it does not eliminate it. The reliable approach is layered. 提示词只能降低错误率,无法完全消除。可靠的方法是分层处理。

  1. Name the convention precisely in the system prompt. “British English, Cambridge/Guardian style: -ise not -ize, -our, -re, -yse, doubled l before suffixes, licence as a noun and license as a verb.” Naming the classes gives the model something specific to condition on. 在系统提示词中精确命名惯例。 例如:“英式英语,剑桥/卫报风格:使用 -ise 而非 -ize,使用 -our, -re, -yse,后缀前双写 l,licence 作名词,license 作动词。”列出这些类别能为模型提供具体的条件依据。

  2. Generate in sections rather than one long pass. Drift is a function of distance from the instruction, so several 600-word calls with the instruction fresh in each beat one 4,000-word call. This is the single most effective prompt-side change. Repeat the convention at the end. 分段生成,而非一次性长文本输出。 偏移是距离指令远近的函数,因此多次 600 字的调用(每次都重申指令)比一次 4000 字的调用效果更好。这是提示词层面最有效的改进。在结尾处重复该惯例。