Cross-Sell Compatibility BenchmarkFeatured

Most cross-sell engines recommend products similar to what a customer is viewing - other phones when someone is looking at an iPhone. A phone case fits; a second iPhone does not. Similarity and compatibility are different properties, and treating them as the same one degrades recommendation quality without leaving a clear signal in click-through metrics. This project measures how large that gap is and builds a four-step pipeline that closes most of it.
The work continues prior published research (Nauka i Tekhnika Sohodni, vol. 2(56), 2026, DOI 10.52058/2786-6025-2026-2(56)-1627-1642). A follow-up manuscript is currently under peer review; the full citation will be added on publication.
The problem with similarity-first retrieval
Standard cross-sell pipelines retrieve candidates by embedding distance: the most similar items to the anchor product, ranked by cosine similarity. For same-category recommendation, this works acceptably. For cross-category complementary products it does not, because similarity pulls toward look-alikes while compatibility requires fit. A running shoe and a shoe rack are not similar, but they pair naturally. A running shoe and a hiking boot are similar, but they do not complement each other in a cart.
In e-commerce, this translates directly to lost attachment revenue: a similarity-first pipeline misses verified companion products and fills the slot with variants the customer already considered and passed on.
Method
The pipeline runs four steps.
Retrieve. Rather than querying nearest embedding neighbors, the retrieval stage pulls candidates from curated complementary-category mappings. For a given anchor product (say, a wireless headset), the system queries categories that are known to contain compatible accessories rather than categories that contain similar items.
Verify. An LLM judge (gpt-5-nano) evaluates each candidate pair against the anchor product and returns a binary compatibility verdict. This step drops items that belong to a complementary category in principle but do not fit the specific anchor.
Score. Verified pairs receive a hybrid score combining embedding similarity (OpenAI text-embedding-3-small, 1024-dim, indexed in Typesense) and the LLM compatibility signal. The embedding component favors items that stay within a useful cosine distance; the LLM component favors items the judge confirmed as compatible.
Evaluate. Results are compared against an independent ground-truth corpus of 54,090 LLM-labeled pairs (43,225 labeled positive), built by a separate judging pass (gpt-5-mini) across the full dataset. Using a held-out judge for evaluation keeps the ground truth independent from the verification step.
Results
The complement-prior strategy covered 220 verified companion products against 33 for the semantic baseline - an 18x increase in coverage - at comparable precision (0.889 vs 0.864).

| Strategy | Precision | Verified pairs | Products covered |
|---|---|---|---|
| Semantic baseline | 0.864 | - | 33 |
| Complement-prior (this work) | 0.889 | - | 220 |
The semantic baseline cannot surface most valid companions because they sit in distant embedding space - even when they are the expected purchase to pair with the anchor.

Data and reproducibility
The dataset contains 3,000 curated consumer-electronics products across 20 categories, split into 360 anchors, 959 accessories, and 1,681 distractors. The 54,090 labeled pairs that form the ground truth were generated independently from the pipeline being evaluated, so precision and coverage figures are not circular.
The repository is a self-contained Docker Compose environment. A FastAPI engine service handles scoring requests; an arq worker queue runs the verification and labeling jobs; Typesense stores the embedding index; MySQL and Redis handle persistence and job state. All steps that produce the reported numbers are reproducible from the raw dataset.
Dataset license: research use only. Code license: MIT.
Tech stack
FastAPI, arq, Typesense, OpenAI embeddings (text-embedding-3-small, 1024-dim), gpt-5-nano for per-pair verification, gpt-5-mini for ground-truth labeling, MySQL, Redis, Docker Compose, React SPA (no build step).
Repository and publication
Code: github.com/AlexWaha/crosssell-compatibility-benchmark
Published paper: Nauka i Tekhnika Sohodni, vol. 2(56), 2026 - DOI 10.52058/2786-6025-2026-2(56)-1627-1642
A follow-up paper expanding the evaluation is under peer review. The citation will be added here on acceptance.