Airbnb 推出 CASTLE,利用合成数据训练自然语言搜索模型
原题Airbnb Introduces CASTLE for Training Natural Language Search Models with Synthetic Data
推荐理由Airbnb CASTLE 从真实预订会话构造对比式房源对,让 LLM 生成查询与相关性标签。搜索团队可学习如何用合成数据跨越自然语言搜索冷启动,并用人工评估检验标签质量。
读前速览
Airbnb 研究人员推出 CASTLE 框架,利用去标识化的预订会话和 LLM 生成合成搜索查询及相关性标签,让自然语言搜索模型在真实流量可用前就能开始训练。
CASTLE 从预订会话数据中生成合成查询和相关性标签,以解决自然语言搜索中的冷启动问题。
CASTLE 使用去标识化的预订会话,将已预订房源作为正例、浏览过但未预订的房源作为负例,构建对比式样本对,使 LLM 能生成与正例匹配但不匹配负例的查询,并通过样本构造而非单独评估来建立相关性标签。
该框架结合三种查询生成策略,提升生成查询与真实用户查询分布的匹配度。
框架结合基于模板的提示词、使用用户研究收集的 ~500 条种子查询的少样本提示词,以及聚焦于区分房源特征的基于属性的提示词,并通过变化机制提升查询长度和措辞的多样性。
CASTLE 的 KL 散度显著优于以往方法,展现出更强的分布匹配能力。
CASTLE 与真实用户查询分布的 KL 散度为 1.01,相较于 Promptagator 的 9.33 降低了 9.2 倍;在属性类型层面的 KL 散度为 0.08,而人工整理的问卷种子查询为 0.09。
虚拟评审 LLM 为缺少足够预订历史的房源标注相关性。
对于缺少预订历史的新房源,CASTLE 使用基于 LLM 的评估器为更多查询与房源配对分配相关性标签,确保整个房源目录都能得到覆盖。
人工评估验证了 CASTLE 相关性标注的质量。
3 位领域专家审查了抽样得到的 200 组三元组,不同评估者的认同率为 91% 至 93%,证实了合成数据的质量。
完整摘要
CASTLE 利用 LLM 和去标识化的预订会话生成合成查询与相关性标签,解决自然语言搜索中的冷启动问题。它构建对比式房源对:已预订房源作为正例,浏览过但未预订的房源作为负例,并提示 LLM 生成与正例匹配、但不匹配负例的查询。该框架结合基于模板、少样本和基于属性的提示词,并加入变化机制。对于历史数据不足的房源,虚拟评审 LLM 会为其分配相关性标签。CASTLE 与真实用户查询分布的 KL 散度为 1.01,较 Promptagator 的 9.33 好 9.2 倍;人工评估者对其相关性标注的认同率为 91-93%。
Airbnb研究人员推出了CASTLE框架,旨在解决自然语言搜索中的冷启动问题。该方法利用去标识化的预订会话和大型语言模型(LLM),联合生成合成搜索查询和相关性标签,从而在真实搜索流量尚不足时就能训练模型。Airbnb researchers have introduced CASTLE, a framework designed to address the cold-start problem in natural language search. The approach uses de-identified booking sessions and large language models (LLMs) to jointly generate synthetic search queries and relevance labels, enabling model training before sufficient real search traffic is available.
自然语言搜索允许访客用日常语言描述自己的偏好,例如“靠近滑雪场的浪漫小木屋”或“可容纳八人的宠物友好型海滨别墅”,而不必完全依赖预设筛选条件。训练这类系统面临两大挑战:生成能反映真实用户行为的查询,以及判断哪些房源与每个查询相关。Natural language search allows guests to describe their preferences in everyday language, such as "romantic cabin near skiing" or "pet-friendly beach house that sleeps eight", rather than relying exclusively on predefined filters. Training such systems presents two challenges: generating queries that reflect actual user behavior and determining which property listings are relevant to each query.
此前的方法(包括 InPars 和 Promptagator)将查询生成与相关性标注视为两个独立任务。它们利用 LLM 从文档或示例中生成查询,随后再通过额外的模型判断来分配相关性标签。研究人员指出,这种拆分可能会引入额外的误差来源,并导致合成查询与真实用户查询的分布存在差异。Previous approaches, including InPars and Promptagator, address query generation and relevance labeling as separate tasks. They use LLMs to generate queries from documents or examples, followed by additional model-based judgments to assign relevance labels. According to the researchers, this separation can introduce additional sources of error and differences between synthetic and real-user query distributions.
CASTLE 使用源自去标识化预订会话的对比式房源配对。当房客浏览多个备选房源后预订了其中一个房源时,被选中的房源便作为正例,而另一个看过但未预订的房源则作为负例。随后,系统会提示 LLM 生成一个与正例房源匹配、但与负例房源不匹配的查询。这样一来,相关性标签便可在构建过程中确立,而无需另行进行评估。CASTLE uses contrastive listing pairs derived from de-identified booking sessions. When a guest books a property after viewing several alternatives, the selected listing becomes a positive example, while another viewed but unbooked property serves as a negative example. An LLM is then prompted to generate a query that matches the positive listing but not the negative one. This allows relevance labels to be established through the construction process rather than through a separate evaluation step.
该框架结合了三种查询生成策略:基于模板的提示、使用通过定向用户研究收集的约 500 条种子查询的少样本提示,以及侧重于区分房源特征的属性锚定提示。该机制还会鼓励查询在长度和措辞上有所变化。The framework combines three query-generation strategies: template-based prompts, few-shot prompts using approximately 500 seed queries collected through targeted user research, and attribute-grounded prompts focusing on distinguishing listing characteristics. A variety mechanism also encourages variation in query length and phrasing.
对于预订历史数据不足的查询-房源对(包括新上架的房源),CASTLE 会使用 Virtual Judge(一种基于 LLM 的评估器)为其他查询-房源对分配相关性标签。研究人员还开发了 CASTLE-R,这是一个面向生产环境的变体,适用于真实搜索流量开始积累的场景。For listing pairs without sufficient booking history, including newly listed properties, CASTLE uses a Virtual Judge, an LLM-based evaluator that assigns relevance labels to additional query-listing pairs. The researchers also developed CASTLE-R, a variant intended for production environments where real search traffic has started to accumulate.
In the evaluation, CASTLE achieved a Kullback–Leibler (KL) divergence of 1.01 against real-user query distributions, compared with 9.33 for the best baseline, Promptagator. This represents a 9.2-fold reduction in divergence. At the attribute-type level, CASTLE achieved a KL divergence of 0.08, compared with 0.09 for manually curated survey seed queries.
Source: Medium Blog
研究人员还进行了一项人工评估,由三位独立的领域专家审查了抽样得到的 200 组三元组。三位评估者对 CASTLE 相关性判定的认同率介于 91% 至 93% 之间。The researchers also conducted a human evaluation in which three independent subject matter experts reviewed 200 sampled triplets. Agreement with CASTLE's relevance assignments ranged from 91% to 93% across the three evaluators.
评估方法也在 LinkedIn 上引发了讨论。专攻 LLM 微调与评估的 AI 工程师 Mark Tsai 提出了一个问题:训练数据与评估数据之间是否可能存在重叠?The evaluation methodology also prompted discussion on LinkedIn. Mark Tsai, an AI Engineer specializing in LLM fine-tuning and evaluation, raised a question about potential overlap between training and evaluation data:
训练集和评估集的划分是否确保种子模板和房源 ID 互不重叠?对于合成三元组,我会比较随机划分与这种更严格的划分,然后在未参与训练的真实查询上进行评估。这样有助于区分模型学到的是可复用的意图—属性匹配,还是只认出了熟悉的模板或房源属性。Do the training and evaluation splits keep seed templates and listing IDs disjoint? For synthetic triplets, I’d compare a random split with that stricter split, then evaluate on untouched real queries. It would help separate learning reusable intent–attribute matches from recognizing familiar templates or properties.
文章作者 Wendy Ran Wei 回应称,团队使用未经过处理的真实查询对模型进行了评估,并在构建评估集时采取了防止数据泄漏的措施。她还澄清,论文并未报告随机划分与更严格划分之间的受控对比;后者采用互不重叠的种子模板和房源 ID。她指出,这可以作为后续研究的一个方向。Wendy Ran Wei, the article's author, responded that the team evaluated the model on untouched real queries and implemented leakage guardrails when constructing evaluation sets. She also clarified that the paper does not report a controlled comparison between random splits and stricter splits with disjoint seed templates and listing IDs, identifying this as a possible direction for further investigation.
完整论文可在 arXiv 上获取。The full paper is available on arXiv.