Skip to main content

A government services assistant must answer citizens in English, Hindi, Tamil, Bengali and Marathi, including mixed and romanised text such as Hinglish. The source documents are mostly in English. Design it for 1 million users.

System design · Pro 1

Short answer

Clarify languages, scripts, channels and risk. Detect language and script per message, retrieve with multilingual embeddings or translate the query to English, generate in the user's language from the retrieved sources, and keep official terms consistent with a glossary. Build an evaluation set per language with native speakers, and monitor quality by language.

Deeper answer

Requirements: which languages and scripts, whether users type romanised or mixed text, voice or text, and how costly a wrong answer is.

Design: detect the language and script of each message, and reply in the same one unless the user chooses another. For retrieval over English documents there are two options. Multilingual embeddings match a Tamil question to English text directly, which is simple but weaker for some languages. Translating the query to English first often improves retrieval, at the cost of one more step and possible translation errors. The model then writes the answer in the user's language from the retrieved passages, with a glossary for scheme names and official terms, and a link to the source.

Trade-offs and limits: Indian-language text usually uses more tokens than English, so cost and latency are higher. Models are weaker in lower-resource languages and on romanised text, so test before trusting them. Build an evaluation set of real questions per language, reviewed by native speakers, and report scores by language, not as one average. Fall back to English or a human when confidence is low.

What a strong answer covers

Answer it out loud in the mock interview about 2.5 min

Follow-ups to expect

Common mistakes

Learn it

AI in Indian languages: tokens, quality gaps and what to use

Practice System design questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.