TL;DR
This paper introduces WriteHERE, a novel framework for adaptive long-form writing that breaks free from rigid, pre-defined outlines. By recursively decomposing writing tasks into heterogeneous types (retrieval, reasoning, composition) and dynamically interleaving planning and execution, WriteHERE significantly outperforms existing methods in both narrative and report generation.
What Problem Does This Paper Address?
Generating coherent, high-quality, and well-structured long-form content is a significant challenge for Large Language Models (LLMs). Current LLM-based writing agents often rely on a multi-stage paradigm where a comprehensive outline is generated first, followed by content generation. While this approach helps maintain structure, it imposes rigid workflows that limit adaptability. For instance, if a writer discovers an unexpected plot element mid-chapter, they need to dynamically adjust their plan, retrieve new information, and reason about consistency. Existing methods struggle with this flexibility, often getting stuck in predefined task sequences. This paper addresses this limitation by proposing a framework that unifies writing and outlining, enabling dynamic adaptation throughout the writing process.
Methods
The core of WriteHERE is Heterogeneous Recursive Planning (HRP), inspired by Hierarchical Task Network (HTN) planning. The framework models long-form writing as a planning problem where a high-level goal is achieved through the execution of primitive tasks.
Key components include:
- Recursive Planning: Tasks are recursively decomposed into subtasks until primitive, executable operations are reached. This allows for dynamic adjustment of planning depth based on task complexity.
- Heterogeneous Task Types: The framework explicitly recognizes three distinct cognitive tasks involved in writing:
- Retrieval: Acquiring relevant information.
- Reasoning: Deriving new knowledge or making decisions.
- Composition: Generating text.
- Type-Aware Decomposition: This mechanism guides subtask breakdowns based on the type of the current task, facilitating the integration of specialized agents (e.g., a search agent for retrieval).
- State-based Hierarchical Task Scheduling: This algorithm interleaves task execution with planning. Tasks are assigned states (ACTIVE, SUSPENDED, SILENT) and managed within a Directed Acyclic Graph (DAG) to ensure hierarchical and dependency-based execution.
- LLM Operations: LLMs are prompted for core operations like goal updating, determining task primitivity, executing primitive tasks, and generating typed plans.
Datasets
- TELL ME A STORY: Used for narrative generation.
- WildSeek: Used for report generation.
- LongReport: A newly constructed dataset for long-form report generation, designed with 12 complex prompts to elicit comprehensive reports and address limitations of existing datasets in prompt conciseness.
Key Insights and Ideas
- Unifying Planning and Writing: The paper argues that separating outlining and writing into distinct, rigid stages is a bottleneck. WriteHERE integrates them into a single, goal-driven framework, allowing for fluid adaptation.
- The Power of Heterogeneity: Recognizing retrieval, reasoning, and composition as distinct but interconnected task types is crucial. This allows for specialized agents and more nuanced decomposition.
- Dynamic Adaptation is Key: The ability to adjust the plan mid-process, based on execution outcomes and new information, is essential for complex, long-form tasks. The state-based scheduling and recursive planning enable this.
- Task Decomposition as a Foundation: Building on HTN planning, the recursive decomposition allows for breaking down complex goals into manageable, executable steps, improving accuracy and control.
Key Results
WriteHERE consistently outperformed state-of-the-art baselines in both narrative and report generation across multiple evaluation metrics.
- Narrative Generation (TELL ME A STORY): WriteHERE showed significant improvements over baselines like Agent's Room and E2E, particularly in plot, creativity, development, and language use. Ablation studies showed that both recursive planning and type-awareness contributed significantly to performance.
- Report Generation (WildSeek & LongReport): WriteHERE demonstrated superior performance in relevance, breadth, depth, and novelty compared to STORM and Co-STORM. Human evaluations on the LongReport dataset also showed WriteHERE performing comparably to Gemini Deep-Research, with a slight advantage in breadth, depth, and novelty. The framework also showed improved performance with extended generation lengths.
Limitations and Future Work
- Computational Efficiency: Recursive decomposition can introduce computational overhead. Future work could explore optimization techniques, heterogeneous agents, and reasoning budgets.
- Human-in-the-Loop Integration: Integrating human feedback during planning and writing could further improve adaptability and quality.
- Process Diagnostics: Developing a debugging suite for the task graph could enhance failure analysis and self-correction capabilities.
- Hallucination: While retrieval helps mitigate factual inaccuracies, it's not a complete guarantee. Human verification is recommended for high-facticity applications.
- Bias and Inappropriate Content: The framework acknowledges the risk of reproducing societal biases from training data. Future work could integrate ethical review and bias calibration mechanisms.
Summary updated