arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2210.02406cs.CL
收藏

分解提示:一种解决复杂任务的模块化方法

Decomposed Prompting: A Modular Approach for Solving Complex Tasks

Allen Institute for AI(艾伦人工智能研究所);Stony Brook University(石溪大学);University of Edinburgh(爱丁堡大学)

Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, Ashish Sabharwal

AI总结:

本文提出分解提示方法,通过将复杂任务模块化分解为可由专用LLM提示处理的简单子任务,并在符号推理和多跳问答等任务上验证其优于少样本提示的性能。

摘要:

少样本提示是一种使用大型语言模型(LLMs)解决各种任务的出人意料强大的方法。然而,随着任务复杂性的增加,或者当任务的各个推理步骤本身难以学习时,尤其是当这些步骤嵌入在更复杂的任务中时,这种方法会面临困难。为了解决这一问题,我们提出了分解提示(Decomposed Prompting),这是一种通过提示将复杂任务分解为更简单的子任务,并将这些子任务委托给一个由基于提示的LLMs组成的库来解决复杂任务的新方法。这种模块化结构允许每个提示针对其特定子任务进行优化,必要时进一步分解,甚至在需要时可以轻松替换为更有效的提示、训练好的模型或符号函数。我们展示了分解提示的灵活性和模块化使其在使用GPT3的少样本提示上优于先前的工作。在符号推理任务上,我们可以进一步将LLMs难以处理的子任务分解为更简单的可解子任务。当复杂性来自输入长度时,我们可以递归地将任务分解为相同的任务,但输入更小。我们还在文本多步推理任务上评估了我们的方法:在长上下文多跳问答任务上,我们可以通过单独的子任务提示更有效地教授子任务;在开放域多跳问答上,我们可以在分解框架中融入符号信息检索,从而在两个任务上都取得了性能提升。数据集、代码和提示可在 https://github.com/allenai/DecomP 获取。

英文摘要:

Few-shot prompting is a surprisingly powerful way to use Large Language Models (LLMs) to solve various tasks. However, this approach struggles as the task complexity increases or when the individual reasoning steps of the task themselves are hard to learn, especially when embedded in more complex tasks. To address this, we propose Decomposed Prompting, a new approach to solve complex tasks by decomposing them (via prompting) into simpler sub-tasks that can be delegated to a library of prompting-based LLMs dedicated to these sub-tasks. This modular structure allows each prompt to be optimized for its specific sub-task, further decomposed if necessary, and even easily replaced with more effective prompts, trained models, or symbolic functions if desired. We show that the flexibility and modularity of Decomposed Prompting allows it to outperform prior work on few-shot prompting using GPT3. On symbolic reasoning tasks, we can further decompose sub-tasks that are hard for LLMs into even simpler solvable sub-tasks. When the complexity comes from the input length, we can recursively decompose the task into the same task but with smaller inputs. We also evaluate our approach on textual multi-step reasoning tasks: on long-context multi-hop QA task, we can more effectively teach the sub-tasks via our separate sub-tasks prompts; and on open-domain multi-hop QA, we can incorporate a symbolic information retrieval within our decomposition framework, leading to improved performance on both tasks. Datasets, Code and Prompts available at https://github.com/allenai/DecomP.

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

↑