Skip to content

Specifying Output Register, Formal or Informal, by Language

9 min read · updated August 11, 2026

“Use a formal tone” is a complete instruction in English and an underspecified one in most of the languages you are shipping to. Formal means different grammatical facts in German, Japanese and Spanish, and in a few languages it means almost nothing at all. The fix is to store the rule per language rather than the adjective.

Why “be formal” is not an instruction

The word has to be resolved into a concrete choice before any text can be produced, and the resolution differs. In German, formal means the Sie pronoun and its agreement — a binary switch affecting pronouns, possessives, imperatives and verb forms throughout. In Japanese it means at minimum the polite verb endings, and possibly honorific and humble forms too, which is a different and harder decision. In Spanish it means usted, plus a regional choice about the plural. In English it means longer sentences, fewer contractions and Latinate word choice, and nothing structural.

Leaving the model to make that resolution is leaving your product’s form of address to a coin flip that can land differently for different prompts, different models and different lengths of input. It is also untestable: you cannot assert on an adjective. Store the grammar, and both problems go away at once.

Languages where the rule is grammatical

For these, the register rule is a sentence about morphology and the test is a pattern match.

  • German. Formal is Sie, Ihnen, Ihr, with the capitalised forms and third-person plural agreement. Informal is du, dir, dich, dein. Say both halves in the rule: the model needs to know what to avoid as well as what to use, and imperatives are where it slips.
  • French. Vous versus tu, with the verb agreement that follows. Note that vous is also the plural, so a rule that only says “use vous” is ambiguous for a message addressed to several people.
  • Spanish. Usted versus tú, and the plural is regional: ustedes everywhere in Latin America, vosotros for informal plural in most of Spain. Vos replaces tú in Argentina, Uruguay and parts of Central America. A single “Spanish” register rule is wrong for somebody; if that matters to you, split the locale.
  • Portuguese. European and Brazilian Portuguese differ in exactly this area — você is the ordinary second person in Brazil and marked in Portugal, where tu is the informal. Treat pt-PT and pt-BR as separate entries.
  • Dutch. U versus je/jij, with a widespread modern preference for je in consumer products that makes the formal option read as distant rather than respectful in some contexts.
  • Italian. Lei, third person singular, versus tu. The third-person agreement is the part a model gets wrong.
  • Russian. Вы versus ты, with agreement, and capitalisation of Вы in direct address in formal writing.
  • Japanese and Korean. Not binary. Specify the target style by name — polite です/ます, or the deferential -습니다 style — and say explicitly whether honorific and humble forms are wanted, because “formal” alone leaves that open. The mechanism is in why politeness level changes output more in some languages.
Swedish is the useful counter-example. Swedish has a formal pronoun, ni, but the du-reform of the late 1960s and 1970s made du the ordinary form of address for everyone, and using ni to a customer today reads as archaic or as faintly sarcastic rather than as respectful. A register rule that says “use the formal pronoun” because the language has one is wrong here. The presence of a form in the grammar does not tell you what using it means.

Languages where it is only lexical

English, and to a large degree the Scandinavian languages after their respective reforms, have no obligatory register morphology. The rule for them is still worth writing, but it is a style rule and it cannot be asserted with a pattern match. Write it as concrete guidance — “no contractions, no exclamation marks, address the reader as you rather than by first name” — and mark the entry as unassertable so nobody later mistakes a missing test for a gap in coverage.

Being explicit about this matters more than it sounds. A team that checks register in six languages and silently skips English is one refactor away from believing it checks all seven.

The registry

type RegisterRule = {
  instruction: string;                  // goes into the prompt verbatim
  forbidden?: RegExp;                   // must not appear in the output
  required?: RegExp;                    // must appear at least once
  assertable: boolean;                  // false where register is lexical only
};

export const REGISTER: Record<string, Record<"formal" | "informal", RegisterRule>> = {
  de: {
    formal: {
      instruction:
        "Address the reader with Sie, Ihnen and Ihr, including in imperatives " +
        "(Bitte prüfen Sie …). Never use du, dich, dir, dein or their forms.",
      // word boundaries matter: "du" is a substring of "durch", "dir" of "direkt"
      forbidden: /\b(du|dich|dir|dein|deine|deinem|deinen|deiner|deines)\b/i,
      assertable: true,
    },
    informal: {
      instruction: "Address the reader with du, dich, dir and dein. Never use Sie or Ihnen.",
      forbidden: /\b(Sie|Ihnen|Ihre[rmns]?)\b/,   // case-sensitive: "sie" is "she"/"they"
      assertable: true,
    },
  },
  ja: {
    formal: {
      instruction:
        "Write every sentence in the polite です/ます style. Do not use plain " +
        "sentence-final forms. Use humble forms for the assistant's own actions.",
      forbidden: /(だ|である)[。\n]/,
      required: /(です|ます)[。\n]/,
      assertable: true,
    },
    informal: {
      instruction: "Write in the plain style. Do not use です or ます endings.",
      forbidden: /(です|ます)[。\n]/,
      assertable: true,
    },
  },
  en: {
    formal: {
      instruction:
        "No contractions, no exclamation marks, no first-name address. " +
        "Prefer complete sentences over fragments.",
      assertable: false,
    },
    informal: {
      instruction: "Contractions are fine. Short sentences. Address the reader directly.",
      assertable: false,
    },
  },
};

The word-boundary comments are not decoration. A naive German check for the substring du matches durch, durüber and a great many other words, and a naive check for Sie that ignores case matches sie meaning “she” or “they”, which is perfectly correct in a formal text. Both mistakes produce a test that fails constantly and gets disabled.

Asserting it in CI

  1. Compose the register instruction into the system prompt from the registry rather than writing it inline, so there is exactly one place it is defined.
  2. After each evaluation run, apply forbidden and required to the output for every language where assertable is true, and fail the case on a match.
  3. Skip explicitly where assertable is false, and report the skip in the results table rather than omitting the row.
  4. Add a fixture per language whose input is deliberately in the wrong register — a customer writing informally to a formal product — and assert that the output register does not follow the input.
  5. When a native speaker reports a register problem the tests missed, add the pattern to the registry rather than fixing the prompt alone. The registry is the accumulating asset here.

One caveat worth keeping in the file next to the patterns: a regular expression over verb endings is a proxy, not a judgement. It catches the sentence-final plain form and the wrong pronoun, which is most of what goes wrong in practice, and it will not catch a technically polite reply whose honorifics are misapplied or whose wording is brusque. Use it as a regression guard, and keep a periodic native review for the things it cannot see. The related question of how a message opens and closes is covered in salutation format by language.