On-demand delivery platforms such as DoorDash and Uber Eats impose a constraint absent in traditional e-commerce: merchants beyond the user's delivery range are invalid candidates rather than merely low-ranked. Generative retrieval has recently shown strong potential in large-scale retrieval systems. Adapting it to this setting, however, poses three challenges. First, existing semantic IDs encode geography only as a soft signal, so reachability can only rely on a non-differentiable post-generation hard truncation. Second, user preferences vary substantially across both regions and queries, so aggregating historical behaviors without conditioning on geography and the current query yields biased interest estimates. Third, the retrieved candidate set is evaluated by its collective value, yet autoregressive training scores each sequence independently, with no set-level signal to discourage redundant near-duplicates. To address the challenges, we propose TS-GEAR, a unified generative retrieval framework for on-demand delivery: (1) Geo-Semantic ID splits merchant identifiers into geographic prefixes and semantic suffixes, making reachability a prediction target rather than a post-hoc filter; (2) Query-Geo Target Attention aggregates historical behaviors using the real-time query and location as dual targets, while encoding each behavior's own location into its attention key; (3) GMPO (Group Marginal Policy Optimization) rewrites advantages using a deduplicated group reward and marginal advantage within GRPO, avoiding auxiliary diversity objectives. Deployed online with a lightweight 0.1B backbone, TS-GEAR serves over 150 million queries per day in the search advertising pipeline of Taobao Shangou, consistently outperforming state-of-the-art generative retrieval methods on both HitRate and geographic validity, and achieving 3.8% gains in ad impressions and 4.2% in ad revenue.
Figures & tables
Figure 1. A motivating request in on-demand delivery search. The same query “beef” maps to hot ready-to-eat dishes near the office on weekdays, but to fresh ingredients at home on weekends, illustrating the three challenges.
Figure 2. Overall architecture of TS-GEAR. (a) Geo-Semantic ID tokenization, which builds hierarchical merchant identifiers. (b) The geo-aware search-interest encoder–decoder: a Query-Geo Target Attention encoder paired with a geo-constrained decoder that applies the User-Geo Gate. (c) GMPO alignment of the decoder policy.
Dataset
#Users
#Items
#Interactions
TS-Delivery
0.1B
4.8M
0.5B
Foursquare
NYC
1083
5135
147938
TKY
2293
7873
447570
Table 1. Dataset statistics.
δ =5 km
δ =10 km
δ =20 km
Model
HR@50
HR@150
HR@300
HR@50
HR@150
HR@300
HR@50
HR@150
HR@300
TIGER
0.7659
0.8512
0.8814
0.6959
0.8293
0.8858
0.5796
0.7464
0.8257
GNPR
0.7678
0.8526
0.8849
0.6986
0.8319
0.8893
0.5834
0.7501
0.8283
OneLoc
0.7778
0.8582
0.8844
0.7092
0.8410
0.8945
0.5929
0.7596
0.8370
TS-GEAR
0.7869
0.8593
0.8876
0.8090
0.8925
0.9313
0.8080
0.8920
0.9336
Table 2. Main results on the industrial dataset TS-Delivery. HR denotes HitRate@ N @ δ . Best in bold.
NYC
TKY
Model
HR@5
HR@10
HR@20
HR@5
HR@10
HR@20
TIGER
0.5146
0.6288
0.7189
0.4658
0.5623
0.6313
GNPR
0.5279
0.6431
0.7345
0.4978
0.5991
0.6716
OneLoc
0.6238
0.7246
0.7868
0.5186
0.6116
0.6812
TS-GEAR
0.6464
0.7472
0.8246
0.5388
0.6414
0.7218
Table 3. Results on the public Foursquare dataset. Best in bold.
δ =5 km
δ =10 km
δ =20 km
Model
HR@50
HR@150
HR@300
HR@50
HR@150
HR@300
HR@50
HR@150
HR@300
w/o geo prefix & u-geo gate
0.7819
0.8614
0.8860
0.7124
0.8451
0.8989
0.5960
0.7632
0.8403
w/o geo prefix
0.7794
0.8580
0.8835
0.7111
0.8416
0.8945
0.5947
0.7606
0.8371
w/o u-geo gate
0.7773
0.8497
0.8775
0.7961
0.8807
0.9203
0.7934
0.8798
0.9224
w/o query-geo attention
0.7661
0.8462
0.8789
0.7836
0.8750
0.9211
0.7820
0.8735
0.9230
w/o query fusion
0.7865
0.8588
0.8871
0.8092
0.8922
0.9308
0.8080
0.8919
0.9331
Table 4. Ablation study on TS-Delivery. HR denotes HitRate@ N @ δ . The full model is in bold.
Figure 3. Geographic validity (ValidRate@ N @ δ ) across candidate depths. TS-GEAR keeps validity roughly in the 75%–96% range across depths and radii, whereas baselines remain around 35% or lower.
Figure 4. RL alignment analysis. (a) Cumulative coverage under the beam@100 protocol: standard GRPO declines on clk/ctr coverage, while GMPO improves all three signals (relative gains over pretrain-base in parentheses). (b) Relative improvement over pretrain-base under the sampling protocol: GRPO and GMPO are close and both clearly outperform pretrain-base, masking the policy collapse that the beam protocol exposes.
Figure 5. Scaling-law study across 0.05B / 0.1B / 0.5B backbones. HitRate scales roughly linearly with capacity, while geographic validity stays comparatively flat.
Online Metric
Improvement
Ad Impressions
+3.8%
Ad Efficiency
+0.4%
Ad Revenue
+4.2%
Table 5. Online A/B test results of TS-GEAR on the Taobao Shangou search advertising platform (7-day online experiment serving 20% of traffic; all metrics statistically significant with p<0.01 under two-tailed t-tests).
On a delivery platform, personalized store ranking greatly influences what users find and order. Unlike digital-only domains, candidate stores are local and bound by real-time availability and delivery operations. One central modeling tension is between surfacing new stores for trial and preserving ranking quality for sessions with reorder intent. We present Universal Venue Ranker (UVR), a production system deployed at Wolt that pairs a bidirectional transformer encoder for sequential user modeling with a GBDT ranker integrating contextual, user, and store features. Trained across all stores and domains of a country while enforcing local delivery constraints at inference, UVR replaces four previously separate ranking models (three for restaurants, one for retail) with a single unified system. Label smoothing and trial-biased sample weighting steer the model toward new stores, lifting offline trial MRR by +12% to +30% over production while regressing reorder MRR in five of six countries. These regressions leave Global CVR, our core online metric, which blends trial and reorder sessions, statistically unchanged. We validate UVR in three consecutive A/B tests, the first two across Wolt's largest operating markets and the third spanning all operating countries and both domains. UVR V1 delivers +5.5% Merchant Trial Rate and +0.16% Global CVR over the previous production ranker; V2 adds a further +0.45% Merchant Trial Rate on top; and V3, our cross-domain unification of the restaurant and retail rankers, adds a further +1.31% Retail Merchant Trial Rate, together accounting for substantial incremental gross order value and a materially simplified serving stack.
Generative retrieval offers a promising alternative by unifying the fragmented multi-stage retrieval process into a single end-to-end model. However, its practical adoption in industrial e-commerce search remains challenging, given the massive and dynamic product catalogs, strict latency requirements, and the need to align retrieval with downstream ranking goals. In this work, we propose a retrieval framework tailored for real-world recall scenarios, positioning generative retrieval as a recall-stage supplement rather than an end-to-end replacement. Our method, CQ-SID (Category-and-Query constrained Semantic ID), employs category-aware and query-item contrastive learning along with Residual Quantized VAEs to encode items into hierarchical semantic cluster identifiers, significantly reducing beam search complexity. Additionally, we develop EG-GRPO (Expert-Guided Group Relative Policy Optimization), a reinforcement learning approach that aligns generative recall with downstream ranking under sparse rewards by injecting ground-truth samples to stabilize training. Offline experiments on TmallAPP search logs show that CQ-SID achieves up to 26.76% and 11.11% relative gains in semantic and personalized click hitrate over RQ-VAE baselines, while halving beam search size. EG-GRPO further improves multi-objective performance. Online A/B tests confirm gains in GMV (+1.15%) and UCTCVR (+0.40%). The generative recall channel now contributes substantially in production, accounting for over 50.25% of exposures, 58.96% of clicks, and 72.63% of purchases, demonstrating a viable path for deploying generative retrieval in real-world e-commerce systems.
Advances in large language models and semantic IDs (SIDs) have brought generative retrieval (GR) into industrial applications. These systems must return items that satisfy request metadata constraints as well as relevance requirements. A catalog trie ensures SID validity, but filtering metadata only after generation wastes computation on rejected candidates and may leave too few eligible results. We propose RoutingTrie to incorporate metadata constraints before beam selection. RoutingTrie maintains one shared SID trie and builds a compact index for each metadata field using Dense Bitset or Sparse List. We derive a storage cost formula to guide the choice between these index representations for different field distributions. During decoding, field probes determine whether requested values occur below candidate edges and produce a combined mask that guides beam selection. Experiments on ShopTrie, our configurable synthetic benchmark, demonstrate compact storage and efficient CPU and GPU probing across diverse metadata distributions. In a production replay, RoutingTrie raises Hit@100 from 67.5% to 96.1%, a gain of 28.6 percentage points, with only 1.1 ms latency increase. We will release the ShopTrie generator, benchmark scripts, and RoutingTrie CPU and Triton GPU implementations to support reproducibility.