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: \href{https://github.com/KaiyangWan/CogWriter}{CogWriter}.
翻译:与人类相似,大型语言模型(LLMs)难以一次性生成符合严格约束的高质量长文本。这一挑战并不令人意外,因为根据认知写作理论,成功的人类写作是一个复杂的认知过程,涉及迭代式的规划、转译、审阅与监控。受这些认知原则启发,我们旨在通过CogWriter——一种无需训练的新型框架——为LLMs赋予类人的认知写作能力,将LLM的约束性长文本生成转化为系统化的认知写作范式。该框架包含两个核心模块:(1)执行分层规划以分解任务的规划智能体,以及(2)并行执行这些规划的多个生成智能体。系统通过持续的监控与审阅机制维持生成质量,该机制会依据特定要求评估输出并触发必要的修订。在针对复杂约束长文本生成的基准测试集LongGenBench上,CogWriter展现出卓越性能:即使以Qwen-2.5-14B为骨干模型,其在复杂指令完成准确率上仍超越GPT-4o达22%,并能可靠生成超过10,000词的文本。我们希望这种受认知科学启发的路径能为LLM写作研究提供新范式:\href{https://github.com/KaiyangWan/CogWriter}{CogWriter}。