Retrieval and RAG · Staff
A Hindi-English query names a product in Latin letters. Why does search miss its policy?
The question
Interview question
A user asks, “FlexSaver ka cancellation charge kya hai?” The policy corpus has Hindi and English documents. Some spell the product as `FlexSaver`, others use a Devanagari transliteration, and an old product called `Flex Saver Plus` has a different fee. English search quality looks good, but this query returns the old fee. How would you fix retrieval without silently changing which product the user meant?
Take a few minutes to form your approach. Then open a worked answer and compare the decisions.
Reveal a worked answer
Start with identity, not translation. FlexSaver is a product identifier in this question. The surrounding words ask for cancellation charge. A rewrite that turns the whole query into generic English and drops the exact name may increase semantic recall while finding the wrong plan. Transliteration can produce more than one spelling. It is a candidate-generation aid, not permission to merge two product IDs.
I would build a product alias registry with stable IDs, official names, locale-specific spellings, historical names, and effective dates. At query time keep the original bytes and script, extract the likely product mention, look up plausible IDs, and retain ambiguity if more than one fits. Search the exact product ID or controlled aliases in a lexical path, then use multilingual semantic retrieval for the rest of the intent. Retrieve current policies within the user's region, channel and date. The answer cites the clause under the resolved product, not merely a page that has similar words.
If the name could refer to FlexSaver or Flex Saver Plus, ask the user or show the distinction before quoting a fee. Do not let a fluent Hindi answer hide that the source was for a different product. Test typo forms, Latin and Devanagari spellings, code switching, transliteration variants and deliberately confusing old names. Evaluate answer-bearing recall and wrong-product rate by language and script, not only overall recall. A recent code-switching retrieval study studies the effect of mixed-language queries on retrieval. MIRACL is useful for multilingual retrieval evaluation, but its main setup is monolingual query and corpus within each language. Neither directly supplies our product alias truth set. We must curate that from the business catalog.
Now suppose the English policy is authoritative and the Hindi translation lags a revision. Language matching cannot choose authority. The retrieval layer should carry policy release and translation status, then the answer can use the current authoritative text and provide a careful Hindi explanation with citation. If translation is legally controlling in that market, that is a different source hierarchy. Record it instead of assuming English always wins.
There are also latency and cost choices. Running every query through every language index and an LLM translator may be expensive. Start with script detection and a small set of alias candidates, query scoped lexical and semantic paths in parallel, rerank authorized current documents, and fall back to a clarification when identity stays unresolved. Keep original query, rewrite, resolved ID and cited revision in a trace so we can diagnose a miss.
The query rewrite removed a version number. Why did RAG still look healthy? asks what happens when a rewrite erases a version number. The preservation idea is related, but this case tests multilingual entity resolution, product aliases and translation authority. A strong answer should not stop at “use a multilingual embedding model.”
Continue reading
Related questions
Read beyond the question
Explore more retrieval and rag
Follow another question in this area, or return to the full Interview Prep index.
Browse this area →