A Cognitive Writing Perspective for Constrained Long-Form Text Generation (2025)

Abstract: Like humans, Large Language Models (LLMs) struggle to generate high-quality long-form text that adheres to strict requirements in a single pass. This challenge is unsurprising, as successful human writing, according to the Cognitive Writing Theory, is a complex cognitive process involving iterative planning, translating, reviewing, and monitoring. Motivated by these cognitive principles, we aim to equip LLMs with human-like cognitive writing capabilities through CogWriter, a novel training-free framework that transforms LLM constrained long-form text generation into a systematic cognitive writing paradigm. Our framework consists of two key modules: (1) a Planning Agent that performs hierarchical planning to decompose the task, and (2) multiple Generation Agents that execute these plans in parallel. The system maintains quality via continuous monitoring and reviewing mechanisms, which evaluate outputs against specified requirements and trigger necessary revisions. CogWriter demonstrates exceptional performance on LongGenBench, a benchmark for complex constrained long-form text generation. Even when using Qwen-2.5-14B as its backbone, CogWriter surpasses GPT-4o by 22% in complex instruction completion accuracy while reliably generating texts exceeding 10,000 words. We hope this cognitive science-inspired approach provides a paradigm for LLM writing advancements: https://anonymous.4open.science/r/CogWriter-8DFE.

## introduction llms like chatgpt @xcite have begun to mirror human-like capabilities across diverse natural language processing tasks @xcite . from crafting concise summaries @xcite to composing structured reports @xcite , these models can generate coherent text in a single pass @xcite * corresponding author. @xcite with a fluency that often rivals human writers. recent advances have led to models with expanded context windows of up to 128k tokens @xcite , theoretically enabling the generation of extensive documents @xcite . however, these models face significant challenges when tasked with generating constrained long-form text under complex constraints, such as following detailed instructions over 10,000 words @xcite . this limitation poses a crucial barrier for applications requiring extended @xcite , well-structured content, including creative design proposals, technical documentation, and comprehensive research reports. to understand the disparity between llms and human writers, we refer to cognitive writing theory @xcite , which emphasizes how humans succeed in writing through a recursive activity that dynamically integrates multiple cognitive processes. as shown in the top part of figure 1 , these processes include planning, where writers establish high-level goals and develop structural outlines; translating, where writers transform abstract ideas into coherent text; and reviewing, where writers continuously evaluate and refine their generated content. crucially, writers control these components through continuous monitoring, allowing them to assess and adjust text to better align with evolving objectives throughout the writing process. current llms excel at generating fluent text, effectively performing the translating function of converting internal token vectors into textual content. however, they fundamentally conflict with key cognitive principles in three ways, as shown in the bottom part of figure 1 : 1) they treat longform text generation merely as an end-to-end task, overlooking the crucial hierarchical planning process that should guide content generation; 2) their autoregressive architecture renders generated tokens as immutable context, preventing the reviewing and restructuring capabilities essential to human writing; and 3) unlike human writers who actively monitor their progress against both local and global objectives, llms lack explicit evaluation mechanisms, leading to potential divergence from intended goals in extended generations. to address the limitations of single-pass generation, we introduce cogwriter, a novel training-free framework that aligns llm-based text generation with cognitive writing paradigm. at its core, cog-writer employs a planning agent that decomposes complex requirements into manageable subtasks, providing explicit guidance for content generation. based on sub-plans and the initial goal, multiple generation agents work in parallel to produce text segments, enabling both efficient generation and quality control that ensures consistent alignment with requirements. crucially, both the planning and generation processes support iterative reviewing through feedback from external monitoring functions and llm-based evaluation, thus enabling dynamic plan adjustment and content revision. we evaluate cogwriter on longgenbench-16k @xcite , a benchmark designed to test a language model's ability to generate instruction-aligned content about 16k tokens. empirical results demonstrate that our paradigm is effective for both closed-source and open-source llms of various sizes. specifically, even when using qwen-2.5-14b as its backbone, cogwriter achieves a 22% higher instruction completion accuracy rate compared to gpt-4o, while reliably generating texts exceeding 10,000 words. these results demonstrate the effectiveness of cognitive scienceinspired approaches in advancing llm writing capabilities, particularly for complex constrained long-form text generation. we hope cogwriter's systematic cognitive writing paradigm will inspire future research in llm writing advancement. our contributions can be summarized as follows: ## a cognitive writing perspective the challenge of constrained long-form text generation extends far beyond simply producing more words. just as a novelist crafts an intricate narrative or an architect designs a towering structure, long text generation requires the coordination of multiple cognitive processes working together. through the lens of cognitive writing theory, three fundamental processes emerge: hierarchical planning, continuous monitoring, and dynamic reviewing @xcite , as illustrated in figure 1 . hierarchical planning long-form writing requires a delicate cognitive balance between maintaining local coherence and global structure. human writers cope with this constraint, as working memory cannot simultaneously retain every detail of a complex narrative @xcite . skilled writers manage this limitation through hierarchical decomposition, systematically structuring the writing process into multiple levels (e.g., chapters, sections, and paragraphs). this approach enables them to alternate between top-down thematic planning and bottom-up content development, ensuring alignment with high-level objectives while refining details @xcite . llms encounter a similar limitation: they generate text in a linear, autoregressive manner without an independent planning module to iteratively refine outlines or adapt strategies in real time @xcite . consequently, their direct prompt-totext generation process often struggles with complex, multi-threaded narratives. without structured guidance, llms are prone to losing coherence over long spans, as their finite computational capacity quickly becomes overwhelmed @xcite . continuous monitoring effective planning in writing requires continuous oversight. human writers naturally monitor their work, acting like their own editors. they pay attention to both small details-such as word choice and sentence flow-and the larger structure, ensuring the text maintains a clear theme and purpose @xcite . in contrast, current mainstream llms generate text in a linear, close-loop manner, without the ability to review or refine their output. they lack a built-in system to check their progress against the intended goals, making it difficult to spot and correct issues during generation. without external monitoring, llms struggle to detect when the content drifts off-topic, when the style becomes inconsistent, or when repetition occurs-problems that are especially common in extended long-form writing @xcite . dynamic reviewing while monitoring continuously tracks the writing process by detecting small errors, inconsistencies, or deviations, reviewing takes this feedback and applies it to make necessary adjustments, such as reorganizing content or improving logical flow. human writers naturally engage in this iterative reviewing process, refining their work by revisiting earlier content and making adjustments @xcite . however, llms lack this ability due to their leftto-right, single-pass generation @xcite . without the ability to revisit or reorganize previous content, llms struggle with global revisions, such as restructuring sections or ensuring consistency across distant parts of the text @xcite . this absence of dynamic reviewing often results in long-form outputs with accumulated errors, inconsistencies, or redundant content. ## problem formulation based on the analysis in section 2, successfully generating long-form text requires addressing key deficiencies in current llms. we propose a new paradigm that equips llms with essential abilities to handle long, complex, and instruction-driven text generation. to achieve this, we formally define the constrained long-form text generation task, specifying the types of instructions and requirements the model must meet. following @xcite , we formally define constrained long-form generation as the task of generating a sequence of interrelated text segments @xmath0, d 2 , . . . , d n }, where each d i represents a coherent unit of text that must satisfy certain constraints. each segment d i must achieve a target l words and adhere to a set of instructions t . the instructions t guide the generation process and are classified into three types: 1. single instruction (si): this instruction specifies content that must appear at exact, predefined positions. it is denoted as t @xmath1, t s2 , . . .}, where each t si indicates specific content that must be placed in a precise position within the generated descriptions. 2. range instruction (ri): this instruction specifies the content that must be included in each description within a designated range. it is represented as t @xmath2, t i+1 , . . . , t i+j }, ensuring that the specified content is sequentially assigned within the range [i, i + j]. 3. periodic instruction (pi): this instruction mandates the periodic repetition of specific content at regular intervals. it is defined as t @xmath3, t 2n , . . . , t m•n }, where n is the interval length and m specifies the number of repetitions. these instructions are unified into a comprehensive check set: @xmath4, t r , t p }. the versatility of this framework extends to various practical applications. for example, in architectural planning for a 100-floor building, single instructions determine specific facilities like a medical center on the 20th floor, range instructions define functional zones like corporate offices spanning floors 5-12, and periodic instructions maintain consistent amenities such as security checkpoints on every fifth floor. each floor description must meet a target length of 200 words. instruction-following text segments ... cogwriter, a training-free framework that equips llm with cognitive writing capabilities and enables llms to tackle complex constrained longform generation with human-like strategic thinking. ## conclusion and future work in this paper, we analyzed the challenges of constrained long-form text generation from a cognitive writing perspective. building on these insights and empirical observations, we proposed cogwriter, a novel writing framework that transforms llm constrained long-form text generation into a systematic cognitive paradigm. cogwriter bridges the gap between human writing cognition and llm capabilities, leading to substantial and consistent improvements in both instruction completion and generation length across different llms, as demonstrated through extensive experiments on longgen-bench. looking forward, we plan to optimize agent communication cost and develop specialized models that better align with the unique requirements of each cognitive stage in the writing process.