RPTune:面向LLM目录搜索的学习式上下文整理
研究论文 · 2026/10/02
对于目录能放入长上下文LLM的小型商家,全目录提示是多阶段检索的替代方案,但LLM不能均匀利用长上下文。本文研究上下文目录搜索的两个问题:如何整理和呈现目录,以及如何调整LLM在整理后上下文上进行产品选择。提出RPTune,一个端到端框架,将学习到的目录整理与使用自动生成的、基于目录的监督进行LLM后训练相结合。编码器-重组器整理器根据下游LLM反馈对产品排序和修剪,而整理后的目录反过来通过上下文相对奖励提高LLM后训练的有效性。在7个真实商家(不同零售垂直领域)上评估,每个商家100个复杂对话查询。RPTune在专有和开放权重LLM上均持续提高搜索准确性,上下文整理带来高达31.4个百分点的提升,后训练平均再增加10.3个百分点。
该工作针对小型商家全目录提示中LLM无法有效利用长上下文的问题,提出结合目录整理与后训练的端到端框架,在多个真实商家上验证了显著且一致的搜索准确性提升,对实际部署有直接参考价值。
For small merchant businesses (SMBs) whose catalogs fit within a long-context LLM, full-catalog prompting offers a compelling alternative to multi-stage retrieval designed primarily for large marketplaces with millions of items. However, fitting the full catalog into the context window does not ensure that the model can use it effectively, since LLMs do not exploit long contexts uniformly. We therefore study in-context catalog search through two complementary questions: (1) how to curate and present catalogs to the LLM, and (2) how to adapt the LLM for product selection on curated contexts. We propose RPTune, an end-to-end framework that couples learned catalog curation with LLM post-training using automatically generated, catalog-grounded supervision. An encoder-reorganizer curator orders and prunes products guided by downstream LLM feedback, while the resulting curated catalogs in turn improve the effectiveness of LLM post-training with a context-relative reward. We evaluate RPTune on 7 real merchants spanning distinct retail verticals, using 100 complex conversational queries per merchant. RPTune consistently improves search accuracy across both proprietary and open-weight LLMs, with context curation yielding gains of up to 31.4 percentage points and post-training adding a further 10.3 points on average.