arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.00884cs.CLcs.AI
收藏

Self-Demos:激发大语言模型的演示外泛化能力

Self-Demos: Eliciting Out-of-Demonstration Generalizability in Large Language Models

School of Computer Science, Fudan University(复旦大学计算机科学学院);Institute of Modern Languages and Linguistics, Fudan University(复旦大学现代语言与语言学研究所)

Wei He, Shichun Liu, Jun Zhao, Yiwen Ding, Yi Lu, Zhiheng Xi, Tao Gui, Qi Zhang, Xuanjing Huang

AI总结:

本文提出Self-Demos提示方法,通过查询感知生成演示将OOD查询转化为ID,并在自建OOD-Toolset及数学基准上验证其优于现有基线。

摘要:

大语言模型(LLMs)已展现出颇具前景的上下文学习(ICL)能力,能够仅凭少量示例迅速适应新任务。然而,当前的少样本方法高度依赖高质量、与查询高度相关的演示,而这些演示往往难以获得。当面对演示外(OOD)查询时,依赖人工构造演示或外部检索器的方法可能会失效。为弥合有限演示与OOD查询之间的差距,我们提出Self-Demos,这是一种新颖的提示方法,通过查询感知的演示生成来激发LLMs内在的泛化能力。所生成的演示在现有演示与给定查询之间进行策略性插值,从而将查询从OOD转变为ID。为评估我们方法的有效性,我们手动构建了OOD-Toolset,这是一个工具使用场景下的数据集,包含300多个真实世界API和1000个实例,每个实例由三个工具使用案例作为演示以及一个OOD查询组成。在我们数据集和两个公开数学基准上的充分实验表明,我们的方法在OOD设置下能够超越最先进的基线方法。此外,我们还进行了一系列分析,以验证Self-Demos的泛化能力并提供更多见解。

英文摘要:

Large language models (LLMs) have shown promising abilities of in-context learning (ICL), adapting swiftly to new tasks with only few-shot demonstrations. However, current few-shot methods heavily depend on high-quality, query-specific demos, which are often lacking. When faced with out-of-demonstration (OOD) queries, methods that rely on hand-crafted demos or external retrievers might fail. To bridge the gap between limited demos and OOD queries, we propose Self-Demos, a novel prompting method that elicits the inherent generalizability in LLMs by query-aware demo generation. The generated demos strategically interpolate between existing demos and the given query, transforming the query from OOD to ID. To evaluate the effectiveness of our approach, we manually constructed OOD-Toolset, a dataset in the tool-using scenario with over 300 real-world APIs and 1000 instances, each consisting of three tool-use cases as demos and an OOD query. Thorough experiments on our dataset and two public math benchmarks have shown that our method can outperform state-of-the-art baselines in the OOD setting. Moreover, we conduct a range of analyses to validate Self-Demos's generalization and provide more insights.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑