Skip to main content
Intempt
Coming soon

Recommendation algorithm test

Compares three ways of picking recommended products (also bought, recently viewed, trending) on cross-sell revenue.

Authored by Sid Chaudhary

Founder & CEO at Intempt

Agentic workflow

Coming soon

1 step Blu runs end to end. It drafts a plan and nothing runs until you approve it.

  1. 1

    Set up the algorithm test

    Coming soon

    Blu builds a step

About this recipe

When to use it

Collaborative filtering, session-based, and popularity-weighted recommendations all sound reasonable in theory, and they perform differently in practice depending on your catalog. This tests all three on real revenue.

What it delivers

Runs a server-side experiment testing which recommendation engine - collaborative filtering, session-based, or popularity-weighted - drives more cross-sell revenue.

How you prompt this

Describe the outcome in your own words and Blu Agent maps it to this recipe, or run it by name. It drafts a plan first and nothing runs until you approve it.

Tell Blu Agent what you want

“Compares three ways of picking recommended products (also bought, recently viewed, trending) on cross-sell revenue.”

recipe.md preview

Built from the published catalog. Blu Agent's full step prompts load in your workspace when you run it.

Sign up to read the full recipe.md and run it with Blu Agent.

Sign up to see the full recipe

Inputs & outputs

What the recipe needs before it runs, and what it leaves in your workspace.

Inputs

  1. Nothing declared beyond an Intempt workspace. Blu asks for anything else it needs as it goes.

Outputs

    How the recipe runs

    Blu follows the steps in order and shows you each one before anything goes live.

    1. 01Set up the algorithm testCreate a SERVER EXPERIMENT on /experiences titled "Recommendation Algorithm Test". ═══ PATH 1: Top-level configuration ═══ Experience type: server_experiment Flag Key: recommendation_algorithm Variants: - Control (33%): collaborative filtering: "Customers also bought" - Variant B (33%): session-based: "Recently viewed by you" - Variant C (34%): popularity-based: "Trending now" Targeting: - Pages: any page that renders the recommendation block (typically PDPs and category pages: page URL contains "/products/" OR "/category/") - Devices: any (server experiments are device-agnostic; the recommendation API is called server-side regardless of client device) - Audience: visitors with >1 View page in the current session (excludes one-and-done bouncers: recommendations are most useful for engaged shoppers) - Display frequency: always (every page render that includes the recommendation block calls getFlag and serves a variant) Primary metric: goal_completed_in_experience where experience_id = <this> AND value > 0 (revenue from Placed order where the order's items include a clicked recommendation) Secondary metrics: - Click on where target_id starts with "rec-" (recommendation click-through rate) - Placed order.total_price for orders following a recommendation click (revenue from recommended products) - Recommendation click position (which slot (1, 2, 3, etc.) the user clicked) - Add-to-cart-from-rec rate: Cart created where the added product_id matches a recently-clicked recommendation Guardrail: PDP View page to Cart created conversion rate must not drop >5% (avoid recommendations distracting from primary purchase decision) Schedule: 14 days ═══ PATH 2: Variant JSON payload ═══ Variant: Control (collaborative filtering) JSON payload: { "algorithm": "collaborative_filtering", "endpoint": "/api/recs/collaborative", "header_text": "Customers also bought", "max_items": 4, "fallback_algorithm": "popularity" } Variant: B (session-based) { "algorithm": "session_based", "endpoint": "/api/recs/session", "header_text": "Recently viewed by you", "max_items": 4, "fallback_algorithm": "popularity" } Variant: C (popularity-based) { "algorithm": "popularity", "endpoint": "/api/recs/trending", "header_text": "Trending now", "max_items": 4, "fallback_algorithm": null } SDK integration: const recsConfig = await intempt.getFlag('recommendation_algorithm', userId); const recs = await fetch(recsConfig.endpoint + '?productId=' + currentProductId); // render recs.items in the PDP recommendation block, using recsConfig.header_text Each rendered recommendation should have target_id = "rec-{position}" (e.g., "rec-1", "rec-2") so Click on per-position aggregation works. Taxonomy notes: - The recommendation endpoints (/api/recs/*) are application-side and not part of the canonical taxonomy; this recipe assumes the merchant has these implemented. - Attributing Placed order revenue to a recommendation requires the order to record which items came from a clicked recommendation: typically via session tracking joining Click on (target_id starts with "rec-") to subsequent Placed order.items. - "Display frequency: always" for server experiments means every getFlag call returns the same variant for the same userId (sticky assignment); the variant is computed once and cached for that user for the experiment's duration.

    Install Intempt and run it

    1. 1

      Sign up

      Create a free Intempt workspace.

    2. 2

      Connect your data

      Add the sources this recipe reads from.

    3. 3

      Ask Blu

      Type /product-recommendation-algorithm in Blu once this recipe is live there.

    4. 4

      Review and approve

      Blu builds each step and waits for your OK before anything goes live.

    More recipes by Sid Chaudhary

    Got a play worth sharing?

    Publish it to the Intempt Collective Marketplace and earn when other teams run it.

    Submit a recipe