Papers
Topics
Authors
Recent
Search
2000 character limit reached

Claude Sonnet 3.7: Story Generation LLM

Updated 22 June 2026
  • Story Generation LLM (Claude Sonnet 3.7) is an interdisciplinary system that integrates neural text modeling, structured planning, and reinforcement learning to produce coherent and stylized narratives.
  • It employs a plan-and-write approach with explicit outline planning, using ASP and multi-agent orchestration to bridge high-level narrative structure and micro-level generation.
  • Advanced reward engineering, dynamic context management, and branching story graph techniques enhance narrative diversity, long-range coherence, and interactive storytelling.

Story generation with LLMs, such as Claude Sonnet 3.7, is an interdisciplinary research area that combines neural text modeling, structured planning, computational narratology, reinforcement learning, and multi-agent orchestration. Approaches in this domain aim to produce long-form fiction with coherence, creativity, stylistic control, and often, interactive branching. Recent works rigorously investigate architectural, algorithmic, and evaluation aspects of LLM-driven story generation pipelines, addressing open challenges in diversity, global coherence, character motivation, and style fidelity.

1. Foundations and Problem Formulation

Story generation with LLMs entails the automated production of narratives—typically multi-paragraph, thematically coherent, and reader-engaging text—conditioned on a prompt or structured plan. The dominant paradigm models the LLM as a stochastic policy πθ\pi_\theta over sequences of text tokens τ=(x1,,xT)\tau = (x_1, \ldots, x_T), often optimized to maximize task-specific expected rewards or fit human-annotated corpora (Liu et al., 5 Dec 2025). Pipelines are generally divided into outline generation (high-level structural planning) and text realization (surface-level generation). Evaluation criteria, informed by computational narratology, include causal soundness, character intentionality, dramatic conflict, content coherence, and stylistic alignment (Wang et al., 11 Jun 2025).

2. Architectural Patterns: Planning and Guidance

Modern LLM-based story systems frequently adopt a “plan-and-write” architecture, with explicit separation between macro-structural design and micro-level surface realization (Shi et al., 5 Aug 2025, Wang et al., 2024, Bae et al., 2024). Key components include:

  • Outline Planning: Outlines are constructed via symbolic approaches (e.g., Answer Set Programming, ASP) (Wang et al., 2024), multi-agent negotiation (Shi et al., 5 Aug 2025), or iterative human/LLM critique (Bae et al., 2024). Outlines encode narrative functions—introduction, conflict, twists, resolution—subject to constraints on order, diversity, and causal/logical plausibility.
  • Guided Generation: Given an outline, LLMs sequentially generate corresponding narrative segments, maintaining alignment with the prescribed structure. In interactive and branching applications, a story graph formalism encodes narrative chunks as nodes, edges as choices, and nodes maintain both surface text and auto-generated summaries to manage long-range dependencies (Taveekitworachai et al., 2024).

These architectures enable decoupling content planning from realization, reduce repetition, and facilitate fine-grained control over story structure and diversity.

3. Reinforcement Learning and Reward Engineering

Reinforcement learning (RL) techniques, especially variants of Proximal Policy Optimization (PPO), have been adapted to the stylistic and content-driven tuning of story generation models (Liu et al., 5 Dec 2025). Group Relative Policy Optimization (GRPO) replaces the global baseline with a groupwise (per-prompt) baseline to reduce variance and balance exploration:

LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]

with A^i=Ribk\hat{A}_i = R_i - b_k for ii in prompt group GkG_k, and bkb_k the mean reward in GkG_k.

Reward design is multi-component:

  • Style reward: Derived via authorship verification metrics (e.g., FT-all-distilroberta-v1 cosine similarity, mapped by a calibrated sigmoid) to measure stylistic alignment.
  • Content reward: Scored via a rubric-driven external LLM (e.g., openchat-3.5-0106), normalized.
  • Completeness reward: Assesses word count fidelity and sentence boundary closure.

Aggregate reward: Rtotal(y^)=αRstyle+βRcontent+γRcompR_\text{total}(\hat{y}) = \alpha R_\text{style} + \beta R_\text{content} + \gamma R_\text{comp}, with empirically tuned weights (e.g., α=0.6\alpha=0.6, τ=(x1,,xT)\tau = (x_1, \ldots, x_T)0, τ=(x1,,xT)\tau = (x_1, \ldots, x_T)1).

GRPO-trained mid-sized LLMs (e.g., 8B parameters) can outperform much larger baselines (GPT-4o, Claude Sonnet 4) on style metrics while maintaining competitive content performance (Liu et al., 5 Dec 2025).

4. Symbolic and Hybrid Guidance Mechanisms

Symbolic systems, notably ASP-guided pipelines, precompute a large, diverse pool of narrative outlines. At generation time, outlines are mapped to paragraph-level writing instructions and served sequentially to the LLM (Wang et al., 2024). Explicit constraints encode narrative pacing, scene diversity, and function ordering, realized via minimal ASP programs.

Diversity across generated stories is quantified as homogeneity (lower implies greater diversity):

τ=(x1,,xT)\tau = (x_1, \ldots, x_T)2

where τ=(x1,,xT)\tau = (x_1, \ldots, x_T)3 is the embedding of story τ=(x1,,xT)\tau = (x_1, \ldots, x_T)4, paragraph τ=(x1,,xT)\tau = (x_1, \ldots, x_T)5, and τ=(x1,,xT)\tau = (x_1, \ldots, x_T)6 is that paragraph's centroid.

ASP-guided LLMs robustly yield lower homogeneity (higher diversity) than direct prompting (average τ=(x1,,xT)\tau = (x_1, \ldots, x_T)7 reduction of τ=(x1,,xT)\tau = (x_1, \ldots, x_T)8), especially in later narrative segments; structural variation and plot inventiveness are thereby increased (Wang et al., 2024).

5. Multi-Agent Orchestration and Memory Management

Advanced pipelines leverage multi-agent structures to enhance long-form coherence and thematic anchoring (Shi et al., 5 Aug 2025). Core agent classes include:

  • Outline Generation Agents: Parallel agents produce "twist" and "plain" outlines, using both long-term (top-τ=(x1,,xT)\tau = (x_1, \ldots, x_T)9 thematic anchors) and short-term (recent outlines) memory.
  • Outline Selector: Computes outline similarity LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]0; high similarity triggers twist injection via narrative obstacles and knowledge graph updates.
  • Expansion Agents: Writer and reader simulators alternate draft and critique, supporting local revision.
  • Memory modules:
    • Long-term: top-LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]1 salient story elements, scored via LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]2.
    • Short-term: FIFO buffer of latest outlines.
  • Knowledge graph: Structured as LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]3, accumulates entities, obstacle nodes, and goal relations to ground and diversify narrative evolution.

These mechanisms mitigate theme drift, enhance narrative appeal, and systematize the incorporation of literary theory concepts.

6. Collective Critique and Creativity Enhancement

The CritiCS framework operationalizes collective revision by pooling multiple LLM-critic personas and a leader to refine story structure and wording (Bae et al., 2024). The system comprises two main stages:

  • CRPLAN: Three critics, each with a different creativity focus, propose plan modifications for several rounds; a leader selects actions maximizing a weighted combination of creativity and coherence until a final plan is evaluated and chosen.
  • CRTEXT: Text refinement proceeds by segment-level rewriting: two critics (imagery, voice) provide parallel rewrites, with selection by a leader. Side-by-side human evaluation demonstrates substantial improvement in interestingness (85.0% win rate), creativity (84.3%), and coherence (77.9%) compared to baseline pipelines.

CritiCS supports human-in-the-loop authorship by making critic roles visible and editable, enabling interactive steering and deeper engagement in the revision process.

7. Branching Story Structures and Context Management

To support non-linear, choice-based narrative systems (e.g., visual novels), DCP/P organizes stories as directed graphs of "story chunks" with explicit context history tracking (Taveekitworachai et al., 2024). Key features:

  • Node structure: Each chunk records narrative content, auto-summaries, parent relations, and outgoing choices.
  • Dynamic context: Chunk-level context windows are managed with rolling truncation and stored summaries, maintaining relevant history within the LLM's token limits (e.g., LGRPO(θ)=Ei[min(riA^i,clip(ri,1ϵ,1+ϵ)A^i)]L^\mathrm{GRPO}(\theta) = -E_i\left[ \min\left(r_i \hat{A}_i, \operatorname{clip}(r_i, 1-\epsilon, 1+\epsilon) \hat{A}_i\right) \right]4).
  • Prompt templates: JSON-structured prompts stipulate input and output formats, with retries for format validation.
  • Evaluation: LLM-judge rates on coherence, inspiration, fluency, readability, and word complexity, averaged per chunk and game; sentiment analysis quantifies tone balance.

DCP/P yields ≈25% more story chunks per game and higher coherence/inspiration scores versus non-contextual baselines. Maintaining explicit, multi-level summaries and structured retrieval is critical for long-range coherence in branching stories.

8. Evaluation Paradigms and Open Challenges

Evaluation integrates both automatic (embedding-based metrics; rubric grading; ASP validation) and human measures (pairwise interestingness/coherence/creativity win rates; Likert scales; side-by-side preference) (Liu et al., 5 Dec 2025, Wang et al., 2024, Bae et al., 2024, Taveekitworachai et al., 2024). ASP-based validation enables objective testing for causal soundness, intentionality, and conflict in narrative planning (Wang et al., 11 Jun 2025).

Common challenges include:

  • Global coherence and resolution: Long-range dependencies exceed LLMs' local context windows, leading to narrative drift and weak endings (Liu et al., 5 Dec 2025, Taveekitworachai et al., 2024).
  • Evaluation signal noise: Automated content scoring remains brittle, suggesting a need for more robust critics or hybrid human feedback (Liu et al., 5 Dec 2025).
  • Stylistic mimicry vs. content quality: High stylistic fidelity may inversely correlate with logical completeness and plot closure (Liu et al., 5 Dec 2025).
  • Parameter scaling limits: Larger LLMs do not always outperform smaller, RL-fine-tuned models on specialized style or diversity metrics (Liu et al., 5 Dec 2025).

Ongoing research centers on richer reward design, hybrid knowledge-integration, dynamic context scaling, and more sophisticated narrative planning under partial observability and user intervention.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Story Generation LLM (Claude Sonnet 3.7).