Skip to content

Why AI Gets Name Order Wrong in Family-Name-First Cultures

9 min read · updated August 11, 2026

You pass in Nagy Péter and get back Péter Nagy. The model did not fail to recognise the name. It recognised it, decided the order looked wrong, and fixed it — which is the harder problem, because the instruction you want is not “get this right” but “stop helping”.

The bug is the correction, not the order

There are two distinct failures under this heading and they need different fixes. The first is generation: asked to invent a Japanese name, a model produces one in Western order. That is a prior problem and a straightforward instruction usually settles it.

The second, which is the expensive one, is transformation. You give the model a correctly-ordered name and ask it to do something unrelated — translate a paragraph, extract entities, tidy a list, populate a template — and the name comes back reordered as a side effect. Nothing in your prompt asked for that. It happens because reordering family-name-first names into Western order is an extremely common operation in the training data: it is what English-language publications, academic bibliographies and international databases do, so the pattern “family-first name appears, Western-order version follows” is thoroughly learned.

The consequence is data corruption rather than an awkward sentence. A reordered name in an extraction pipeline no longer matches the record it came from, and because both orderings are plausible names, nothing downstream flags it. Worse, it is not consistent: the same model in the same run will preserve some names and flip others depending on how recognisable each one is.

Hungarian

Hungarian is the case that breaks the mental shortcut “this is a CJK thing”. Hungarian is the one European language whose native convention is family name first: Nagy Péter, Kovács Anna, Bartók Béla. The composer known internationally as Béla Bartók is Bartók Béla in Hungarian, and both forms are correct in their own context.

This is exactly the case a model handles worst, because Hungarian names use the Latin alphabet and carry no script signal that would mark them as needing different treatment. A Japanese name in kanji is at least visibly a Japanese name. Nagy Péter looks like an ordinary European name written in an order the model has learned to normalise.

Note also that Hungarian applies the same largest-to-smallest logic to dates (2026. 08. 11., with the trailing full stop) and to addresses. The name order is one instance of a consistent ordering principle in the language, which is a useful thing to say in a prompt because it gives the instruction something to attach to.

Japanese

In Japanese the family name comes first: 山田太郎 is Yamada (family) Tarō (given). The complication is that the romanised form has historically been written the other way round in international contexts, so both Taro Yamada and Yamada Taro circulate in English-language sources referring to the same person, and a model has seen both.

There is a documented policy change here worth citing rather than guessing at. In 2019 the Japanese government decided that Japanese personal names should be written family-name-first in official English-language documents, taking effect from 1 January 2020; the Ministry of Foreign Affairs of Japan applies this to its own materials. So the correct romanised order for an official context is now family-first, while an enormous body of older English-language text uses given-first. Both are in the training data and the older convention is far larger.

A common convention for disambiguating in print is to set the family name in capitals — YAMADA Taro. If your pipeline can adopt it, it removes the ambiguity permanently at the cost of an unusual-looking string, and it is a much more robust signal to a downstream model than a positional convention. See romaji conversion for what else changes when a Japanese name is romanised.

Chinese

Chinese names are family name first, and the family name is usually one character while the given name is one or two: 习近平 is Xi (family) Jinping (given), 李娜 is Li Na. In pinyin the family name stays first and the given name is written as a single capitalised word even when it is two syllables — Jinping, not Jin Ping or Jin-ping, though hyphenated forms are standard in Taiwanese romanisation and older transliterations.

Two extra hazards. Many Chinese people also use a Western given name, producing forms like Jackie Chan or a business card reading Wei Zhang (David), and a model that sees a Western given name will confidently apply Western ordering to the whole string. And the set of common family names is small — a few hundred names cover most of the population — which means the family name is usually identifiable from a list, and that is a much more reliable detection method than asking a model to judge.

The cue that stops the reordering

The instruction that works is not “use the correct name order”, because the model believes it is. It is an instruction that removes the model’s authority to change the field at all:

Names are opaque strings. Reproduce every personal name exactly as
given, character for character, in exactly the order given. Do not
reorder given and family names. Do not normalise a name to Western
order. Do not expand initials or add a middle name. If a name looks
like it is in an unusual order, it is correct as written.

Three things make that work. It states the constraint as a property of the data (“opaque strings”) rather than as a formatting preference. It names the specific transformation to suppress, because a general instruction to be faithful does not reach a transformation the model does not consider an edit. And the last sentence pre-empts the model’s own confidence, which is the sentence that does most of the work — without it, a name it is sure about is exactly the one it will fix.

The structural fix is better where you can have it: keep names out of the free-text path entirely. Extract them into typed fields, put a placeholder in the text the model handles, and substitute back afterwards. Then the model never sees a string it could be tempted to improve. This is the same reasoning as transliterating rather than translating names, applied to order rather than to script.

Whatever route you take, store the parts separately — family_name and given_name as distinct fields, with a display order flag — rather than storing a formatted full name and trying to parse it later. A parsed full name is a guess, and it is the same guess the model was making.