{"slug": "how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai", "title": "How we stopped LLMs from writing fake Armenian: a deterministic gate for AI-translated lessons", "summary": "A developer building Samevia, a free multilingual lesson platform based in Stepanavan, Armenia, has described a deterministic validation gate that rejects LLM-drafted translations before publication, catching script leaks and untranslated English that an LLM judge missed. The gate routes failed leaves to the next provider in a chain, logs every attempt with its outcome and model, and alerts when hourly success drops below 80% — an alert that revealed two models had begun producing mostly invalid Armenian. The platform now carries 460 lessons across 16 fields, with 429 published in English and 269 in Armenian.", "body_md": "I'm building [Samevia](https://samevia.com) 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.\n\nToday 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.\n\nArmenian 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:\n\nAn LLM judge did not catch these reliably. A regex did.\n\nEvery translated leaf (a heading, a paragraph, a quiz option) goes through the same checks before it is accepted:\n\nIf 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.\n\nA strict gate is only useful if it rejects the right things. Two real cases from this month:\n\n`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.\nWe 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\".\n\nIf you read Armenian, or another language that LLMs tend to mangle, I'd value your feedback on the lessons: [https://samevia.com](https://samevia.com)", "url": "https://wpnews.pro/news/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai", "canonical_source": "https://dev.to/sargis_mesropyan_c9e3bc1e/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai-translated-lessons-57j9", "published_at": "2026-11-25 21:35:40+00:00", "updated_at": "2026-11-25 21:43:45.487323+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "natural-language-processing", "ai-agents"], "entities": ["Samevia", "Stepanavan", "Armenia", "pytest"], "also_reported_by": [], "takeaway": "Gate each translated leaf with deterministic script and untranslated-text checks before acceptance, route failures to the next provider instead of retrying, and log per-model outcomes so a flaky model is distinguishable from flaky translation.", "recommendation": {"advice": "Validate LLM translations with deterministic script and untranslated-text checks, route rejected leaves to the next provider, and alert on per-model success rates below 80%.", "playbook": "output-verification", "playbook_url": "https://wpnews.pro/playbooks/output-verification"}, "alternates": {"html": "https://wpnews.pro/news/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai", "markdown": "https://wpnews.pro/news/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai.md", "text": "https://wpnews.pro/news/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai.txt", "jsonld": "https://wpnews.pro/news/how-we-stopped-llms-from-writing-fake-armenian-a-deterministic-gate-for-ai.jsonld"}}