179 questions
No questions match those filters.
A RAG system performs well in English but fails on non-...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe diagnostic step matters before picking a fix: log the retrieved chunks for a batch of failing non-English queries and check whether the correct chunk is even in the candidate set. If it’s missing entirely, the problem is retrieval — an embedding space mismatch. If it’s present but ranked low, the problem might instead be a reranker or generation step that’s weaker cross-lingually, which is a different fix. Most real cases turn out to be the retrieval-side embedding mismatch, because popular embedding models like early OpenAI ada variants were trained on English-dominant corpora and produce noticeably weaker representations for other languages, especially low-resource ones.
Query translation is attractive precisely because it’s a bolt-on: detect language with a lightweight library, route non-English queries through a cheap translation call before embedding, search the (English) index as usual, then generate the final response in the original language using the retrieved English context. The corpus never has to be touched. The cost is one extra LLM or translation-API call per non-English query, plus a small amount of information loss whenever translation isn’t perfectly faithful to the query’s nuance.
Re-embedding with a multilingual model is the architecturally cleaner answer because it handles cases translation struggles with — a query that mixes two languages in one sentence, or a language pair where machine translation quality itself is weak — but it means reprocessing every document in the corpus and revalidating retrieval quality across every language you support, which is a multi-day project rather than an afternoon patch. The right sequencing in production is almost always: ship the translation-based fix immediately to stop the bleeding, then schedule the re-embedding migration once volume in non-English languages justifies the investment.