ML-Powered Search & RankingQuery Understanding (Intent, Parsing, Rewriting)Medium⏱️ ~2 min

Intent Classification and Routing Strategies

Definition
Intent classification categorizes queries by what the user wants to accomplish. The classic taxonomy: navigational (find a specific site), informational (learn something), transactional (complete an action like buying or booking).

Why Intent Matters for Routing

Different intents need different retrieval strategies. Navigational queries ("facebook login") should return one authoritative result fast. Informational queries ("how does photosynthesis work") need diverse, comprehensive results. Transactional queries ("buy iphone 15") should prioritize product pages with prices. Routing to the wrong backend wastes compute and frustrates users. A product search query hitting a general web index returns blog posts instead of purchasable items.

Classification Approaches

Rule-based: Pattern matching on keywords ("buy", "price", "how to"). Fast, interpretable, but brittle. Traditional ML: Logistic regression or SVM on n-gram features. Requires labeled data, handles more patterns. Neural: Fine-tuned BERT or distilled models. Best accuracy (90-95%), but higher latency (10-50ms). Production often uses cascades: fast rules filter obvious cases, ML handles ambiguous ones.

Multi-Intent Queries

"Best restaurants near me with outdoor seating" has both informational (what restaurants exist) and transactional (I want to book) aspects. Handle with: multi-label classification (predict all applicable intents), hierarchical intents (primary + secondary), or intent scores (probability per intent). The UI can then blend results from multiple backends based on intent weights.

💡 Key Takeaways
Classic taxonomy: navigational (specific site), informational (learn), transactional (buy/book)
Different intents need different retrieval: navigational wants one result, informational wants diversity
Approaches: rules (fast, brittle), traditional ML (labeled data), neural (90-95% accuracy, 10-50ms)
Production cascades: fast rules for obvious cases, ML for ambiguous ones
Multi-intent queries need multi-label classification or intent scores to blend backend results
📌 Interview Tips
1Explain the navigational/informational/transactional taxonomy with examples for each
2Describe cascade architecture (rules then ML) for production systems
3Mention multi-intent handling when discussing complex queries
← Back to Query Understanding (Intent, Parsing, Rewriting) Overview