Skip to main content

Similar Recommendations

Similar recommendations

POST /indexes/{index_name}/recommendations/similar

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 CaseDescriptionInput ProductsBusiness Impact
PDP "Similar Items" SectionDisplay alternatives below or beside the main product on detail pagesCurrent product being viewedIncreases choice, extends browsing time
Homepage Recommendation CarouselsShow "You Might Also Like" or "Similar Styles" carouselsRecently viewed or featured productsEncourages exploration, improves discovery
Category Page Side RailsPresent similar alternatives alongside category listingsCategory anchor or filtered productsExpands choice, captures various preferences
Search Results EnhancementAdd similar product suggestions within search result pagesSearch result products as anchorsIncreases options, improves search experience
Email Marketing RecommendationsInclude "Similar to Your Recent Views" in email campaignsPreviously viewed or purchased itemsDrives 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://ecom.marqo-ep.ai/api/v1/indexes/${index_name}/recommendations/similar \
-H "x-marqo-index-id: ${MARQO_INDEX_ID}" \
-H "Content-Type: application/json" \
-d '{
"documentIds": ["sku_38702"],
"limit": 8
}'

Parameters

Filters use the Marqo Filter DSL. Note: Results automatically exclude the input item(s).

NameTypeRequiredDescriptionExample
documentIdsarray[string]yesAn array of up to 10 item IDs to base similarity on.["sku_38702"]
limitintegernoMax number of results to return. Defaults to 10.8
offsetintegernoOffset for pagination.0
filterstringnoServer-side constraints (e.g., in_stock, price ranges, brand, category). See Marqo Filter DSL."in_stock:true"
attributesToRetrievearray[string]noAttributes to return in the response for each document. If not specified, all attributes are returned.["title", "price", "image_url"]
userIdstringnoOptional user identifier for personalization."abc123"
sessionIdstringnoOptional session identifier."xyz789"