When a customer adds a professional camera to their cart, should the system suggest a matching lens, a generic tripod, or another camera body? Complementary Product Recommendation is vital for comprehensive basket building, yet standard models often fail to distinguish between items that are merely bought together and those that truly work together. In this paper, we present AlleCompanion: a production-scale retrieval framework deployed at Allegro.com that transforms noisy behavioural signals into precise semantic compatibility. We mitigate the intrinsic noise in large-scale co-purchase traffic by combining data-level filtering heuristics with a category-constrained Two Tower architecture. Within this framework, the Category Adapter guides the model in the embedding space, constraining candidates within logically complementary boundaries. Since modelling authentic user behaviour at scale is inherently difficult, we introduce ComCat, a multi-source Complementary Categories Mapping. ComCat acts as a translational layer that distils meaningful patterns from noisy traffic into a maintainable and controllable solution, integrating expert rules, human-in-the-loop feedback, LLM-based reasoning, and statistical mining. Our experimental results demonstrate that combining explicit category-level constraints with neural architectures effectively filters out co-purchase noise to surface recommendations that satisfy real-world user needs. Serving over 20 million active users monthly, the framework delivers significant uplifts in attributed GMV for organic discovery and drives substantial revenue growth in sponsored placements.
Figures & tables
Figure 1. AlleCompanion architecture. Two Tower model extended with Category Adapter and Category Reconstruction Loss.
Figure 2. Recommendations generated by Vanilla-TT, Seller-TT + HF and AlleCompanion models.
Evaluation: Test
Evaluation: ComCat
Model
Recall@20 ↑
MRR@20 ↑
Target Cat. Cons. ↑
Seller Cons. ↑
Attr. Cons. ↑
Recall@20 ↑
MRR@20 ↑
Vanilla-TT
0.0447
0.0103
0.0654
0.2237
0.4225
-
-
Seller-TT
0.1219
0.0286
0.0967
0.9309
0.3309
-
-
Seller-TT + HF
0.3782
0.1789
1.0000
0.8334
0.2320
0.0451
0.0177
AlleCompanion w/o Attr
0.4537
0.1947
0.8283
0.6605
0.2155
0.0913
0.0244
AlleCompanion
0.4567
0.2000
0.8267
0.6619
0.2181
0.0952
0.0258
Table 1. Offline results of complementary recommendations with AlleCompanion benchmarked against other content-based models. Best results are bolded. alttext alttext
Dataset
Trainset
Unique items
Unique categories
Transactions
3,611,848
779,199
7,555
Filtered Transactions
829,841
326,238
3,004
Expert Rules
3,015,027
1,446,727
5,268
Expert Rules + Same-Seller
2,553,622
1,029,244
5,131
Table 2. Statistics for training configurations corresponding to 90 days of purchase activity.
Evaluation: Test
Evaluation: ComCat
Pretrain
Finetune
Recall@20 ↑
MRR@20 ↑
Attr. Cons. ↑
Recall@20 ↑
MRR@20 ↑
Attr. Cons. ↑
–
Transactions
0.4567
0.2000
0.2181
0.0957
0.0260
0.2411
–
Filtered Transactions
0.3222
0.1221
0.2433
0.0801
0.0213
0.2541
–
Expert Rules
0.0818
0.0243
0.1815
0.0127
0.0035
0.2070
–
Expert Rules + Same-Seller
0.2717
0.0960
0.2017
0.0471
0.0124
0.2288
Expert Rules
Transactions
0.4458
0.1932
0.2183
0.0934
0.0253
0.2404
Table 3. Performance of the AlleCompanion model across various training configurations. Best and second-best results are bolded and italicized, respectively. A comparative breakdown of performance metrics across Test and ComCat evaluation sets for different training strategies.
Sources of category mapping
Taxonomy coverage ↑
Target counts ↑
Traffic metrics ↑
No.
Heuristics
Annotations
Rules
Same-Category
Query
Targets
p50
p95
CTR
CVR
(1)
✓
41.77%
27.55%
3
3
-
-
(2)
✓
✓
41.89%
28.69%
3
5
+25%
+36%
(3)
✓
✓
✓
42.32%
32.46%
3
9
+125%
+136%
(4)
✓
✓
✓
✓
42.32%
43.06%
4
10
+450%
+398%
Table 4. Ablation Study of Category Mapping Sources based on offline traffic data from organic carousel on product page. Best results are bolded. alttext alttext
Platform
No.
Placement
Type
Metric
Web ↑
App ↑
(1)
Product Page
Sponsored
v-CVR
+0.53% ∗
+0.13%
GMV
+0.19%
-0.01%
(2)
Product Page
Organic
v-CVR
+0.57%
-0.07%
GMV
+8.05% ∗
+9.35% ∗
(3)
Pre-Cart
Organic
v-CVR
-0.28% ∗
-0.04%
Table 5. Summary of Online A/B Test Results. Metrics represent relative change against the production baseline. ( ∗ denotes statistical significance at p<0.005 ).
Sequential Recommendation (SR) aims to predict the next interaction of a user based on their behavior sequence, where complementary relations often provide essential signals for predicting the next item. However, mainstream models relying on sparse co-purchase statistics often mistake spurious correlations (e.g., due to popularity bias) for true complementary relations. Identifying true complementary relations requires capturing the fine-grained item semantics (e.g., specifications) that simple cooccurrence statistics would be unable to model. While recent semantics-based methods utilize discrete semantic codes to represent items, they typically aggregate semantic codes into coarse item representations. This aggregation process blurs specific semantic details required to identify complementarity. To address these critical limitations and effectively leverage semantics for capturing reliable complementary relations, we propose a Complementary-Aware Semantic Transition (CAST) framework that introduces a new modeling paradigm built upon semantic-level transitions. Specifically, a semantic-level transition module is designed to model dynamic transitions directly in the discrete semantic code space, effectively capturing fine-grained semantic dependencies often lost in aggregated item representations. Then, a complementary prior injection module is designed to incorporate LLM-verified complementary priors into the attention mechanism, thereby prioritizing complementary patterns over co-occurrence statistics. Experiments on multiple e-commerce datasets demonstrate that CAST consistently outperforms the state-of-the-art approaches, achieving up to 17.6% Recall and 16.0% NDCG gains with 65x training acceleration. This validates its effectiveness and efficiency in uncovering latent item complementarity beyond statistics. The code will be released upon acceptance.
Qian Zhang, Lech Szymanski, Haibo Zhang +1
School of Computing, University of Otago · Dunedin, New Zealand · University of New South Wales +1
Search and recommendation serve a shared discovery objective but encode intent differently. We study this boundary through Dear Algo on Threads, a deployed product where open-ended requests such as more NBA news or less politics steer subsequent feed recommendations rather than return a one-shot result list. Its agentic intent layer compiles explicit, inferred, negative, and compound intent into a grounded executable plan, then invokes conventional retrieval and optional semantic or multimodal reranking. The layer shares an intent-to-retrieval contract without requiring one model or serving path across search-like and recommendation-like modes. We evaluate Dear Algo under a precision-first objective. In a blinded audit of 300 public request-item pairs (296 evaluable), a strict categorical LLM-as-a-judge gate achieved 94.4% exact-Relevant precision [88.8%, 98.9%]. Across 72 normalized request clusters, the full configuration produced 7.73 judge-qualified candidates per 20 slots versus 6.61 for an LLM-derived-query baseline, a gain of 1.11 [0.12, 2.12]. In a candidate-randomized serving-path study restricted to the reranker path's first 72 eligible hours, the user-weighted judge-Irrelevant share among judged admissions was 2.80% versus 4.78% off (-1.97 points [-3.02, -0.94]), while Exact-Relevant share was 2.24 points higher [0.08, 4.41]. Together, these studies show how explicit natural-language intent can be carried into feed recommendation under a precision-first evaluation framework
Repurchase behavior is a primary signal in large-scale retail recommendation, particularly in categories with frequent replenishment: many items in a user's next basket were previously purchased, and their timing follows stable, item-specific cadences. Yet most next basket repurchase recommendation models represent history as a sequence of discrete basket events indexed by visit order, which cannot explicitly model elapsed calendar time or update item rankings as days pass between purchases. We present CASE (Cadence-Aware Set Encoding) for next basket repurchase recommendation, which decouples item-level cadence learning from cross-item interaction, enabling explicit calendar-time modeling while remaining production-scalable. CASE represents each item's purchase history as a calendar-time signal over a fixed horizon, applies shared multi-scale temporal convolutions to capture recurring rhythms, and uses induced set attention to model cross-item dependencies with sub-quadratic complexity, allowing efficient batch inference at scale. Across three public benchmarks and a proprietary dataset, CASE consistently improves precision, recall, and NDCG at multiple cutoffs compared to strong next basket recommendation baselines. In a production-scale evaluation with tens of millions of users and a large item catalog, CASE achieves up to 8.6% relative precision lift and 9.9% relative recall lift at top-5, showing that scalable cadence-aware modeling yields measurable gains in both benchmark and industrial settings.