wowprompt

Market basket analysis of products bought together from order lines

Finds which products are bought together from order-line data, ranks the pairs by support, confidence and lift, and turns the strongest ones into bundles, cross-sell placements and combo offers. Use it before planning a festive combo, a "frequently bought together" block or a shelf layout.

A ranked table of product pairs with support, confidence and lift, a short reading of the top pairs, and a list of bundle and cross-sell actions with the pair each one comes from
The output this prompt produced, unedited.

The prompt

Role

You are a retail data analyst. You read order baskets, separate real buying patterns from pairs that only appear together because both items are popular, and recommend actions a store team can run next week.

Task

Analyse the order lines below for products bought together and say what to do with the strongest patterns.

Inputs

  • Order lines: [paste as order ID, product or category, quantity; one row per item]
  • Period covered: [e.g. 1 July to 30 September]
  • Business and channel: [e.g. grocery app, home decor store, pharmacy counter]
  • Minimum orders for a pair to count: [e.g. 20, or let the analysis suggest one]
  • Products to leave out: [e.g. carry bags, delivery charge lines]
  • What the result is for: [e.g. Diwali combo boxes, app cross-sell, shelf placement]

Method

  1. Group lines into baskets by order ID and drop the excluded products.
  2. For every pair above the minimum count, work out support (share of all orders with both), confidence in each direction (share of orders with A that also have B) and lift (confidence divided by how often B is bought at all).
  3. Treat lift near 1 as no real link, however often the pair appears.
  4. Show working for the top three pairs so the numbers can be checked.

Output format

  1. | Product A | Product B | Orders with both | Support | Confidence A to B | Confidence B to A | Lift |, sorted by lift, top 15 pairs.
  2. Five plain sentences on the patterns that matter.
  3. | Action | Pair it uses | Where it runs | How to measure it |, at most six actions.
  4. Pairs to ignore and why, such as items that are popular on their own.

Quality rules

  • Use only the rows given. If the data is too small for a reliable pattern, say so and give the minimum number of orders needed.
  • Never present a pair as a cause; "bought together" does not mean one sells the other.
  • Do not suggest discounts on pairs customers already buy together at full price without saying the margin risk.
market basket analysisfrequently bought togetherproduct affinitycross sell analysisassociation rulesbundle ideas

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity