SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.13304 · 2023

RecurrentGPT: Interactive Generation of (Arbitrarily) Long Text

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2305.13304.json · badge: /api/ran/2305.13304.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
aiwaves-cn/recurrentgpt canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
jackaduma/Recurrent-LLM community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
FunctionStatusWhere it lives
auto_configure_device_map Ran
ran on a synthesized input
jackaduma/Recurrent-LLM/models/chatglm_hf.py
code served (permissive licence) · get_code("659a53436088847b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes num_gpus (int) and use_lora (bool)
# Looking at the body:
# - num_gpus is used in division and comparison
# - use_lora is not actually used in the function body, but we still need to provide it

ARGS = {
    'num_gpus': 2,
    'use_lora': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_input_text Ran
ran on a synthesized input
jackaduma/Recurrent-LLM/prompts/llm_query.py
code served (permissive licence) · get_code("8084244bb4ab9a1e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Set seed for reproducibility
torch.manual_seed(0)

# Define arguments for get_input_text function
ARGS = {
    'lang_opt': 'en',
    'short_memory': 'The protagonist is a young scholar who discovers an ancient library. The library contains forbidden knowledge about a forgotten civilization. The scholar meets a mysterious guardian who protects the library secrets. The story begins with the scholar\'s first encounter with the guardian.',
    'input_paragraph': 'The scholar pushed open the heavy oak door, dust particles dancing in the shaft of sunlight that streamed through the narrow window. Inside, towering shelves stretched from floor to ceiling, laden with countless volumes bound in aged leather. The air was thick with the scent of old paper and forgotten stories. A figure emerged from the shadows, cloaked in robes that seemed to absorb the light around them. The guardian\'s eyes studied the intruder with ancient wisdom and barely concealed suspicion. "Few find their way here," the guardian spoke, voice like wind through a canyon. The scholar felt both fear and exhilaration course through their veins. The library hummed with an almost palpable energy, as if the books themselves were watching. Candles flickered along the walls, casting dancing shadows that seemed to tell their own stories. The scholar realized this was no ordinary place, but a repository of something far greater than mere knowledge.',
    'input_instruction': 'Write about the scholar attempting to gain the guardian\'s trust and learning about the first secret of the library. Show the scholar\'s growing fascination with the forbidden knowledge. Introduce hints about why this knowledge was hidden from the world.',
    'input_long_term_memory': 'Earlier chapters established the scholar\'s background as an outcast from the academy. The scholar has been searching for this library for years based on cryptic clues found in discarded manuscripts. Other scholars have gone mad trying to find this place. The guardians of the library have been protecting it for centuries against those who would misuse its power.',
    'new_character_prompt': 'A new character, the Archivist, may soon appear to guide the scholar further into the library\'s mysteries.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
init_prompt Ran
ran; our contract draft was wrong, not the code
aiwaves-cn/recurrentgpt/gradio_server.py
pointer only (licence: GPL-3.0) · get_code("ff5e90cad31f4931")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, aiwaves-cn/recurrentgpt, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_model Not yet run
unverified (harvested, no recorded run)
jackaduma/Recurrent-LLM/models/baichuan_hf.py
code served (permissive licence) · get_code("b4a265aa4d0ce85c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The fixed-size context of Transformer makes GPT models incapable of generating arbitrarily long text. In this paper, we introduce RecurrentGPT, a language-based simulacrum of the recurrence mechanism in RNNs. RecurrentGPT is built upon a large language model (LLM) such as ChatGPT and uses natural language to simulate the Long Short-Term Memory mechanism in an LSTM. At each timestep, RecurrentGPT generates a paragraph of text and updates its language-based long-short term memory stored on the hard drive and the prompt, respectively. This recurrence mechanism enables RecurrentGPT to generate texts of arbitrary length without forgetting. Since human users can easily observe and edit the natural language memories, RecurrentGPT is interpretable and enables interactive generation of long text. RecurrentGPT is an initial step towards next-generation computer-assisted writing systems beyond local editing suggestions. In addition to producing AI-generated content (AIGC), we also demonstrate the possibility of using RecurrentGPT as an interactive fiction that directly interacts with consumers. We call this usage of generative models by ``AI As Contents'' (AIAC), which we believe is the next form of conventional AIGC. We further demonstrate the possibility of using RecurrentGPT to create personalized interactive fiction that directly interacts with readers instead of interacting with writers. More broadly, RecurrentGPT demonstrates the utility of borrowing ideas from popular model designs in cognitive science and deep learning for prompting LLMs. Our code is available at https://github.com/aiwaves-cn/RecurrentGPT and an online demo is available at https://www.aiwaves.org/recurrentgpt.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2305.13304")
get_code_for_paper("2305.13304")
have("2305.13304")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2305.13304.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2305.13304.svg)](https://syntology.ai/paper/2305.13304)

Connect an agent — have() is free.