Tool retrieval over large API catalogs is a core bottleneck for LLM agents: user queries arrive in colloquial, often underspecified language, while the catalog uses technical API vocabulary that no fixed encoder can bridge on its own. The two dominant training approaches, contrastive encoder fine-tuning and HyDE-style query expansion with a frozen LLM, address this problem from opposite ends and fail in complementary directions: the fine-tuned encoder excels when the query's surface form already matches the catalog but collapses when it does not, while zero-shot HyDE is more robust to underspecified queries yet generates catalog-unaware hypothetical descriptions that degrade retrieval when queries are well-formed. We introduce CoHyDE, an iterative procedure that trains the dense encoder and the LLM rewriter as a single co-evolving system: the encoder is retrained with InfoNCE on catalog-style hypothetical descriptions produced by the rewriter, and the rewriter is preference-aligned via DPO against the encoder's retrieval scores, with both sides warm-started on the tool catalog before the loop begins. On a ~10k tool subset of the ToolBench catalog, three rounds of CoHyDE improve over the strongest single-component baseline by +2.5 pp NDCG@5 on standard queries and +6.3 pp on held-out vague queries, with gains as large as +8 pp on the hardest vague tier. Ablations confirm that co-training is the key ingredient: using either component in isolation fails to match CoHyDE on both well-formed and vague queries, with losses of up to -8 pp on vague queries.


翻译:针对大规模API目录的工具检索是LLM智能体的核心瓶颈:用户查询常以口语化且语义不明确的自然语言形式呈现,而目录采用技术性API词汇表,单一固定编码器无法弥合两者间的语义鸿沟。现有两种主流训练方法——对比编码器微调与基于冻结LLM的HyDE式查询扩展——从对立方向解决该问题却存在互补性缺陷:微调编码器在查询表层形式与目录匹配时表现优异,但在不匹配时性能骤降;零样本HyDE虽对模糊查询更具鲁棒性,却会生成脱离目录的假设性描述,导致精良查询的检索效果下降。本文提出CoHyDE——一种将稠密编码器与LLM改写器作为协同演化系统进行迭代训练的流程:编码器通过InfoNCE损失在改写器生成的目录风格假设描述上重新训练,改写器则基于编码器检索得分通过DPO进行偏好对齐,且在迭代循环启动前两端均使用工具目录进行热启动。在ToolBench目录约10k工具子集上,三轮CoHyDE训练后,标准查询的NDCG@5指标较最佳单组件基线提升2.5个百分点,保留模糊查询提升6.3个百分点,其中最困难模糊查询组提升幅度达8个百分点。消融实验证实协同训练为核心要素:单独使用任一组件均无法在精良查询与模糊查询上同时达到CoHyDE性能,其中模糊查询损失最高达8个百分点。

0
下载
关闭预览

相关内容

【白皮书】从头训练大型语言模型LLM最佳实践
专知会员服务
150+阅读 · 2023年8月24日
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
NLP-Progress记录NLP最新数据集、论文和代码: 助你紧跟NLP前沿
中国人工智能学会
12+阅读 · 2018年11月15日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
深度学习基础之LSTM
全球人工智能
29+阅读 · 2017年12月18日
手把手教你入门使用tf-slim库 | 回顾
AI研习社
12+阅读 · 2017年12月9日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《通过小型无人机系统将情报能力“作战化”》
专知会员服务
3+阅读 · 今天7:28
消耗优势:美军的“精确规模化”概念
专知会员服务
7+阅读 · 6月15日
《离线语言支持系统:面向空战战术决策》
专知会员服务
8+阅读 · 6月15日
相关资讯
GitHub超9千星:一个API调用27个NLP预训练模型
新智元
17+阅读 · 2019年7月22日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
NLP-Progress记录NLP最新数据集、论文和代码: 助你紧跟NLP前沿
中国人工智能学会
12+阅读 · 2018年11月15日
【推荐】用TensorFlow实现LSTM社交对话股市情感分析
机器学习研究会
11+阅读 · 2018年1月14日
深度学习基础之LSTM
全球人工智能
29+阅读 · 2017年12月18日
手把手教你入门使用tf-slim库 | 回顾
AI研习社
12+阅读 · 2017年12月9日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员