What I Built
merchant-ai-draft — an offline CLI that takes a merchant JSON file (Chinese copy), fills in Mongolian (Cyrillic) first drafts with a local open-weight model, and marks everything draft. If a merchant is marked reviewed, the whole file is left untouched. AI proposes, humans decide — enforced in code, not just in prose.
python mn_draft.py --input merchant.json
The context: Erenhot (二连浩特) is a Chinese border city facing Mongolia. Here's what most people don't realize — the merchants can already talk to each other. Spoken Mongolian crosses the border just fine. The wall is written language: Mongolia uses Cyrillic, Inner Mongolia uses the traditional script, and any written product information has to go through professional translators. Translation is slow and expensive — and, as merchants told me, sometimes the translator walks away with your client.
I started building a bilingual merchant guide: an electronic product card where you tap once to switch between Chinese and Cyrillic Mongolian, so merchants on both sides of the border can actually read about each other's products. This CLI is the drafting engine behind that card.
Picking the model took longer than writing the code. I tested four approaches against the same merchant-style sentences:
| Approach | Result |
|---|---|
| qwen3:8b / aya-expanse:8b (general LLMs) | Fluent-looking output, semantically wrong. aya-expanse mixed in Kyrgyz vocabulary despite officially "supporting Mongolian". |
| Hunyuan-MT-7B (translation champion) | In my tests: excellent quality, but only in traditional Mongolian script. I couldn't get usable Cyrillic out of it; asked to transliterate, it translated back into Chinese instead. |
| Transliteration chain (traditional → Cyrillic) | Investigated the mature tools: mostly online-only services or untested personal projects — wrong fit for an offline CLI. Dropped. |
| NLLB-200-3.3B (selected) | Outputs Cyrillic Mongolian natively — but terminology, currency units, and clauses remain unreliable. ~3 seconds per sentence on Apple Silicon. |
Demo
Two fictional merchants, translated end to end by the CLI (unedited real output):
Noodle shop: before.json → after.json — hours and address came out clean (每天09:00至21:00营业。 → Өдөр бүр 09:00 цагаас 21:00 цаг хүртэл ажиллана.); 提供打包服务。 (takeaway packing service) became "mining industry service".
Scarf wholesaler (the real local economy — Erenhot lives on border trade): before2.json → after2.json — the stress test. Tiered pricing numbers survived; product names didn't (纯色羊绒围巾 → something like "light-blue board"; cashmere → "goat skin"; yuan → tögrög).
I also spiked a photo-to-description flow: qwen2.5vl:7b described a product photo in 22 Chinese characters — a single image passed human visual inspection with no fabrication found (31 seconds including model load and image processing). But translating that description into Mongolian mangled the key product terms: "tie" came out as галзуу ("crazy", per human review), "jacket" as өмсөгч ("wearer"). Full notes: docs/bplus-spike.md.
The CLI itself is covered by 11 automated tests (review protection, ID preservation, offline failure handling).
Code
https://github.com/tylan2001ody-del/merchant-ai-draft
Who would pay for this (hypothesis, not proven)
Not the noodle shop owner — they'd never pip install anything. The bet: whoever runs a cross-border merchant directory. Instead of per-character API fees and translator wait times, they get instant local drafts, with merchant data (prices, phone numbers, addresses) never leaving their machine. If correcting drafts proves faster than translating from scratch — unproven, that's the hypothesis being tested — human effort moves from translation to review. Offline, private, file by file.
What's next
A glossary for recurring merchant terms (cashmere, ties, and jackets are apparently hard).
The same draft pipeline generalizes to other border languages.
A personal note
What stayed with me wasn't the models — Ollama, Transformers, the whole stack was my first hands-on run; before this I'd only read about them. It was the glimpse of something else: low-cost, privacy-respecting digital infrastructure that could make trade a little more open and a little more fair.
Small countries and small peoples have long been treated as the periphery. Wallerstein's world-systems theory named the structure — center and periphery — and the inequality baked into it. Open-weight models might crack that open a little. Finding a usable one wasn't easy (this post is the evidence), but if a shared written language can build a bit more understanding, a bit more trust, a few more partnerships across a border — then writing code that adds even a small possibility of goodness to the world is a happy thing.
Top comments (0)