SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.22828 · 2025

Learning to Reason for Long-Form Story Generation

arXiv · PDF · Open in the Atlas

Code that ran

15 of 15 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 14 have no contract verdict; 1 failure of our instrument; 0 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/2503.22828.json · badge: /api/ran/2503.22828.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
Alex-Gurung/ReasoningNCP canonical (classifier label)
classifier basis: plan_row
15 ran · 0 no recorded run
FunctionStatusWhere it lives
compile_prompt_components Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/prompt_utils.py
code served (permissive licence) · get_code("eafb4e8880093be5")
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)

ARGS = {
    'story_text': 'Chapter 1: The hero awakened in a mysterious forest. The trees were tall and ancient, their leaves shimmering with an otherworldly glow. As he took his first steps, he noticed strange footprints in the moss.',
    'prior_plot_summary': 'The hero was cursed by a dark sorcerer and must find the legendary artifact to break the spell.',
    'high_level_plot_summary': 'A young hero embarks on a quest to find a magical artifact that will save the kingdom from darkness. Along the way, he discovers allies and confronts his past.',
    'character_sheets': {
        'Hero': 'Name: Aldric\nAge: 25\nRace: Human\nClass: Warrior\nAbilities: Sword mastery, Leadership, Courage',
        'Mentor': 'Name: Eldwyn\nAge: 80\nRace: Elf\nClass: Wizard\nAbilities: Magic, Ancient knowledge, Guidance',
        'Ally': 'Name: Lyra\nAge: 22\nRace: Rogue\nClass: Thief\nAbilities: Stealth, Lock-picking, Deception'
    },
    'next_chapter_synopsis': 'The hero encounters a mysterious stranger in the forest who claims to know the location of the artifact. A tense negotiation ensues.',
    'next_chapter_header': 'Chapter 2: The Stranger in the Woods',
    'last_n_chapters': -1,
    'include_packed_story_text': 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
find_index_of_last_system_message Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/compute_baseline_ppls.py
code served (permissive licence) · get_code("d1241773b3d36cda")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

torch.manual_seed(0)

# Construct input_ids as a list of integers
# The function searches backwards through this list looking for special_token
# Let's create a list with the special_token somewhere in the middle
input_ids = [1, 2, 3, 4, 5, 100, 7, 8, 9, 10, 11, 12, 13, 14, 15]

# special_token is what we're searching for
special_token = 100

# offset_after_token: how much to add to the found index before returning
offset_after_token = 4

# end_offset: used in range calculation (len(input_ids) - end_offset - 1)
end_offset = 10

ARGS = {
    'input_ids': input_ids,
    'special_token': special_token,
    'offset_after_token': offset_after_token,
    'end_offset': end_offset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
find_index_of_last_system_message Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/ray_utils.py
code served (permissive licence) · get_code("a788a362d50886d9")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - input_ids: indexed with integer, compared with ==, has len()
# - special_token: compared with ==
# - offset_after_token: integer, added to i
# - end_offset: integer, used in subtraction

# Create a simple list of integers to represent input_ids
input_ids = [101, 102, 103, 104, 105, 50256, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115]

# special_token should be an integer that matches one in input_ids
special_token = 50256

# offset_after_token and end_offset are integers
offset_after_token = 4
end_offset = 10

ARGS = {
    "input_ids": input_ids,
    "special_token": special_token,
    "offset_after_token": offset_after_token,
    "end_offset": end_offset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
format_questions_and_answer_messages Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/chiron_utils.py
code served (permissive licence) · get_code("890e43429501c9fa")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# Construct valid arguments for format_questions_and_answer_messages
qsandas = [
    ("What is machine learning?", "Machine learning is a subset of artificial intelligence that enables systems to learn from data."),
    ("How do neural networks work?", "Neural networks process input data through interconnected layers to produce predictions."),
]

ARGS = {
    "qsandas": qsandas,
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
format_snippet_for_chiron_generation Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/chiron_utils.py
code served (permissive licence) · get_code("4503ae73cbd5819b")
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 re

regexspace = re.compile('\\ +', re.IGNORECASE)
regexlines = re.compile('(\\n(\\ )?)+', re.IGNORECASE)

def format_snippet_for_chiron_generation(snippet: str) -> str:
    """format the story section/snippet section of the CHIRON-generation prompt

    :param str snippet: the story snippet of interest
    :return str: section of the CHIRON Generation Module's prompt with the story snippet
    """
    template = 'Story Section:\n{snippet}'
    nice_snippet = snippet.strip()
    nice_snippet = regexspace.sub(' ', nice_snippet)
    nice_snippet = regexlines.sub('\n', nice_snippet)
    snippet_text = template.format(snippet=nice_snippet)
    return snippet_text


ARGS = {
    'snippet': '  Once upon a time,  there was a kingdom far away.  \n\n  The castle stood tall and proud.  \n  Many adventures awaited the brave heroes.  '
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
get_chiron_generation_question_text Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/chiron_generation_module_utils.py
code served (permissive licence) · get_code("13d0ee715209614e")
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.

ARGS = {
    'question': 'What are the main character traits of the protagonist?',
    'character': 'Chiron'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
get_chiron_simplification_format_prompt Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/chiron_simplification_utils.py
code served (permissive licence) · get_code("c937fb5a4df322d0")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.

from transformers import AutoTokenizer

# Create a minimal tokenizer stand-in that satisfies the function's needs
class MinimalTokenizer:
    def __call__(self, text):
        return {"input_ids": [101, 2054, 102], "attention_mask": [1, 1, 1]}
    
    def encode(self, text):
        return [101, 2054, 102]
    
    def decode(self, ids):
        return "decoded text"

# Define the arguments
ARGS = {
    "tokenizer": MinimalTokenizer(),
    "stats_and_simps": [
        ("The cat sat on the mat and it was warm.", "The cat sat on the mat. It was warm."),
        ("She went to the store, but the store was closed and she was disappointed.", "She went to the store. The store was closed. She was disappointed.")
    ],
    "cur_statement": "The author wrote a novel and it became a bestseller.",
    "tokenize": True,
    "using_system_role": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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_final_boolean_entailment_question Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/thought_chain_utils.py
code served (permissive licence) · get_code("a81c1a53e2d45ada")
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

ARGS = {
    'prior_reasoning': 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 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
get_final_entailment_question Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/thought_chain_utils.py
code served (permissive licence) · get_code("0ec444a145f8dcc3")
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

torch.manual_seed(0)

ARGS = {
    "prior_reasoning": 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 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
get_instruction_preamble Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/prompt_utils.py
code served (permissive licence) · get_code("1811631193a7c1e1")
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

ARGS = {
    'includes_high_level_summary': True,
    'includes_prior_plot_summary': False,
    'includes_character_sheet': True,
    'includes_next_chapter_summary': False,
    'last_n_chapters': 3
}
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
get_num_message_words Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/setup_rl_data.py
code served (permissive licence) · get_code("6575b299beb3916a")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

messages = [
    {'content': 'Hello world'},
    {'content': 'This is a test'},
    {'content': 'Python code example'}
]

ARGS = {
    'messages': messages
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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_section_text Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/thought_chain_utils.py
code served (permissive licence) · get_code("16a7e904fc8e6d4e")
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 re

regexspace = re.compile('\\ +', re.IGNORECASE)
regexlines = re.compile('(\\n(\\ )?)+', re.IGNORECASE)

def get_section_text(section):
    template = 'Story Section:    \n{section}'
    nice_section = section.strip()
    nice_section = regexspace.sub(' ', nice_section)
    nice_section = regexlines.sub('\n', nice_section)
    section_text = template.format(section=nice_section)
    return section_text

# The function takes a single parameter 'section' which is a string
# It performs string operations: strip(), regex substitution, and format()
# So we need to provide a string with some spaces and newlines

ARGS = {
    'section': "  This is a test section   \n\n  with multiple spaces  \n  and newlines  "
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
get_story_section Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/rl_training/prompt_utils.py
code served (permissive licence) · get_code("f599d52d4323a49c")
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
import numpy as np

# Define ARGS dictionary with valid arguments for get_story_section
ARGS = {
    "story_text": "Chapter 1: The hero awakens in a strange land. Chapter 2: The quest begins.",
    "last_n_chapters": -1,
    "include_packed_story_text": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
reward_fn Ran
ran; our contract draft was wrong, not the code
Alex-Gurung/ReasoningNCP/rl_training/train_ncp.py
pointer only (licence: MIT); the stored copy get_code serves, from miaoyuchun/inform, is pointer only (licence: NONE) · get_code("18ed61dcfadbbdf0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from miaoyuchun/inform, and GitHub detected no licence in that repository when it was checked. 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.

shorten_text_to_max_len Ran
ran on a synthesized input
Alex-Gurung/ReasoningNCP/setup_data/compile_dataset.py
code served (permissive licence) · get_code("2660750f248fdc8d")
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
import numpy as np

# Analyzing the function:
# - text: a string that will be split by '\n' and then by ' '
# - max_len: an integer threshold for word count

# The function splits text by newlines, processes them in reverse order,
# counts words in each line, and truncates if word count exceeds max_len

# Create test arguments
text_input = "hello world\nfoo bar baz\ntest line\nanother sentence here"
max_len_input = 10

ARGS = {
    'text': text_input,
    'max_len': max_len_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 14 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.

FunctionAlso present inEarliest-datedOthers named
reward_fn 4 other papers
1 dated earlier, 3 later
2204.05862 (2022-04)
Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback
2504.05185 (2025-04)
Concise Reasoning via Reinforcement Learning
2504.08837 (2025-04)
VL-Rethinker: Incentivizing Self-Reflection of Vision-Language Models with Reinforcement Learning
and 1 more not named here

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

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) and a reward formulation (Verified Rewards via Completion Likelihood Improvement) that allows us to use an unlabeled book dataset as a learning signal for reasoning. We learn to reason over a story's condensed information and generate a detailed plan for the next chapter. Our reasoning is evaluated via the chapters it helps a story-generator create, and compared against non-trained and supervised finetuning (SFT) baselines. Pairwise human judgments reveal the chapters our learned reasoning produces are preferred across almost all metrics, and the effect is more pronounced in Scifi and Fantasy genres.

For agents

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

get_harvested_code_for_paper("2503.22828")
get_code_for_paper("2503.22828")
have("2503.22828")

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

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

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

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

Connect an agent — have() is free.