arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.02319cs.CLcs.AIcs.LG
收藏

符号化提示程序搜索:一种面向高效编译时提示优化的结构感知方法

Symbolic Prompt Program Search: A Structure-Aware Approach to Efficient Compile-Time Prompt Optimization

Microsoft Research(微软研究院)

Tobias Schnabel, Jennifer Neville

AI总结:

本文提出SAMMO框架,通过符号化表示和搜索提示程序变换,在指令微调、RAG流水线调优和提示压缩任务上提升复杂提示的性能。

摘要:

在许多现代大语言模型应用中,例如检索增强生成,提示本身已经成为程序。在这些场景下,提示程序会被不同的用户查询或数据实例反复调用。一个重大的实际挑战是如何优化这类提示程序。近期工作大多集中于简单提示程序,或假设提示程序的总体结构是固定的。我们提出了SAMMO,一个用于对提示程序进行编译时优化的符号化提示程序搜索框架。SAMMO在符号层面表示提示程序,从而支持在优化过程中搜索丰富的变换集合。我们展示了SAMMO能够推广先前的方法,并在多个不同的大语言模型上提升了复杂提示在(1)指令微调、(2)RAG流水线调优和(3)提示压缩方面的性能。我们在 https://github.com/microsoft/sammo 开源了全部代码。

英文摘要:

In many modern LLM applications, such as retrieval augmented generation, prompts have become programs themselves. In these settings, prompt programs are repeatedly called with different user queries or data instances. A big practical challenge is optimizing such prompt programs. Recent work has mostly focused on either simple prompt programs or assumed that the general structure of a prompt program is fixed. We introduce SAMMO, a framework to perform symbolic prompt program search for compile-time optimizations of prompt programs. SAMMO represents prompt programs on a symbolic level which allows for a rich set of transformations that can be searched over during optimization. We show that SAMMO generalizes previous methods and improves the performance of complex prompts on (1) instruction tuning, (2) RAG pipeline tuning, and (3) prompt compression, across several different LLMs. We make all code available open-source at https://github.com/microsoft/sammo .

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

↑