Abstract
While Large Language Models (LLMs) have made significant strides in text generation, producing long-form, structured narratives remains a challenge. Current models often suffer from repetitive loops or fail to provide a proper narrative resolution, stopping abruptly when token limits are reached. This paper presents LongStory, a framework that utilizes a recursive paragraph generation approach enhanced by a dynamic Context Weight Calibrator (CWC) and granular structural markers (LSP). Our results demonstrate that LongStory significantly improves narrative completeness and coherence across stories of varying lengths, up to 10,000 tokens.
Introduction
Generating long-form stories requires maintaining a delicate balance between global plot consistency and local sentence-level flow. Existing solutions, such as expanding context windows, often fail to address two core issues:
- Coherence and Repetition: Recursive generation often leads models to over-prioritize immediate context, causing them to "forget" the broader narrative arc or enter infinite loops.
- The Completeness Gap: Most models lack a mechanism for narrative closure, resulting in stories that end mid-sentence or without resolution.
LongStory addresses these by treating storytelling as a structured process guided by both memory and position.
Methodology
The LongStory framework is built upon a BART-large base model, modified for recursive paragraph generation. Two primary innovations drive the system:
Context Weight Calibrator (CWC)
The CWC acts as a meta-controller, implemented via a BERT-tiny model. For each paragraph generated, the CWC dynamically calculates weights ($\beta$ and $\gamma$) to balance two inputs: the long-term Memory of the whole story and the immediate short-term Cheating context of the last few paragraphs.
Long Story Structural Positions (LSP)
To provide the model with a sense of narrative progression, we introduce expanded discourse tokens. Beyond simple "start" and "end" markers, LSP includes <front>, <middle>, <ending>, and <next_is_ending>. These tokens act as a "map," helping the model transition from plot development to conclusion.
Experimental Setup
The model was evaluated on three datasets representing different narrative scales: WritingPrompts (~768 tokens), Booksum (~6,065 tokens), and ReedsyPrompts (~2,426 tokens). Keywords were extracted using the RAKE algorithm to serve as plot-guiding inputs for the training process.
Results and Discussion
LongStory was benchmarked against Plotmachine, GPT-2, and BART across various paragraph counts.
Narrative Completeness
A key contribution of this work is the formalization of "completeness" as a metric. LongStory achieved a completeness score of 21.15 in 5-paragraph tests, significantly outperforming Plotmachine’s 2.47. This indicates that the LSP markers effectively guide the model toward a satisfying resolution.
Coherence and Repetition
The model consistently outperformed baselines in coherence across all tested lengths (5 to 50 paragraphs). By using "in-self-BLEU" to measure internal repetition, we found that LongStory generates more diverse content than standard recursive models, which often fall into repetitive patterns in long-form outputs.
Key Insights
Our ablation studies revealed that the importance of long-term memory versus short-term flow is not static. The CWC’s ability to automate this balance is crucial for maintaining narrative logic without sacrificing natural prose flow. Sticking too closely to keywords (as seen in augmented CWC experiments) can sometimes disrupt flow, highlighting the need for the calibrated approach.
Conclusion
LongStory provides a robust framework for generating long, coherent, and complete narratives. While the current model relies on pre-provided keywords, future work will explore integrating automated plot planning. Furthermore, applying these calibration techniques to larger-scale LLMs holds the potential to further enhance creative nuance and prose quality.
Summary updated