Reproduce “PEARL: Prompting Large Language Models to Plan and Execute Actions Over Long Documents” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Simeng Sun, Yang Liu, Shuohang Wang, Chenguang Zhu, Mohit Iyyer

PEARL is a three-stage prompting framework that enables Large Language Models (LLMs) to perform complex, multi-step reasoning over long documents by dynamically generating domain-specific actions, creating an executable plan, and then executing it against the full document. It achieved 70.9% accuracy on a challenging long-document QA dataset, outperforming GPT-4 zero-shot by 6.6 percentage points and Chain-of-Thought by 5 percentage points.

Key insights

  • Dynamically generating domain-specific actions allows LLMs to adapt to complex reasoning over long documents without extensive manual engineering of toolboxes, promoting reusability and task generality.
  • Decoupling plan generation from full document access and only providing the complete document during step-by-step execution effectively manages context window limitations while enabling deep interaction with lengthy texts.
  • The self-refinement process for model-generated plan demonstrations is critical for achieving robust performance, indicating that high-quality few-shot examples significantly influence the effectiveness of plan generation.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.