Skip to main content
QUICK REVIEW

[论文解读] PEARL: Prompting Large Language Models to Plan and Execute Actions Over Long Documents

Simeng Sun, Yang Liu|arXiv (Cornell University)|May 23, 2023
Topic ModelingComputer Science被引用 9
一句话总结

Pearl 通过提示 GPT-4 从数据中挖掘行动、生成计划,并逐步执行以对长文档进行推理,在长上下文的问答子集上超越零-shot 与链式思考基线。

ABSTRACT

Strategies such as chain-of-thought prompting improve the performance of large language models (LLMs) on complex reasoning tasks by decomposing input examples into intermediate steps. However, it remains unclear how to apply such methods to reason over long input documents, in which both the decomposition and the output of each intermediate step are non-trivial to obtain. In this work, we propose PEARL, a prompting framework to improve reasoning over long documents, which consists of three stages: action mining, plan formulation, and plan execution. More specifically, given a question about a long document, PEARL decomposes the question into a sequence of actions (e.g., SUMMARIZE, FIND_EVENT, FIND_RELATION) and then executes them over the document to obtain the answer. Each stage of PEARL is implemented via zero-shot or few-shot prompting of LLMs (in our work, GPT-4) with minimal human input. We evaluate PEARL on a challenging subset of the QuALITY dataset, which contains questions that require complex reasoning over long narrative texts. PEARL outperforms zero-shot and chain-of-thought prompting on this dataset, and ablation experiments show that each stage of PEARL is critical to its performance. Overall, PEARL is a first step towards leveraging LLMs to reason over long documents.

研究动机与目标

  • 激发并解决长文档中非分解性较强的复杂推理。
  • 引入一个三阶段提示框架(行动挖掘、计划生成、计划执行),在长输入上构建并执行计划。
  • 在 QuALITY 的一个具有挑战性的长篇叙事问答数据集子集上展示有效性。
  • 展示消融实验以验证每个 Pearl 阶段的必要性并分析错误源。

提出的方法

  • 行动挖掘:一个 LLM 根据种子示例生成与数据集相关的一组基本推理行动。
  • 计划生成:给定一个问题时,LLM 从挖掘出的行动集合中选择行动,生成可执行的计划,格式化为一个简单程序。
  • 计划执行:LLM 使用结构化提示模板对长文档逐步执行计划中的动作。
  • 自我纠正与自我精炼:根据任务特定评估纠正计划语法并精炼计划示例。
  • 基线:将 Pearl 与零-shot GPT-4、GPT-3.5、零-shot 链式思考提示进行比较;消融实验去除计划执行或自我精炼以评估影响。
Figure 1: High-level overview of our framework Pearl . Each stage in Pearl is achieved via zero-shot or few-shot prompting of an LLM (in our work, GPT-4). We also provide example outputs from each stage.
Figure 1: High-level overview of our framework Pearl . Each stage in Pearl is achieved via zero-shot or few-shot prompting of an LLM (in our work, GPT-4). We also provide example outputs from each stage.

实验结果

研究问题

  • RQ1LLM 是否能通过将任务分解为可执行行动和计划来在长文档上进行有效推理?
  • RQ2与直接提示相比,学习到的数据驱动行动集合加上计划执行是否能提升长上下文推理?
  • RQ3每个 Pearl 阶段(行动挖掘、计划生成、计划执行、自我纠正/精炼)对最终性能有多关键?
  • RQ4主要错误模式是什么,以及计划执行如何影响对长输入的答案质量?

主要发现

  • Pearl 在来自 QuALITY 的长上下文问题上优于零-shot 的 GPT-4 和零-shot 链式思考提示。
  • 增加动作集合大小在最优点前有帮助;动作过多会因执行难度而降低性能。
  • 在长文档上的计划执行是观测到提升的必要条件;去除执行会使准确率降低约 3 点,但仍可能超过某些基线。
  • 对计划示例的自我精炼对性能至关重要,移除时观察到显著下降。
  • 人工评估发现大多数生成的计划是合理的,但存在一些不必要的步骤和偶发的遗漏。
  • Pearl 在涉及因果关系、以人为中心的问题,以及 not/except 等问题的推理类型上有显著提升;在若干情形中差异具有统计显著性。
Figure 2: Prompt sketch for action mining. It comprises human-written seed actions set and instructions, as well as question for which LLM will extract action(s) from. Finally, we also present an example mined action. More details can be found in the Appendix D .
Figure 2: Prompt sketch for action mining. It comprises human-written seed actions set and instructions, as well as question for which LLM will extract action(s) from. Finally, we also present an example mined action. More details can be found in the Appendix D .

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。