Skip to content

Back to the catalog

Scaling Long-Form Story Generation via Narrative State Tracking
arxiv.orgpaper

Scaling Long-Form Story Generation via Narrative State Tracking

This paper introduces NstAgent (Narrative State Tracking Agent), a training-free agentic framework that lets LLMs maintain a structured narrative state — characters, past events, and future requirements — to sustain consistency when generating full-length novels. The authors extend an existing narrative-consistency benchmark and pair it with a writing-quality benchmark to evaluate stories from 10K to 100K words, showing that NstAgent's consistency and quality do not degrade as length increases, unlike prior methods limited to ~10K-word stories.

TL;DR A training-free agent that tracks structured narrative state lets LLMs generate consistent, high-quality stories up to 100K words without quality degradation.
Document

What it claims

On DeepSeek-V4-Flash, NstAgent keeps narrative consistency and writing quality roughly flat from 10K to 100K words, while the rolling-summary baseline (RollSum) degrades. Figure 1 annotates Instance CED (contradictions per 10K words, lower is better) at 7.24 for NstAgent vs 11.82 for RollSum, and WritingBench quality at 9.20 vs 8.96. The extracted text does not say which target length these annotated values belong to. The authors also claim total cost grows roughly linearly with length. A secondary contribution is a fix to ConStory-Bench so that consistency scores can be compared across lengths.

How it works

  • Phase 1: a planner writes a premise and a chapter outline. Each chapter gets a title, a description and a target word count, and the chapter count is tied to the target length. The outline is then frozen.
  • Phase 2: chapters are written one at a time. The chapter prompt contains only the story prompt, the full outline, the current state serialized as JSON, and the chapter task. It contains no earlier chapter text, so context size does not grow with the amount already written.
  • State: the state has three typed, keyed parts, each edited incrementally rather than regenerated:
  • character states (upserted)
  • past events (appended)
  • future requirements such as foreshadowing, suspense and commitments (added, then resolved)
  • Tools, each with a fixed budget:
  • read(i) returns a full earlier chapter.
  • search(q) returns BM25-ranked sentence windows.
  • correct(i, old, new) patches an exact span in a current or earlier chapter. It may fix continuity only, not style.
  • write(t, title, content) is the only way to submit a chapter. It rejects drafts outside the ±20% word band and reports the actual count. Rejections do not consume the chapter's one successful write.
flowchart TD
  S[State t + outline] --> W[Draft chapter]
  W -.optional.-> T[search / read / correct]
  T -.-> W
  W --> G{Within ±20% words?}
  G -- no, count reported --> W
  G -- yes --> U[Single state update]
  U --> S2[State t+1]
  S2 --> S

Evidence

  • Why one-pass generation fails: at 10K words, only 21% of DeepSeek-V4-Flash first attempts and 74% of GPT-5.6 Luna first attempts land inside the ±20% band. An accepted story costs 1.9 and 1.3 calls respectively.
  • Knowledge-graph baseline cost: DOME issues "thousands of memory calls per story" even at 10K words. Its released code fixes the story to five acts, so it was evaluated only at 10K.
  • Evaluation artefact: when the judge scores the full story, CED falls by about 40% from 20K to 50K words and again from 50K to 100K, even for an earlier version of the agent. The cause is limited judge recall over long text, not better writing.
  • The fix: a scope marker is placed before the last 10, 7–8, 5 and 4 chapters at 10K, 20K, 50K and 100K words, out of 10, 15, 25 and 40 chapters. The judge only reports contradictions that surface after the marker, but uses all earlier text as evidence. Both Subtype CED and Instance CED are reported.

How to use it

Code and data are at https://github.com/zhennan1/NstAgent. The method is training-free and works with any tool-calling LLM. The fetched text gives no install commands and no licence.

Limits

  • The fetched text is truncated mid-method. Per-model tables, the cost table (Table 4) and the ablations are not visible, so the linear-cost claim is stated here without its numbers.
  • At long lengths the comparison shown is only against RollSum. DOME was tested at 10K only.
  • All scores come from LLM judges.
  • The outline is frozen, so the plan cannot adapt to developments that arise during writing; only the state does.
  • The writing-quality gap is small (9.20 vs 8.96).

Organisations named here

  • NstAgent

Techniques named here

  • Narrative State Tracking Agent