Mapping Misspelled and Hinglish Queries to Catalog Categories
Last updated: November 29, 2026
Quick Overview
Many Flipkart searches are misspelled, transliterated Hindi or mixed language, like 'ldkiyon ke joote' or 'moblie under 10k'. How would you build a model that maps each query to the right product category to improve retrieval?
Flipkart
November 29, 20260
0
0 solved
Many Flipkart searches are misspelled, transliterated Hindi or mixed language, like 'ldkiyon ke joote' or 'moblie under 10k'. How would you build a model that maps each query to the right product category to improve retrieval?
A large share of Flipkart's new users search in Hinglish or regional languages written in Latin script, often with typos, and wrong category prediction sends them to irrelevant results. The interviewer checks NLP modeling choices from character n-grams to multilingual transformers, how labels are created from logs, and latency constraints.
What the Interviewer Expects
- Frame it as multi class or multi label classification over a category taxonomy
- Create labels from engagement logs (purchases and add to carts after the query)
- Choose subword or character level representations robust to typos and transliteration
- Compare a fast baseline with a fine tuned multilingual transformer
- Handle latency with distillation and caching
- Evaluate per query frequency band and language
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How do you handle queries that are genuinely ambiguous, like 'apple'?
- How would you use an LLM here without breaking latency budgets?
- How do you keep the model current as new products and slang appear?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
- Output: top categories (leaf or level 2 of the taxonomy) with probabilities, multi label allowed.
- Latency: a few milliseconds per query on CPU, since it sits in the search path.
- Data: millions o...
Approach
Build labels from logs, start with a strong fast baseline, then a distilled transformer, and evaluate by segment....