[论文解读] Large Language Model based Long-tail Query Rewriting in Taobao Search
本文提出 \method,一种三阶段框架,利用大语言模型(LLMs)在淘宝搜索中进行长尾查询重写,结合多指令监督微调、通过淘宝检索系统的离线反馈,以及基于对比学习的目标对齐。该方法显著提升了检索质量,并提升了GMV、#Trans和UV——尤其在长尾和'nothing'查询中表现突出,在线上A/B测试中,零结果查询的交易量提升了18.66%。
In the realm of e-commerce search, the significance of semantic matching cannot be overstated, as it directly impacts both user experience and company revenue. Along this line, query rewriting, serving as an important technique to bridge the semantic gaps inherent in the semantic matching process, has attached wide attention from the industry and academia. However, existing query rewriting methods often struggle to effectively optimize long-tail queries and alleviate the phenomenon of "few-recall" caused by semantic gap. In this paper, we present BEQUE, a comprehensive framework that Bridges the sEmantic gap for long-tail QUEries. In detail, BEQUE comprises three stages: multi-instruction supervised fine tuning (SFT), offline feedback, and objective alignment. We first construct a rewriting dataset based on rejection sampling and auxiliary tasks mixing to fine-tune our large language model (LLM) in a supervised fashion. Subsequently, with the well-trained LLM, we employ beam search to generate multiple candidate rewrites, and feed them into Taobao offline system to obtain the partial order. Leveraging the partial order of rewrites, we introduce a contrastive learning method to highlight the distinctions between rewrites, and align the model with the Taobao online objectives. Offline experiments prove the effectiveness of our method in bridging semantic gap. Online A/B tests reveal that our method can significantly boost gross merchandise volume (GMV), number of transaction (#Trans) and unique visitor (UV) for long-tail queries. BEQUE has been deployed on Taobao, one of most popular online shopping platforms in China, since October 2023.
研究动机与目标
- 为解决电子商务搜索中的语义鸿沟问题,特别是那些常返回无结果('nothing'查询)的长尾查询。
- 通过将大语言模型生成的重写结果与实际在线业务目标(如GMV、交易量和点击率)对齐,提升查询重写质量。
- 克服先前方法的局限性,这些方法依赖小型模型或通用大语言模型提示,缺乏任务特定微调或反馈整合。
- 开发一个可扩展、可投入生产的框架,在保持相关性和可控性的前提下,提升真实搜索系统中的检索性能。
提出的方法
- 利用拒绝采样和辅助任务(质量分类、商品标题预测、思维链)构建高质量的重写数据集,以支持大语言模型的多指令监督微调(SFT)。
- 使用微调后的大语言模型进行束搜索(beam search),为每个查询生成多个候选重写结果,供下游评估使用。
- 利用淘宝的离线系统模拟线上检索,基于相关性、增量和点击率指标收集部分排序反馈。
- 应用基于对比学习的目标对齐模块(PRO),突出不同重写结果之间的差异,并使模型输出与淘宝的线上优化目标对齐。
- 将离线反馈与目标对齐整合到统一的训练循环中,以提升模型泛化能力和检索性能。
- 自2023年10月起在淘宝搜索中上线部署最终模型,并通过线上A/B测试验证其在真实场景中的影响。

实验结果
研究问题
- RQ1大语言模型能否被有效微调,以生成高质量的长尾查询重写结果,从而弥合电子商务搜索中的语义鸿沟?
- RQ2如何利用真实电子商务检索系统的离线反馈,提升大语言模型生成重写结果与线上业务目标的对齐程度?
- RQ3在真实场景中,不同优化目标(相关性、增量、点击率)对查询重写模型性能有何影响?
- RQ4多指令微调和辅助任务学习在多大程度上能增强模型理解并重写罕见、长尾查询的能力?
主要发现
- 线上A/B测试显示,\method 在所有查询中使GMV提升0.40%,#Trans提升0.34%,UV提升0.33%,表明系统范围内的广泛改进。
- 对于重写查询(占总PV的27%),模型实现了GMV提升2.96%,#Trans提升1.36%,UV提升1.22%,表明在目标用户群体中表现强劲。
- 该方法使'nothing'查询的#Trans提升18.66%,UV提升6.25%,证明其在解决最具挑战性的语义鸿沟案例方面的有效性。
- 当以增量为目标进行优化时,模型显著提升了增量和点击率,即使相关性略有下降,也显示出高效的权衡能力。
- 基于对比学习的目标对齐阶段有效捕捉了重写结果之间的部分排序关系,使模型在优化业务KPI方面优于基线方法。
- 该框架在所有关键指标上均优于先前的最先进模型CLE-QR,尤其在长尾和零结果查询场景中提升最为显著。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。