Retrieval-augmented generation (RAG) ranks passages by semantic similarity to the input, implicitly assuming that semantic similarity is a reliable indication of applicability in downstream tasks. This assumption breaks down when task success depends not on topical relevance but on applying the correct rules, constraints, or procedural guidance. In such settings, the most useful context may be the rule triggered by the input rather than the most semantically similar passage. We propose Task-Aligned Retrieval (TAG), a retrieval framework that replaces similarity-based retrieval with applicability-based rule selection. TAG transforms source documents into traceable condition-action rules, identifies which rules apply to a given input through pairwise LLM judgments, and generates the output conditioned only on the selected actions. We empirically observe that across Wikipedia NPOV rewriting, HumanEval with PEP~8 compliance, and NBA transaction reasoning on RuleArena, TAG consistently outperforms standard RAG, with the largest gains in high-mismatch settings (up to 12.2\%) while reducing retrieved context by up to 93\%. These results suggest that, in rule- and instruction-governed tasks, retrieval should optimize for applicability rather than for semantic similarity alone.


翻译:检索增强生成(RAG)根据与输入的语义相似性对段落进行排序,隐含假设语义相似性是下游任务适用性的可靠指标。当任务成功取决于正确规则、约束或程序性指导的应用而非主题相关性时,这一假设便不再成立。在此类场景中,最有效的上下文可能是输入所触发的规则,而非最语义相似的段落。我们提出任务对齐检索(TAG),这是一种用基于适用性的规则选择取代基于相似性检索的框架。TAG将源文档转化为可追溯的条件-行为规则,通过成对LLM判断识别哪些规则适用于给定输入,并仅基于所选行为生成输出。实验表明,在维基百科NPOV重写、符合PEP 8规范的HumanEval以及RuleArena上的NBA交易推理任务中,TAG始终优于标准RAG,在高不匹配场景下提升幅度最大可达12.2%,同时将检索上下文缩减高达93%。这些结果表明,在规则与指令驱动的任务中,检索应优先优化适用性而非仅依赖语义相似性。

0
下载
关闭预览

相关内容

迈向可信的检索增强生成:大语言模型综述
专知会员服务
30+阅读 · 2025年2月12日
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
RAG 与 LLMs 的结合 - 迈向检索增强的大型语言模型综述
专知会员服务
101+阅读 · 2024年5月13日
《大型语言模型中基于检索的文本生成》综述
专知会员服务
60+阅读 · 2024年4月18日
【WWW2024】元认知检索-增强大型语言模型
专知会员服务
50+阅读 · 2024年2月26日
【知乎】超越Lexical:用于文本搜索引擎的语义检索框架
专知会员服务
22+阅读 · 2020年8月28日
谷歌 AI:语义文本相似度研究进展
AI研习社
22+阅读 · 2018年6月13日
各种相似性度量及Python实现
机器学习算法与Python学习
11+阅读 · 2017年7月6日
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员