Part 5 of 7 · Translation relay series ~5 min read

How names and prices stay exact

A translation that’s 99% right but turns “$42.00” into “$420” is worse than no translation at all. The same goes for an order number with a flipped digit, or a product name the model helpfully “translated” into a generic word. These are the mistakes that cost real money and real trust, and a model on its own will occasionally make every one of them. So the relay never lets the model near them. This post is about the single guardrail that runs underneath both directions: lock the exact bits, translate the rest, put the exact bits back.

Key takeaways

  • Three kinds of content are protected: glossary terms, numbers and prices, and IDs and codes.
  • Each protected bit is swapped for a placeholder before translation, then restored to the exact original after.
  • The model translates the words around the placeholders but never sees the real names or figures.
  • Every swap is logged, so you can prove a figure was never altered in translation.
  • This same lock runs on the way in and the way out — both directions, identical rules.

Three kinds of protected content

Three kinds of protected content, locked then restored A diagram showing one input on the left flowing through a matching step, then branching into three kinds of protected content, then converging on a restore-and-log step on the right. Far left: a "Text to translate" box — the cleaned customer message or the staff reply, with three example fragments below: a brand name, a price, and an order number. The matcher scans the text. The middle column shows the three branches. Branch one, Glossary terms: brand names, product names, and set phrases from the Drive glossary are matched and each is swapped for a placeholder; the glossary is case-aware and matches whole words only, so it won't mangle a term that appears inside another word. Branch two, Numbers and prices: every number, currency amount, percentage, date, and measurement is found by a strict pattern and swapped for a placeholder, so the model can never change a digit, a decimal point, or a currency symbol. Branch three, IDs and codes: order numbers, account IDs, tracking codes, SKUs, and anything that looks like a reference are swapped for placeholders too, since those must land character for character. The right side shows the convergence: after the model translates the words between the placeholders, a restore step swaps each placeholder back to its exact original value, and every swap (original, placeholder, restored) is written to the audit log. A note at the bottom: the model translates the words, never the figures — and every swap is logged, so a price can never quietly change in translation. Text to translate message or reply [brand name] [$42.00] [order #4471] Kind 1 Glossary terms • Brand and product names, set phrases from Drive • Whole-word, case-aware • Swapped to placeholders Kind 2 Numbers and prices • Amounts, percents, dates, measurements • Strict pattern match — no digit or symbol can change Kind 3 IDs and codes • Order and account IDs, tracking codes, SKUs • Land character for character, untouched Restore + log swap back to exact original · placeholder restored · per swap written to audit The model translates the words, never the figures — and every swap is logged.
Fig 5. Three kinds of protected content, locked before translation and restored after. Glossary terms, numbers and prices, and IDs and codes are each swapped for placeholders; the model translates the words around them; the restore step puts the exact originals back and logs every swap.

Kind 1: glossary terms (the things only you know)

Some words must never be translated because they’re names, not words. Your company is called “Northwind,” not “north wind.” Your product is “FreshKeep,” not “keeps fresh.” A model with no context will sometimes translate these into their literal meaning, which reads as wrong to anyone who knows your brand. The glossary — the Google Sheet from Part 1 — lists every one of these, and the matcher swaps each for a placeholder before translation.

The matching is careful on purpose. It’s case-aware and matches whole words only, so a glossary term won’t accidentally get matched inside a longer, unrelated word. Each entry can also carry a note — “FreshKeep is a product line, never translate” — that’s shown to the agent on hover, so the human review has context too. Because the glossary lives in Drive, adding a new product name the day you launch it is a thirty-second edit, no deploy required; the sync job picks it up within fifteen minutes.

Kind 2: numbers and prices (the things that cost money to get wrong)

Every number in a message is found by a strict pattern and locked before translation: currency amounts (“$42.00”, “€39,90”), plain numbers, percentages, dates, and measurements. The relay doesn’t trust the model to carry a figure faithfully, because it occasionally won’t — it’ll round, it’ll re-format, it’ll convert “1,000” (one thousand) into “1.000” in a language where the comma and period swap roles, and the meaning quietly changes. By locking the exact characters and restoring them verbatim, the figure that leaves is character-for-character the figure that arrived.

There’s one deliberate subtlety: the relay does not auto-convert currencies or units. If a customer writes “€40” the agent sees “€40,” not a guessed dollar amount — converting money is a business decision with a live exchange rate, not a translation, and silently doing it would be exactly the kind of “helpful” error this guardrail exists to prevent. If a conversion is needed, the agent does it on purpose, and the relay protects whatever figure they write.

Kind 3: IDs and codes (the things that must land exactly)

Order numbers, account IDs, tracking codes, SKUs, reference numbers — anything that’s an identifier rather than a word — must land character for character or it’s useless. A tracking code with one wrong character points at nothing. An order number with a flipped digit pulls up someone else’s order. These are matched by shape (mixes of letters and digits, hash-prefixed numbers, known ID formats) and locked the same way. They’re the lowest-risk to detect and the highest-cost to get wrong, which makes them the easiest call in the whole system: never let the model touch them.

Restore, then prove it

After the model returns its translation — with the placeholders still sitting in place, untouched — the restore step swaps each placeholder back to its exact original value. Then it does the part that makes the whole thing trustworthy: it writes every swap to the audit log. For each protected bit, the log records the original value, the placeholder it was given, and the value it was restored to. Because the restored value is always the original value, you can prove — not hope, prove — that no figure, name, or code was altered in translation. If a customer ever disputes “you quoted me $42, the email said $52,” the log settles it in seconds.

This same lock-and-restore runs identically on the way in (translating the customer’s message for staff) and on the way out (translating the staff reply for the customer). One guardrail, both directions, no exceptions. It’s the quiet reason the relay is safe to put in front of real money: the model makes the language fluent, and a deterministic step — not the model — keeps the facts exact.

Next post: the cost breakdown. The whole relay runs in coffee-money territory at SMB volume; Part 6 explains exactly where the dollars go and why the cheap model carries almost all of it.

All posts