DOC employs a three-stage hierarchical decomposition approach for long-form narrative generation:
Stage 1: Premise Extraction
Generates high-level narrative premise P = (title, summary) from input constraints using few-shot prompting.
Stage 2: Hierarchical Plan Construction
Constructs structured representation Ī = (S, E, O) where:
⢠S: Setting description (spatiotemporal context)
⢠E: Entity set {eā, ..., eā} with attributes
⢠O: Recursive outline tree with depth d ⤠3
Stage 3: Conditioned Text Generation
Implements passage generation function G: O Ć C ā T where:
⢠Beam search over k candidates per node
⢠Reranking via coherence scoring function
⢠Context window C includes ancestor nodes + previous passages
Technical Architecture
The system addresses fundamental limitations in autoregressive generation through:
Hierarchical decomposition: O(log n) planning depth vs O(n) sequential generation
Explicit state tracking: Entity consistency across narrative distance
Controlled generation: Length control via outline node allocation
Reranking mechanism: Selection from k=5 candidates using relevance + coherence scoring
Implementation Details
Current deployment utilizes GPT-4 (temperature Ļ=0.8, top-p=0.95) with:
⢠Max tokens per passage: 500-800
⢠Outline depth: 2-3 levels
⢠Beam width k=5 for passage candidates
⢠Context window: 2-3 previous passages + relevant outline nodes