AI summary · arXiv: 2305.13304v1 · cs.CL

RecurrentGPT: Interactive Generation of (Arbitrarily) Long Text

Wangchunshu Zhou, Yuchen Eleanor Jiang, Peng Cui, Tiannan Wang, Zhenxin Xiao, Yifan Hou, Ryan Cotterell, Mrinmaya Sachan
Original paper Submitted to arXiv on 22 May. 2023 Under review License: CC BY 4.0

How to read this summary? Illustrated guide

The essentials

AI-generated keywords: RecurrentGPT

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
In this paper, the authors introduce RecurrentGPT, a language-based model that enables the generation of arbitrarily long text without forgetting. Unlike hierarchical methods that prompt LLMs for long story generation in a plan-and-write fashion, RecurrentGPT overcomes limitations via recurrent generation, enabling effective human-LM collaboration and improving flexibility and controllability for long text generation. The authors also discuss the limitations of existing AI writing assistants and automatic generation systems and how RecurrentGPT can improve the quality of AI-generated long texts while increasing the productivity of human writers. They further demonstrate the possibility of using RecurrentGPT as an interactive fiction that directly interacts with consumers, which they call "AI As Contents" (AIAC). The authors provide evaluations of RecurrentGPT's performance in generating novel genres such as sci-fi and fantasy, as well as discussing potential social impacts and promoting responsible usage of generative AI.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 1 free rewrite left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Continue with Google Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero Zotero guide
Citation alerts 108 papers already cite it: be emailed each new one. Citation alerts guide
Weekly letter The latest letter of its field, "Artificial intelligence this week" of 23 November 2026: Artificial intelligence this week: The difference between looking right and getting it right · Receive one by email for free

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Close Broader context
    ChatGPT: Virtual Creative Model
    Abduallah Gamal · 2023 · Neutrosophic and Information Fusion · Not summarized yet

    ChatGPT: Virtual Creative Model discusses ChatGPT’s human-like text generation and versions, while RecurrentGPT uses an LLM to generate long text with editable memories.

    Abstract

    We offer ChatGPT, an autoregressive language model that employs deep learning to generate sentences that resemble those written by humans, and assess them using the preceding distinction. We discuss the nature of ChatGPT based on a review of its output. Also, we reviewed some details about the different versions of ChatGPT. We show, based on the resulting ChatGPT outputs, which the recently released AI-enabled ChatGPT can be of great help to daily life. We showed the full benefit behind ChatGPT.

  2. Close Another approach to the problem Cited by this paper A method it uses
    Progressive Generation of Long Text with Pretrained Language Models
    Bowen Tan, Zichao Yang, Maruan Al-Shedivat et al. · 2021 · North American Chapter of the Association for Computational Linguistics · cited 110 times · Not summarized yet

    Progressive Generation of Long Text with Pretrained Language Models progressively creates long passages, while RecurrentGPT simulates recurrent memory to generate text without a fixed length limit.

    Abstract

    Large-scale language models (LMs) pretrained on massive corpora of text, such as GPT-2, are powerful open-domain text generators. However, as our systematic examination reveals, it is still challenging for such models to generate coherent long passages of text (e.g., 1000 tokens), especially when the models are fine-tuned to the target domain on a small corpus. Previous planning-then-generation methods also fall short of producing such long text in various domains. To overcome the limitations, we propose a simple but effective method of generating text in a progressive manner, inspired by generating images from low to high resolution. Our method first produces domain-specific content keyword…

  3. Close Broader context
    Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation
    Jin Xu, Xiaojiang Liu, Jianhao Yan et al. · 2022 · Neural Information Processing Systems · cited 145 times · Not summarized yet

    Learning to Break the Loop analyzes repeated sentences produced by neural language models, whereas RecurrentGPT addresses long-text generation through language-based memory.

    Abstract

    While large-scale neural language models, such as GPT2 and BART, have achieved impressive results on various text generation tasks, they tend to get stuck in undesirable sentence-level loops with maximization-based decoding algorithms (\textit{e.g.}, greedy search). This phenomenon is counter-intuitive since there are few consecutive sentence-level repetitions in human corpora (e.g., 0.02\% in Wikitext-103). To investigate the underlying reasons for generating consecutive sentence-level repetitions, we study the relationship between the probabilities of the repetitive tokens and their previous repetitions in the context. Through our quantitative experiments, we find that 1) Language models h…

  4. Close Same method, another problem
    GPT is becoming a Turing machine: Here are some ways to program it
    Ana Jojic, Zhen Wang, Nebojsa Jojic · 2023 · Computation and Language · preprint, not peer reviewed · cited 21 times · AI summary available

    GPT is becoming a Turing machine prompts GPT-3 to execute iterative program behavior, while RecurrentGPT uses prompting to simulate recurrent memory across text-generation steps.

    Abstract

    We demonstrate that, through appropriate prompting, GPT-3 family of models can be triggered to perform iterative behaviours necessary to execute (rather than just write or recall) programs that involve loops, including several popular algorithms found in computer science curricula or software developer interviews. We trigger execution and description of Iterations by Regimenting Self-Attention (IRSA) in one (or a combination) of three ways: 1) Using strong repetitive structure in an example of an execution path of a target program for one particular input, 2) Prompting with fragments of execution paths, and 3) Explicitly forbidding (skipping) self-attention to parts of the generated text. On…

  5. Close Same question Cites this paper
    Interactive Text Generation Using GPT-2 with Gradio: An Approach to Accessible NLP Applications
    Niharika Vemula, Durgesh Nandan, Ravikiranreddy Kandadi et al. · 2025 · International Conference on Advanced Communication Technology · cited 19 times · Not summarized yet

    Interactive Text Generation Using GPT-2 with Gradio builds an accessible interface for interactive text generation, while RecurrentGPT enables users to edit memories and interact during long-text generation.

    Abstract

    Natural language processing was revolutionized by the development of large language models (LLMs) such as gpt-2, and similar technologies that can be used for chatbots, writing assistance, and artificial intelligence in education, among numerous other applications. These powerful models nevertheless come with accessibility and usability barriers for specific nontechnical users, limiting their broader usage. The present study proposes to fill this gap by incorporating GPT-2 with Gradio, an open-source platform for deploying machine learning models via easy-to-use web interfaces. We present a novel approach of using GPT-2 for interactive text generation, taking advantage of GPT-2's ability to …

  6. Close Groundwork for this paper
    Generating Sequences With Recurrent Neural Networks
    Alex Graves · 2013 · Neural and Evolutionary Computing · preprint, not peer reviewed · cited 4,402 times · AI summary available

    Generating Sequences With Recurrent Neural Networks demonstrates LSTM sequence generation with long-range structure, the recurrent mechanism RecurrentGPT simulates through natural-language memory.

    Abstract

    This paper shows how Long Short-term Memory recurrent neural networks can be used to generate complex sequences with long-range structure, simply by predicting one data point at a time. The approach is demonstrated for text (where the data are discrete) and online handwriting (where the data are real-valued). It is then extended to handwriting synthesis by allowing the network to condition its predictions on a text sequence. The resulting system is able to generate highly realistic cursive handwriting in a wide variety of styles.

  7. Close Another approach to the problem Cites this paper
    Epic-Level Text Generation with LLM through Auto-prompted Reinforcement Learning
    Qianqian Qi, Lin Ni, Zhong-Sheng Wang et al. · 2024 · IEEE International Joint Conference on Neural Network · cited 3 times · Not summarized yet

    Epic-Level Text Generation with LLM through Auto-prompted Reinforcement Learning uses outlines and reinforcement learning for coherent epic narratives, while RecurrentGPT uses recurrent language-based memory.

    Abstract

    In an era where the capabilities of large language models (LLM) like ChatGPT are transforming digital communication, the challenge of directing these tools to create extensive, coherent narratives on an epic-scale has emerged as a critical frontier. This study introduces a novel methodology that fuses the spontaneous story generation of LLMs with the precision of auto-prompted reinforcement learning for crafting epic-scale, coherent narratives. Our approach starts with generating a skeletal outline, followed by iterative expansion, and blending operations for maintaining structural coherence in long-form content. To train the reinforcement learning model efficiently, we introduce an environm…

  8. Close Same question
    Real-time interactive sequence generation and control with Recurrent Neural Network ensembles
    Memo Akten, M. Grierson · 2016 · arXiv.org · preprint, not peer reviewed · cited 5 times · Not summarized yet

    Real-time interactive sequence generation and control with Recurrent Neural Network ensembles lets users steer generated sequences, while RecurrentGPT supports interaction and editing during long-text generation.

    Abstract

    Recurrent Neural Networks (RNN), particularly Long Short Term Memory (LSTM) RNNs, are a popular and very successful method for learning and generating sequences. However, current generative RNN techniques do not allow real-time interactive control of the sequence generation process, thus aren’t well suited for live creative expression. We propose a method of real-time continuous control and ‘steering’ of sequence generation using an ensemble of RNNs and dynamically altering the mixture weights of the models. We demonstrate the method using character based LSTM networks and a gestural interface allowing users to ‘conduct’ the generation of text

Prior work it builds on

  1. Close Another approach to the problem Used in depth by this paper A method it uses
    Re3: Generating Longer Stories With Recursive Reprompting and Revision
    Kevin Yang, Yuan-Dong Tian, Nanyun Peng et al. · 2022 · Conference on Empirical Methods in Natural Language Processing · cited 299 times · Not summarized yet

    Re3 generates long stories by planning, injecting story state into prompts, and revising continuations, while RecurrentGPT simulates LSTM memory to sustain long generation.

    Abstract

    We consider the problem of automatically generating longer stories of over two thousand words. Compared to prior work on shorter stories, long-range plot coherence and relevance are more central challenges here. We propose the Recursive Reprompting and Revision framework (Re3) to address these challenges by (a) prompting a general-purpose language model to construct a structured overarching plan, and (b) generating story passages by repeatedly injecting contextual information from both the plan and current story state into a language model prompt. We then revise by (c) reranking different continuations for plot coherence and premise relevance, and finally (d) editing the best continuation fo…

  2. Close Groundwork for this paper
    Language Models are Few-Shot Learners
    Tom B. Brown, Benjamin Mann, Nick Ryder et al. · 2020 · Computation and Language · cited 66,190 times · AI summary available

    Language Models are Few-Shot Learners establishes few-shot capabilities of large language models, which RecurrentGPT uses as its generative foundation.

    Abstract

    Recent work has demonstrated substantial gains on many NLP tasks and benchmarks by pre-training on a large corpus of text followed by fine-tuning on a specific task. While typically task-agnostic in architecture, this method still requires task-specific fine-tuning datasets of thousands or tens of thousands of examples. By contrast, humans can generally perform a new language task from only a few examples or from simple instructions - something which current NLP systems still largely struggle to do. Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. Spec…

  3. Close Shared data, tool or method
    CoAuthor: Designing a Human-AI Collaborative Writing Dataset for Exploring Language Model Capabilities
    Mina Lee, Percy Liang, Qian Yang · 2022 · Human-Computer Interaction · cited 626 times · AI summary available

    CoAuthor provides a dataset of writer interactions with GPT-3 for studying assisted writing, while RecurrentGPT presents an interactive writing system for long text.

    Abstract

    Large language models (LMs) offer unprecedented language generation capabilities and exciting opportunities for interaction design. However, their highly context-dependent capabilities are difficult to grasp and are often subjectively interpreted. In this paper, we argue that by curating and analyzing large interaction datasets, the HCI community can foster more incisive examinations of LMs' generative capabilities. Exemplifying this approach, we present CoAuthor, a dataset designed for revealing GPT-3's capabilities in assisting creative and argumentative writing. CoAuthor captures rich interactions between 63 writers and four instances of GPT-3 across 1445 writing sessions. We demonstrate …

  4. Close Same question
    TaleBrush: Sketching Stories with Generative Pretrained Language Models
    John Joon Young Chung, Wooseok Kim, Kang Min Yoo et al. · 2022 · International Conference on Human Factors in Computing Systems · cited 264 times · Not summarized yet

    TaleBrush lets writers steer GPT-based co-created stories through sketches, while RecurrentGPT offers interactive control by exposing editable natural-language memories.

    Abstract

    While advanced text generation algorithms (e.g., GPT-3) have enabled writers to co-create stories with an AI, guiding the narrative remains a challenge. Existing systems often leverage simple turn-taking between the writer and the AI in story development. However, writers remain unsupported in intuitively understanding the AI’s actions or steering the iterative generation. We introduce TaleBrush, a generative story ideation tool that uses line sketching interactions with a GPT-based language model for control and sensemaking of a protagonist’s fortune in co-created stories. Our empirical evaluation found our pipeline reliably controls story generation while maintaining the novelty of generat…

  5. Related Another approach to the problem A method it uses
    Hierarchical Neural Story Generation
    Angela Fan, M. Lewis, Y. Dauphin · 2018 · Annual Meeting of the Association for Computational Linguistics · cited 2,202 times · Not summarized yet

    Hierarchical Neural Story Generation creates stories from premises using hierarchical modeling, while RecurrentGPT uses simulated recurrent memory to maintain long text.

    Abstract

    We explore story generation: creative systems that can build coherent and fluent passages of text about a topic. We collect a large dataset of 300K human-written stories paired with writing prompts from an online forum. Our dataset enables hierarchical story generation, where the model first generates a premise, and then transforms it into a passage of text. We gain further improvements with a novel form of model fusion that improves the relevance of the story to the prompt, and adding a new gated multi-scale self-attention mechanism to model long-range context. Experiments show large improvements over strong baselines on both automated and human evaluations. Human judges prefer stories gene…

Papers that cite it

  1. Close Same question
    Language Models can Self-Lengthen to Generate Long Texts
    Shanghaoran Quan, Tian-Yi Tang, Bo-Wen Yu et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 26 times · Not summarized yet

    Language Models can Self-Lengthen to Generate Long Texts addresses long-output generation through iterative training, while RecurrentGPT enables it through language-based recurrent memory.

    Abstract

    Recent advancements in Large Language Models (LLMs) have significantly enhanced their ability to process long contexts, yet a notable gap remains in generating long, aligned outputs. This limitation stems from a training gap where pre-training lacks effective instructions for long-text generation, and post-training data primarily consists of short query-response pairs. Current approaches, such as instruction backtranslation and behavior imitation, face challenges including data quality, copyright issues, and constraints on proprietary model usage. In this paper, we introduce an innovative iterative training framework called Self-Lengthen that leverages only the intrinsic knowledge and skills…

  2. Related Broader context
    LongAgent: Scaling Language Models to 128k Context through Multi-Agent Collaboration
    Jun Zhao, Can Zu, Haotian Xu et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 42 times · Not summarized yet

    LongAgent extends models’ usable context through multi-agent collaboration, whereas RecurrentGPT generates arbitrarily long text by maintaining language-based memory across steps.

    Abstract

    Large language models (LLMs) have demonstrated impressive performance in understanding language and executing complex reasoning tasks. However, LLMs with long context windows have been notorious for their expensive training costs and high inference latency. Even the most advanced models such as GPT-4 and Claude2 often make mistakes when processing inputs of over $100k$ tokens, a phenomenon also known as \textit{lost in the middle}. In this paper, we propose \textsc{LongAgent}, a method based on multi-agent collaboration, which scales LLMs (e.g., LLaMA) to a context of 128K and demonstrates potential superiority in long-text processing compared to GPT-4. In \textsc{LongAgent}, a leader is res…

  3. Related Review
    Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey
    Yun-Peng Huang, Jingwei Xu, Zixu Jiang et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 137 times · Not summarized yet

    Advancing Transformer Architecture in Long-Context Large Language Models surveys methods for improving long-context capabilities, a neighboring problem to RecurrentGPT’s long-text generation.

    Abstract

    Transformer-based Large Language Models (LLMs) have been applied in diverse areas such as knowledge bases, human interfaces, and dynamic agents, and marking a stride towards achieving Artificial General Intelligence (AGI). However, current LLMs are predominantly pretrained on short text snippets, which compromises their effectiveness in processing the long-context prompts that are frequently encountered in practical scenarios. This article offers a comprehensive survey of the recent advancement in Transformer-based LLM architectures aimed at enhancing the long-context capabilities of LLMs throughout the entire model lifecycle, from pre-training through to inference. We first delineate and an…

  4. Related Shared data, tool or method Uses this paper in depth
    LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
    Yushi Bai, Xin Lv, Jia-Jie Zhang et al. · 2023 · Annual Meeting of the Association for Computational Linguistics · cited 1,907 times · Not summarized yet

    LongBench provides a bilingual multitask benchmark for long-context understanding, while RecurrentGPT focuses on generating long text rather than evaluating understanding.

    Abstract

    Although large language models (LLMs) demonstrate impressive performance for many language tasks, most of them can only handle texts a few thousand tokens long, limiting their applications on longer sequence inputs, such as books, reports, and codebases. Recent works have proposed methods to improve LLMs' long context capabilities by extending context windows and more sophisticated memory mechanisms. However, comprehensive benchmarks tailored for evaluating long context understanding are lacking. In this paper, we introduce LongBench, the first bilingual, multi-task benchmark for long context understanding, enabling a more rigorous evaluation of long context understanding. LongBench comprise…

  5. Related Another approach to the problem
    Learning to Reason for Long-Form Story Generation
    Alexander Gurung, Mirella Lapata · 2025 · arXiv.org · preprint, not peer reviewed · cited 41 times · Not summarized yet

    Learning to Reason for Long-Form Story Generation trains story-generation skills using reinforcement learning, while RecurrentGPT simulates recurrent memory to sustain long-form output.

    Abstract

    Generating high-quality stories spanning thousands of tokens requires competency across a variety of skills, from tracking plot and character arcs to keeping a consistent and engaging style. Due to the difficulty of sourcing labeled datasets and precise quality measurements, most work using large language models (LLMs) for long-form story generation uses combinations of hand-designed prompting techniques to elicit author-like behavior. This is a manual process that is highly dependent on the specific story-generation task. Motivated by the recent success of applying RL with Verifiable Rewards to domains like math and coding, we propose a general story-generation task (Next-Chapter Prediction…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 5 November 2026.

The illustrated guide to the papers around a paper

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.