I'm building Samevia from Stepanavan, a small town in northern Armenia. It teaches whole fields of knowledge, from mathematics to psychology, as short lessons in your own language, on the web and on Android. It is free to start and works offline.
Today it has 460 lessons across 16 fields. 429 are published in English and 269 in Armenian. Every one of them was drafted and translated by LLMs. This post is about the part that made that possible without shipping garbage: a small, boring, deterministic gate.
Armenian has its own alphabet. When we started translating lessons with smaller models, many outputs looked like translations to anyone who doesn't read Armenian, and were unusable to anyone who does:
An LLM judge did not catch these reliably. A regex did.
Every translated leaf (a heading, a paragraph, a quiz option) goes through the same checks before it is accepted:
If a check fails, the leaf is not "fixed up". It is sent to the next provider in the chain. Free-tier models go first; a paid model is only a backstop at the end. That ordering is why the product can be free. A strict gate is only useful if it rejects the right things. Two real cases from this month:
5 ppm or 120 mm/yr were flagged as untranslated English. They are units, not prose, so a number followed by a unit is now allowed.pytest, assert and fixture. The gate rejected the Armenian translation five times as "foreign script" and the pipeline kept paying for retries on the same leaf. The fix: an identifier that appears literally in the source (in code or a diagram) is a name, not a translation failure. Each fix shipped with a negative test, so the old wrong rejection is pinned as a failing case.
We log every translation attempt with its outcome (ok, still_invalid, script_leak, error) and the model that produced it, and alert when the hourly success rate drops below 80%. That alert is how we noticed, yesterday, that two models in the chain had started producing mostly invalid Armenian, while others were fine. Without per-model outcomes it would have looked like "translation is flaky".
If you read Armenian, or another language that LLMs tend to mangle, I'd value your feedback on the lessons: https://samevia.com