Skip to main content

Designing Multilingual Model Invocation and Evaluation for AI Customer Service

· 4 min read
Jack Ning
Maintainer of Bytedesk

The same AI agent answers fluently and accurately in English, then goes off the rails in Thai or Vietnamese — that is not mysticism, it is the real distribution of multilingual model capability. Cross-border platforms must often serve English, Thai, Vietnamese, Indonesian, and Portuguese markets simultaneously; until the language problem is solved, an "AI agent" is only an English-market agent.

This is the sixth post in an experience-sharing series for AI customer service product managers and developers, drawn from hands-on practice as an AI product manager at a Southeast Asian cross-border e-commerce platform. In this post I want to share a multilingual invocation and evaluation scheme for an AI agent that must support English, Thai, Vietnamese, Indonesian, Portuguese, and more — one that localizes language identification errors, semantic understanding gaps, and inaccurate localized expression.

Illustration: Per-language quality evaluation with human fallback routing

Three Key Points in Multilingual Invocation and Evaluation​

  • Multilingual NLP engineering: unified model vs. per-language models, and how the language policy is decided — each with explicit trade-offs.
  • Per-language evaluation infrastructure: without per-language evaluation sets, "minor languages perform worse" stays forever a feeling.
  • Localization quality and cultural adaptation awareness: a correct translation is not a natural expression; terminology and cultural context are another layer.

The Overall Design​

1. Invocation scheme: one strong multilingual model as the base, targeted reinforcement for minor languages​

  • Prefer one strong multilingual LLM over maintaining a small model per language — the latter spirals in maintenance cost and consistency. But evaluate minor languages (Thai, Vietnamese) carefully; when insufficient, add fine-tuning or few-shot examples for that language.
  • Encode the language policy in the system: reply in the language of the user's message; for mixed or uncertain language, follow the user's conversation history or account default; pin output-language constraints in the prompt to prevent "language switching" (answering a Thai question in English).
  • Multilingual knowledge alignment: bind all language versions of a policy to one identifier; retrieve preferring the user's language, and when missing, fall back to the English original, translate the answer, and cite the source — at minimum the user knows which language version the answer came from.

2. Evaluation: per language, per layer​

  • Build an independent evaluation set per language, covering high-frequency question types and locale-specific scenarios (e.g., the Indonesian site's cash-on-delivery policy). Each sample carries the triple "question — standard evidence — standard answer."
  • Layered metrics:
    • Language identification accuracy (detection layer);
    • Retrieval recall (each language's knowledge base tested separately);
    • Factual correctness of answers (human + model-as-judge dual scoring);
    • Naturalness of localized expression (native-speaker review).
  • After launch, monitor per language: handoff rate, repeat-contact rate, and negative feedback, with automatic alerts when a language's metrics go anomalous — do not wait for the monthly report.

3. Problem localization: three problem types, three diagnostic paths​

  • Language identification errors: compare detector output against human labels; see whether errors concentrate in short texts, dialects, or code-mixed input; if needed, inject the user's site and account language as priors instead of trusting the detector alone.
  • Semantic understanding gaps: run parallel tests of the same question across languages (same knowledge source). If English is right and the minor language is wrong, the problem is model understanding — add training data for that language or switch to retrieval-augmented prompting to help the model "read."
  • Inaccurate localized expression: have native-speaking operations review answer style; maintain a terminology glossary per language (standard translations of product categories and logistics statuses) and inject terminology constraints into prompts — preventing "literally correct but no local would ever say that."

How This Maps to Weiyu​

The Weiyu open-source customer service system (GitHub: https://github.com/bytedesk/bytedesk , website: https://www.weiyuai.cn ) natively supports multilingual interfaces and multilingual knowledge content, with service languages configurable per market; on the AI side it supports multiple LLM providers, letting teams choose and validate model combinations per language market; the knowledge base supports multilingual content maintenance, and channel plus skill-group routing can direct minor-language conversations to agents who speak them as the safety net; conversation statistics break down performance by channel, supplying the online data source for per-language evaluation.

Key Takeaways​

  • One unified LLM + targeted reinforcement for minor languages is more maintainable than a model per language.
  • Explicit language policy: reply language, fallback order, and anti-switching guards belong in the system, not in the model's discretion.
  • Independent per-language evaluation sets are the foundation; metrics must be layered (identification / retrieval / facts / expression).
  • Parallel testing localizes understanding gaps: same question across languages — English right, minor language wrong means a model problem.
  • Glossaries + native review close the last mile of localization: "correctly translated but unnaturally phrased."