DICE:通过高效知识迁移实现大语言模型智能体中的动态上下文示例选择
DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfer
AI总结:
针对大语言模型智能体中ICL示例选择缺乏通用理论标准、性能易受次优示例影响的问题,提出有因果理论支撑的DICE框架,可分步选择有效示例,作为插件集成无需额外训练,多领域实验验证了其有效性与通用性。
摘要:
基于大语言模型的智能体在上下文学习(ICL)的赋能下,已在复杂推理和工具使用任务中展现出强大能力。然而现有研究表明,ICL的有效性对示例的选择高度敏感,次优示例往往会导致性能不稳定或下降。尽管已有研究探索了示例选择方法,包括在部分智能体或多步骤场景下的探索,但现有方法通常依赖启发式规则或特定任务设计,缺乏一个通用的、有理论依据的标准来界定什么是跨推理步骤的有效示例。因此,开发一种有原则的通用方法来选择能持续提升智能体性能的示例并非易事。本文提出DICE(面向大语言模型智能体的动态上下文示例选择)来应对这一挑战,这是一种适用于智能体任务的有理论依据的ICL框架,可在推理的每一步选择最相关的示例。我们的方法通过因果视角将示例知识分解为可迁移和不可迁移组件,揭示了后者如何引入会损害泛化能力的虚假依赖关系。我们进一步提出了一种分步选择标准,并给出了其能提升智能体性能的形式化保证。重要的是,DICE是一种通用的、与框架无关的解决方案,可作为插件模块集成到现有智能体框架中,无需额外训练成本。跨多个不同领域的大量实验证明了我们方法的有效性和通用性,凸显了有原则的上下文感知示例选择对于构建鲁棒高效的大语言模型智能体的重要性。
英文摘要:
Large language model-based agents, empowered by in-context learning (ICL), have demonstrated strong capabilities in complex reasoning and tool-use tasks. However, existing works have shown that the effectiveness of ICL is highly sensitive to the choice of demonstrations, with suboptimal examples often leading to unstable or degraded performance. While prior work has explored example selection, including in some agentic or multi-step settings, existing approaches typically rely on heuristics or task-specific designs and lack a general, theoretically grounded criterion for what constitutes an effective demonstration across reasoning steps. Therefore, it is non-trivial to develop a principled, general-purpose method for selecting demonstrations that consistently benefit agent performance. In this paper, we address this challenge with DICE, Dynamic In-Context Example Selection for LLM Agents, a theoretically grounded ICL framework for agentic tasks that selects the most relevant demonstrations at each step of reasoning. Our approach decomposes demonstration knowledge into transferable and non-transferable components through a causal lens, showing how the latter can introduce spurious dependencies that impair generalization. We further propose a stepwise selection criterion with a formal guarantee of improved agent performance. Importantly, DICE is a general, framework-agnostic solution that can be integrated as a plug-in module into existing agentic frameworks without any additional training cost. Extensive experiments across diverse domains demonstrate our method's effectiveness and generality, highlighting the importance of principled, context-aware demo selection for robust and efficient LLM agents.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。