Auto-Demo提示:利用生成输出作为演示以增强批量提示
Auto-Demo Prompting: Leveraging Generated Outputs as Demonstrations for Enhanced Batch Prompting
AI总结:
本文提出Auto-Demo Prompting方法,将批次内早期问答对作为后续推理的演示,以缓解大语言模型批量提示中的性能下降问题,并在五个NLP任务上验证了其有效性。
摘要:
批量提示是大语言模型(LLMs)中一种常见技术,用于同时处理多个输入,旨在提高计算效率。然而,随着批量规模增大,由于模型难以处理过长的上下文输入,性能往往会下降。现有试图缓解这些问题的方法仅依赖于批量数据排列和多数投票,而没有改进批量提示本身的设计。在本文中,我们通过提出“Auto-Demo Prompting”来解决这些局限,这是一种新颖的方法,利用批次内较早问题的问答对作为后续答案推理的演示。我们对Auto-Demo Prompting在LLMs自回归生成过程中的作用机制进行了形式化理论分析,说明其如何利用先前输出来优化模型的内部表示。我们的方法有效弥合了批量提示与少样本提示之间的差距,在仅略微增加token使用量的情况下提升了性能。在五个NLP任务上的实验结果表明,该方法能有效缓解性能下降,并偶尔优于单条提示。此外,它为在批量提示中应用少样本学习技术(如演示选择)开辟了新途径,使其成为现实应用中的稳健解决方案。
英文摘要:
Batch prompting is a common technique in large language models (LLMs) used to process multiple inputs simultaneously, aiming to improve computational efficiency. However, as batch sizes increase, performance degradation often occurs due to the model's difficulty in handling lengthy context inputs. Existing methods that attempt to mitigate these issues rely solely on batch data arrangement and majority voting rather than improving the design of the batch prompt itself. In this paper, we address these limitations by proposing "Auto-Demo Prompting," a novel approach that leverages the question-output pairs from earlier questions within a batch as demonstrations for subsequent answer inference. We provide a formal theoretical analysis of how Auto-Demo Prompting functions within the autoregressive generation process of LLMs, illustrating how it utilizes prior outputs to optimize the model's internal representations. Our method effectively bridges the gap between batch prompting and few-shot prompting, enhancing performance with only a slight compromise in token usage. Experimental results across five NLP tasks demonstrate its effectiveness in mitigating performance degradation and occasionally outperforming single prompts. Furthermore, it opens new avenues for applying few-shot learning techniques, such as demonstration selection, within batch prompting, making it a robust solution for real-world applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。