In local-life service platforms, query suggestion reduces user effort by generating candidate queries from input prefixes. Traditional multi-stage systems rely heavily on historical popular queries, limiting their ability to capture long-tail and emerging demand. Although LLMs provide strong semantic generalization, their deployment in local-life services faces three challenges: insufficient city-preference awareness, exposure bias in preference optimization, and strict online latency constraints. We propose LocalSUG, an LLM-based query suggestion framework for local-life services. LocalSUG mines city-preference-enhanced candidates from term co-occurrence and injects them into prompts as dynamic references rather than fusing them into model parameters. This allows the model to adapt to changing city preferences, such as merchant openings or closures, while reducing stale or locally invalid suggestions. We further introduce a beam-search-driven GRPO algorithm to align training with inference-time decoding and optimize relevance together with business-oriented rewards. Finally, quality-aware beam acceleration and vocabulary pruning reduce online latency while preserving generation quality. Offline evaluations and large-scale online A/B testing show that LocalSUG improves CTR by +0.35% and reduces the no-result rate by 3.98%, demonstrating its effectiveness in real-world deployment.
Figures & tables
Figure 1: Examples of query suggestion in local-life service platforms.
Figure 2: Overview of our proposed generative Query Suggestion framework. (a) Candidate Mining and Multi-Source Input : Prefix-to-query candidates are retrieved via city-preference-enhanced and global co-occurrence rules, then concatenated with hot words, user history, and profiles. (b) Beam-Search-Driven GRPO Training : The model is optimized using group relative rewards to bridge the gap between training and inference, incorporating hit, rank, and format objectives. (c) Beam Search Inference Acceleration : Online performance is enhanced through Quality-Aware Accelerated Beam Search and LLM head pruning.
Method
Click
Order
HR@12↑
MRR↑
DIV↑
QUA↑
HR@12↑
MRR↑
DIV↑
QUA↑
MCA
74.24%
40.62%
62.85%
99.94%
76.64%
42.78%
63.80%
99.93%
City-MCA
74.43%
45.93%
61.00%
99.95%
75.77%
47.87%
61.92%
99.96%
LMP
79.67%
40.81%
53.57%
99.75%
79.66%
39.99%
67.81%
99.84%
SPQR
95.95%
70.53%
45.49%
99.83%
96.28%
70.84%
63.75%
99.85%
SFT
96.07%
79.36%
63.67%
90.43%
96.63%
79.39%
61.91%
90.80%
Table 1: Offline performance comparison between LocalSUG and various baselines. The best results are highlighted in bold , and the second-best results are underlined . For more comparisons across different LocalSUG variants, please refer to Appendix F .
Method
Click
Order
HR@12↑
MRR↑
DIV↑
QUA↑
HR@12↑
MRR↑
DIV↑
QUA↑
LocalSUG
96.36%
81.13%
71.49%
98.55%
97.09%
81.80%
69.31%
98.78%
- w/o rgap
95.20%
80.97%
73.31%
97.37%
96.02%
81.66%
72.58%
97.71%
- w/o rhit
95.88%
81.09%
72.45%
97.78%
96.74%
81.74%
71.44%
98.45%
- w/o rrank
96.58%
80.00%
70.73%
98.99%
97.07%
80.59%
68.19%
96.83%
- w/o rfmt
96.03%
79.32%
63.62%
90.36%
96.74%
77.59%
62.91%
89.85%
Table 2: Ablation Study of LocalSUG in Offline Evaluations. The best results are in bold.
Category
Metric
Relative Change
User Experience
No-Result Rate↓
−3.98%∗∗∗
Diversity
Unique Item Exposure↑
+7.14%∗∗∗
Category Diversity↑
+1.28%∗∗∗
Efficiency
Session CTR↑
+0.27%∗∗∗
PV CTR↑
+0.35%∗∗∗
User Effort
Average SUG Input Length↓
−0.27%∗∗
Table 3: Online A/B Testing Results of LocalSUG. Significance levels: * p < 0.05, ** p < 0.01, *** p < 0.001.
Business Category
PV CTR
Session CTR
Excl.-Orig.
Avg. L2 Cat.
UV CTR
Session CTR
Life Event
+3.15%
+2.74%
+3.97%
+3.50%
+1.75%
Beauty & Medical
+0.32%
+0.62%
+0.93%
+3.74%
+0.68%
Transportation
+19.09%
+15.17%
+18.93%
+8.93%
+13.86%
Parenting & Education
+3.81%
+2.94%
+3.28%
+1.86%
+1.94%
Entertainment
+0.79%
+0.65%
+0.76%
+3.36%
+0.38%
Table 4: Online A/B experiment results across business categories.
City Tier
PV CTR
Session CTR
Excl.-Orig.
Avg. L2 Cat.
Session CTR
S-tier
+0.01%
+0.05%
+0.14%
+1.35%
A-tier
0.00%
+0.15%
+0.13%
+1.27%
B-tier
+0.35%
0.00%
-0.02%
+1.29%
C-tier
+0.63%
+0.48%
+0.72%
+1.60%
Table 5: Online A/B experiment results across city tiers.
Figure 3: Impact of (a) QA-BS and (b) vocabulary pruning on inference latency and model performance.
Bad
Fair
Good
Control Group
2.38%
0.91%
96.71%
LocalSUG
1.55%
0.50%
97.95%
Table 6: Human Ratings of Generated Queries.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Param
Value
Param
Value
m
10
n
10
K
12
G
16
ϵ
0.1
δ
1e-4
λgap
1.0
λhit
1.0
λrank
2.0
λfmt
4.0
λmiss
1.0
λorder
1.5
Appendix
Table 7: Hyperparameter settings utilized in the proposed framework.
Method
Click
Order
HR@12↑
MRR↑
DIV↑
QUA↑
HR@12↑
MRR↑
DIV↑
QUA↑
LocalSUGT=0.8
96.45%
80.30%
67.34%
95.14%
97.07%
80.24%
64.93%
94.85%
LocalSUGT=1.0
96.52%
80.47%
68.69%
96.96%
97.09%
80.58%
66.71%
97.25%
LocalSUGT=1.2
96.50%
79.47%
68.26%
96.68%
97.09%
79.77%
66.16%
96.73%
LocalSUGDPO
95.69%
80.97%
72.83%
97.47%
96.38%
81.45%
70.47%
97.74%
LocalSUGLlama
95.68%
80.73%
69.90%
95.78%
96.65%
81.65%
68.07%
96.43%
Appendix
Table 8: Offline performance comparison between LocalSUG and various variants. The best results are highlighted in bold , and the second-best results are underlined .
Figure 4: Sensitivity analysis of retrieval candidates and beam search width on efficiency and effectiveness.
Model
HR@12
MRR
LocalSUG
96.12% ± 0.03%
81.40% ± 0.02%
w/o rgap
95.54% ± 0.04%
81.21% ± 0.11%
w/o rhit
95.79% ± 0.11%
81.30% ± 0.03%
w/o rrank
96.53% ± 0.00%
80.13% ± 0.11%
w/o rfmt
95.83% ± 0.03%
76.20% ± 0.83%
w/o rmiss
95.90% ± 0.02%
81.36% ± 0.01%
Appendix
Table 9: Ablation results (mean ± std) over 3 random seeds on the Mix dataset.
Figure 5: Performance stability across different GRPO group sizes ( G ).