Similar
Similar recommendations
POST /indexes/{index_name}/recommend
Purpose
Surface similar alternatives to the item(s) a shopper is viewing to keep them engaged and reduce bounce rates. These recommendations excel at providing substitutions when size, color, price, or brand preferences differ, or when the original item is out of stock. They help maintain shopping momentum by offering viable alternatives without disrupting the user's intent.
Background
Similar recommendations use vector similarity and machine learning to identify products with comparable features, styles, or characteristics. The algorithm analyzes product attributes, visual similarities, and behavioral patterns to surface items that serve as effective substitutes, helping reduce pogo-sticking and cart abandonment when the primary item isn't quite right.
When to use
- Product detail pages: Show similar alternatives to give customers more options and choices
- Recommendation carousels: Surface items with comparable features, aesthetics, or price points, underneath collections, for example
- Cross-merchandising: Present alternatives that might better match customer preferences
Example uses
Use Case | Description | Input Products | Business Impact |
---|---|---|---|
PDP "Similar Items" Section | Display alternatives below or beside the main product on detail pages | Current product being viewed | Increases choice, extends browsing time |
Homepage Recommendation Carousels | Show "You Might Also Like" or "Similar Styles" carousels | Recently viewed or featured products | Encourages exploration, improves discovery |
Category Page Side Rails | Present similar alternatives alongside category listings | Category anchor or filtered products | Expands choice, captures various preferences |
Search Results Enhancement | Add similar product suggestions within search result pages | Search result products as anchors | Increases options, improves search experience |
Email Marketing Recommendations | Include "Similar to Your Recent Views" in email campaigns | Previously viewed or purchased items | Drives return visits, extends engagement |
Input products (document_ids)
- PDP Context: Use the current product being viewed to find direct alternatives
- Stock Context: Use out-of-stock item IDs to find immediate substitutes
- Preference Context: Include recently viewed or clicked items to understand style preferences
- Best Practice: Use 1-3 most relevant products as input to maintain similarity focus and relevance
Example (cURL)
curl -X POST "https://api.marqo.ai/indexes/product-catalog/recommend" \
-H "Authorization: Bearer $MARQO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_ids": ["sku_38702"],
"method": "similar",
"limit": 8
}'
Parameters
Filters use the Marqo Filter DSL. Note: Results automatically exclude the input item(s).
Name | Type | Required | Description | Example |
---|---|---|---|---|
method | string | yes | Recommendation method identifier. | "similar" |
document_ids | array[string] | yes | Input item IDs to base similarity on. | ["sku_38702"] |
limit | integer | no | Max number of results to return. Defaults to 10. | 8 |
offset | integer | no | Offset for pagination. | 0 |
filters | object | no | Server-side constraints (e.g., in_stock , price ranges, brand, category). See Marqo Filter DSL. |
{ "in_stock": true } |
user_id | string | no | Optional user identifier for personalization. | "abc123" |
session_id | string | no | Optional session identifier. | "xyz789" |