Skip to main content

Context-Aware Recommendations

Context-aware recommendations adapt to query context, category context, basket context, and user lifecycle to provide relevant recommendations.

Overview

Context-aware recommendations use current context (query, category, basket, lifecycle) to provide more relevant and timely recommendations.

Context Types

Query-Aware

Recommendations based on search query:

{
"context_type": "query_aware",
"query": "running shoes",
"recommendations": [
"running_socks",
"running_shorts",
"running_accessories"
]
}

Category-Aware

Recommendations based on category:

{
"context_type": "category_aware",
"category": "electronics",
"recommendations": [
"related_electronics",
"compatible_accessories"
]
}

Basket-Aware

Recommendations based on cart contents:

{
"context_type": "basket_aware",
"basket_items": ["prod_123", "prod_456"],
"recommendations": [
"frequently_bought_together",
"complete_the_look"
]
}

Lifecycle-Aware

Recommendations based on user lifecycle:

{
"context_type": "lifecycle_aware",
"user_stage": "new_customer",
"recommendations": [
"popular_products",
"starter_kits",
"best_sellers"
]
}

Best Practices

  1. Use multiple contexts: Combine contexts for better relevance
  2. Prioritize context: Weight context appropriately
  3. Test performance: Measure context-aware vs generic recs
  4. Update contexts: Keep context data fresh