Skip to main content

Intent Handling

Intent handling detects what users are looking for in their queries (brand, category, attribute, use-case) and applies appropriate ranking behavior for each intent type.

Overview​

Different query types require different ranking strategies. Intent handling automatically detects query intent and applies the most appropriate ranking behavior, ensuring users find what they're looking for.

Intent Types​

Brand Intent​

Users searching for a specific brand:

  • Queries: "Nike shoes", "Apple iPhone", "Samsung TV"
  • Strategy: Prioritize exact brand matches, show brand-specific products
  • Ranking: High weight on brand match, lower weight on other attributes
{
"intent_type": "brand",
"detection_patterns": [
"brand_name + product_type",
"brand_name only"
],
"ranking_strategy": {
"brand_match_weight": 0.8,
"relevance_weight": 0.2
}
}

Category Intent​

Users browsing a category:

  • Queries: "running shoes", "laptops", "kitchen appliances"
  • Strategy: Show diverse products from the category
  • Ranking: High weight on category match, diversity across brands/attributes
{
"intent_type": "category",
"detection_patterns": [
"category_name",
"product_type"
],
"ranking_strategy": {
"category_match_weight": 0.7,
"diversity_weight": 0.3,
"apply_guardrails": true
}
}

Attribute Intent​

Users searching by specific attributes:

  • Queries: "red dress", "wireless headphones", "waterproof watch"
  • Strategy: Prioritize products matching the attribute
  • Ranking: High weight on attribute match, filter by attribute
{
"intent_type": "attribute",
"detection_patterns": [
"color + product_type",
"material + product_type",
"feature + product_type"
],
"ranking_strategy": {
"attribute_match_weight": 0.9,
"relevance_weight": 0.1
}
}

Use-Case Intent​

Users searching for a use case or problem:

  • Queries: "gift for mom", "workout gear", "home office setup"
  • Strategy: Show products that solve the use case
  • Ranking: Semantic relevance + use-case tags
{
"intent_type": "use_case",
"detection_patterns": [
"for + use_case",
"gift for",
"best for"
],
"ranking_strategy": {
"semantic_relevance_weight": 0.6,
"use_case_tags_weight": 0.4
}
}

Comparison Intent​

Users comparing products:

  • Queries: "iPhone vs Samsung", "best running shoes"
  • Strategy: Show top products for comparison
  • Ranking: High-quality, comparable products
{
"intent_type": "comparison",
"detection_patterns": [
"vs",
"compare",
"best"
],
"ranking_strategy": {
"quality_weight": 0.5,
"popularity_weight": 0.3,
"reviews_weight": 0.2
}
}

Intent Detection​

Detect intent using multiple methods:

Pattern Matching​

{
"detection_method": "pattern_matching",
"patterns": {
"brand": ["brand_name + product", "brand_name"],
"category": ["product_type", "category_name"],
"attribute": ["attribute + product", "color + product"]
}
}

Machine Learning Classification​

{
"detection_method": "ml_classification",
"model": "intent_classifier_v1",
"features": [
"query_text",
"query_length",
"contains_brand",
"contains_category",
"contains_attribute"
]
}

Hybrid Approach​

Combine pattern matching and ML:

{
"detection_method": "hybrid",
"pattern_matching_weight": 0.4,
"ml_classification_weight": 0.6
}

Intent-Specific Ranking​

Apply different ranking strategies per intent:

{
"intent_strategies": {
"brand": {
"boost_exact_matches": true,
"diversity": "low",
"guardrails": false
},
"category": {
"boost_exact_matches": false,
"diversity": "high",
"guardrails": true,
"max_per_brand": 2
},
"attribute": {
"filter_by_attribute": true,
"boost_attribute_match": true,
"diversity": "medium"
}
}
}

Ambiguous Intent Handling​

Handle queries with ambiguous or multiple intents:

{
"ambiguous_intent_strategy": {
"detection_threshold": 0.6,
"fallback": "category",
"show_diverse_results": true
}
}

Intent Analytics​

Track intent distribution and performance:

  • Intent distribution: What percentage of queries are each intent type?
  • Conversion by intent: Which intents convert best?
  • Intent accuracy: How accurate is intent detection?
  • Intent-specific metrics: Performance metrics per intent type

Best Practices​

  1. Start with common intents: Focus on brand, category, and attribute intents first
  2. Validate detection: Regularly review intent detection accuracy
  3. Test strategies: A/B test intent-specific ranking strategies
  4. Handle ambiguity: Have fallback strategies for ambiguous queries
  5. Monitor performance: Track how intent handling affects conversion
  6. Iterate: Continuously improve intent detection and ranking strategies