大型预训练语言模型的最新发展,已使其在各种下游任务上取得前所未有的性能。要让这些模型达到最佳性能,通常需要利用上下文学习(in-context learning),即模型在给定一个或多个示例的情况下执行一项(可能是全新的)任务。然而,近期研究表明,示例的选择会对任务性能产生巨大影响,而找到最优示例集并非易事。尽管已有许多选择上下文示例的方法,但它们通常独立地为示例评分,忽视了示例之间的依赖关系,以及示例提供给模型时的顺序。在本工作中,我们提出 Retrieval for In-Context Learning(RetICL),这是一种可学习的方法,用于为上下文学习按顺序建模并最优选择示例。我们将顺序示例选择问题构建为马尔可夫决策过程,并使用强化学习训练一个示例检索器。我们在数学应用题求解和科学问答任务上评估 RetICL,结果表明它始终优于或持平于基于启发式和可学习的基线。我们还通过案例研究表明,RetICL 隐式学习到了问题求解策略的表示。
英文摘要:
Recent developments in large pre-trained language models have enabled unprecedented performance on a variety of downstream tasks. Achieving best performance with these models often leverages in-context learning, where a model performs a (possibly new) task given one or more examples. However, recent work has shown that the choice of examples can have a large impact on task performance and that finding an optimal set of examples is non-trivial. While there are many existing methods for selecting in-context examples, they generally score examples independently, ignoring the dependency between them and the order in which they are provided to the model. In this work, we propose Retrieval for In-Context Learning (RetICL), a learnable method for modeling and optimally selecting examples sequentially for in-context learning. We frame the problem of sequential example selection as a Markov decision process and train an example retriever using reinforcement learning. We evaluate RetICL on math word problem solving and scientific question answering tasks and show that it consistently outperforms or matches heuristic and learnable baselines. We also use case studies to show that RetICL implicitly learns representations of problem solving strategies.
MUCnoHARM@GermEval Shared Task 2026: Retrieval-based In-Context Learning for Defamatory Offences, and Where It Falls Short
Central Office for Information Technology in the Security Sector (ZITiS)(安全领域信息技术中央办公室(ZITiS));LMU Munich(慕尼黑大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心)
SoK: Agentic Retrieval-Augmented Generation (RAG): Taxonomy, Architectures, Evaluation, and Research Directions
University of North Dakota(北达科他大学);Youngstown State University(青年州大学);University of Toledo(托莱多大学);University of Missouri(密苏里大学);Tribhuvan University(特里布文大学)
From Myopic Selection to Long-Horizon Awareness: Sequential LLM Routing for Multi-Turn Dialogue
School of Computer Science, Shanghai Jiao Tong University, Shanghai, China(上海交通大学计算机科学学院);WeChat, Tencent Inc, Beijing, China(腾讯北京研发中心);University at Buffalo, New York, United States(布法罗大学)
Sequential Matching Network: A New Architecture for Multi-turn Response Selection in Retrieval-based Chatbots
State Key Lab of Software Development Environment, Beihang University(北京航空航天大学软件开发环境国家重点实验室);Microsoft Research(微软研究院);College of Computer and Control Engineering, Nankai University(南开大学计算机与控制工程学院)
Mitigating Lost-in-Retrieval Problems in Retrieval Augmented Multi-Hop Question Answering
State Key Laboratory for Novel Software Technology, Nanjing University, China(新型软件技术国家重点实验室,南京大学,中国);University of California, Merced, USA(加州大学默塞德分校,美国);National Institute of Healthcare Data Science, Nanjing University, China(健康数据科学国家研究院,南京大学,中国)