Three-Layer Translation Architecture
Design principle: the most frequent and most critical terms are solved by the fastest layer; offline whenever possible, free whenever possible.
| Layer | Engine | Speed | Cost | Quality | Offline |
|---|---|---|---|---|---|
| L1 · Built-in Industry Term Dictionary | Digital-printing trilingual dictionary (uc_translate_dict, 367 entries) | Milliseconds (<5ms) | ¥0 | Industry terms 100% accurate (real human-vetted words) | ✅ Fully offline |
| L2 · Local Open-Source Engine | Argos Translate / LibreTranslate (deployed on this machine) | Seconds (0.2–2s per sentence) | ¥0 (open source, runs locally) | General sentences good; industry terms covered by L1 | ✅ Offline (after model download) |
| L3 · Google Free API Fallback | Google Translate free interface (free quota) | 0.5–3s (depends on network) | ¥0 (within free quota) | High quality, but requires internet | ❌ Needs internet |
| LLM | The LLM only handles hard sentences — Slang, long convoluted sentences, and contextual references that none of the three layers can handle are sent to the LLM on demand; the LLM is not the main path, so costs stay under control. | ||||
Call order (always try the cheapest layer first)
➡ Input → hit in L1 dictionary? → hit, return immediately (milliseconds ¥0) → miss → L2 local engine → L2 unavailable or quality insufficient → L3 Google free fallback → hard sentences all layers fail → LLM
⚠ The boss is asked again before every single step starts