AI and Semantic Search
Multilingual Embedding Search: Test Language Coverage
Test multilingual search with native queries, mixed scripts and reviewed relevance sets, then diagnose language gaps without hiding them in averages.
In this article
Multilingual embedding search should be tested with the languages your users actually type, not just translated English benchmark queries. Build a small reviewed dataset for each language, include cross-language searches, and separate model failures from missing or incorrectly processed documents.
A model described as multilingual may cover many languages, but coverage is not a promise of equal quality in every domain. Technical acronyms, product names, mixed scripts and short support questions create different challenges from a clean sentence about everyday life.
Start with a language and task matrix
List the query languages, document languages and useful retrieval directions. A Japanese query finding a Japanese guide is different from a Japanese query finding an English API reference. A product may need both, or it may only need one.
For each direction, choose tasks that matter to the service: finding a billing explanation, locating a troubleshooting procedure or identifying the current product documentation. Add native phrasing rather than relying entirely on machine translation. A fluent reviewer should confirm that the query sounds ordinary and that the labeled result answers it.
The Sentence Transformers model overview distinguishes models and language coverage. Use documentation to form a candidate list; use your own matrix to decide whether a candidate works for your users. Avoid turning a long supported-language list into a quality claim.
Keep a compact, inspectable test record
{"case_id":"ja-support-014","query_language":"ja",
"document_language":"en","query":"APIキーを再発行したい",
"relevant_document_ids":["key-rotation-guide"],
"task":"find the API key replacement procedure"}This is an illustrative case, not a measured result. Keep relevance judgments separate from the result produced by the model. Otherwise, rerunning an evaluation can accidentally replace the expected answer with the latest system output.
Use JSON Viewer to inspect a sanitized test record and CSV Viewer to compare reviewed outcomes. Keep personal support messages out of public examples. A synthetic query can often preserve the language challenge without exposing a customer's problem.
Include the messy inputs users produce
Test Japanese and Korean alongside Latin product names, abbreviations and punctuation. Include short queries with little grammatical context, common spelling variations and copied error messages. Test the specific scripts and languages the product serves rather than assuming a nearby language behaves similarly.
For languages without consistent space-separated words, examine your text preparation carefully. A preprocessing rule written for English can damage useful content before the model sees it. Also verify that exported test data remains valid UTF-8 and that characters were not replaced during CSV or database import.
Do not normalize away meaningful distinctions merely to improve a score. Preserve the original query for diagnosis. If normalization is required, record its recipe and test before-and-after behavior on a reviewed set. The important question is whether the change helps users find the intended information.
Measure results separately by language
Choose a retrieval depth that matches the product, such as whether a relevant document appears in the first five results. Report outcomes for each language direction and task category. Include the number of reviewed cases so a result based on three queries is not mistaken for broad evidence.
A combined average can improve while a minority language becomes much worse. Examine those slices before rollout. Mark genuinely ambiguous cases separately instead of forcing reviewers to agree that one document is universally correct.
Keep latency and failure rates beside quality results. A multilingual model that passes relevance checks but times out on the target device still creates a poor experience. Test representative query lengths and concurrent traffic rather than measuring only a warm single request.
Diagnose a failed query in order
First confirm that the intended document was ingested and is visible to that user. Check language tags, filters and document IDs. A perfect embedding cannot retrieve a record excluded by an incorrect locale filter.
Next inspect the text sent to the encoder. Look for truncation, encoding damage, unwanted translation and inconsistent query instructions. Then compare the relevant document's rank and score with competing documents. Only after those checks should you conclude that the model needs replacement.
Consider a lexical fallback for exact identifiers and error codes. Semantic search is useful, but an API name or invoice number may require exact matching. Evaluate any combined retrieval strategy against the same reviewed cases rather than assuming a fallback always helps.
Have reviewers assess native-language relevance independently of the English translation. A translated query can lose politeness, domain terminology or ambiguity that affected the original search. Store the review language and judgment rationale with the case so later evaluators can understand the intended task.
Release with visible limits
Write down which language directions passed, which remain uncertain and who reviewed the cases. Do not silently promise unsupported languages in the interface. Offer a clear fallback or an explanation when confidence is insufficient.
Keep the matrix versioned as the product expands. New documentation, vocabulary and user groups can change retrieval behavior without a model upgrade. For a model replacement, use the vector index migration guide to keep query and document encoders compatible while these tests run.