Offline Document Translation vs Online Query Translation Trade-offs
OFFLINE DOCUMENT TRANSLATION
Translate all documents into a canonical language (usually English) at indexing time. Search and retrieval operate in the canonical language only.
Advantages: Simpler retrieval architecture. Single language index. No query translation latency. Higher retrieval quality because documents were translated offline with more compute.
Disadvantages: Translation quality affects all downstream tasks. Storage cost (store original + translated). Translation errors propagate. Cannot handle language-specific nuances that are lost in translation.
Best for: document search, knowledge bases where translation quality is acceptable and retrieval quality is paramount.
ONLINE QUERY TRANSLATION
Keep documents in original languages. Translate user queries into document languages at query time, or use multilingual embeddings for language-agnostic search.
Advantages: Documents preserved in original form. No translation storage cost. Can update translation models without re-indexing. Supports language-specific features.
Disadvantages: Query latency includes translation time (50-200ms). Query translation errors affect retrieval. Need to translate to multiple languages if documents span many languages.
Best for: real-time search where documents must remain in original language, or where language diversity is high.
HYBRID APPROACH
Use multilingual embeddings that map all languages into a shared vector space. No explicit translation needed—semantically similar content clusters together regardless of language.
Trade-off: Multilingual embeddings are less precise than monolingual ones. Cross-lingual retrieval recall is typically 10-20% lower than same-language retrieval. Acceptable for many use cases.