If you have tried writing a book with ChatGPT or any generic AI, you have probably experienced something frustrating: the AI "forgets" what happened in previous chapters. The protagonist who lost an arm in chapter 5 appears wielding his sword in chapter 18. The city destroyed at the climax resurfaces in the epilogue. The antagonist adopts contradictory motivations depending on the chapter.
This is not a bug or an oversight. It is a structural consequence of how large language models work. And it is exactly the problem that YourNovel.app's Holistic Memory was designed to solve.
The Technical Problem: AI Amnesia
Language models like GPT-4 or Claude process text within what is called a "context window": the piece of text the AI can "read" and take into account at any given moment. Although modern models have windows of 100k–200k tokens, this is not enough for a 100,000-word book for two reasons:
1. The "Lost in the Middle" Problem
Academic research (Liu et al., 2023, "Lost in the Middle: How Language Models Use Long Contexts") showed that even when a document fits in the context window, the model's attention deteriorates for content located in the middle of the document. The model pays good attention to the beginning and end, but "forgets" what is in the middle — exactly where most of your novel lives.
2. The Prohibitive Cost of Full Context
Injecting 80,000 words of previous text into every API call to generate 1,000 new words would result in API costs of hundreds of euros per book, with minute-long latencies per generation. Not viable.
The Solution: Three Layers of Memory
YourNovel.app's Holistic Memory solves both problems with a three-layer architecture:
Layer 1: Global Story Bible (L1)
A structured database automatically updated with each generated or imported section. Contains:
- Character profiles: name, appearance, personality, relationships, development arc.
- Locations: description, history, narrative relevance.
- Significant objects: description, owner, plot importance.
- World rules: magic, technology, history, geography.
- Timeline: major events in chronological order.
This Bible is NOT a text document the user fills in manually. It is an automatic extractor: the AI reads what you write and updates the Bible without human intervention.
Layer 2: Micro-Structured Outline (L2)
A four-level hierarchy:
- Part (main narrative arc)
- Chapter (major narrative unit)
- Scene (unit of action or dialogue)
- Segment (minimum generation unit, ~500–1,500 words)
Each segment has: concrete narrative objective, what must change at this point in the story, target tension (rises/falls/holds), and target word count.
Layer 3: Dynamic Context Window (L3)
The technical core of the system. For each generation call, the context assembler:
- Selects relevant elements from L1 (characters appearing in this scene, location, objects involved).
- Includes the narrative objective of the current segment from L2.
- Adds the N most relevant preceding chapters/scenes (those with the greatest thematic overlap with the current segment).
- Packages everything into a structured prompt that the AI processes alongside a strict system instruction.
The result: every generation has access to all relevant information about the work, without injecting the full text. Perfect coherence at a fraction of the cost.
Why It Matters in Practice
The difference between writing with and without Holistic Memory is the difference between construction with blueprints and construction without them.
Without Holistic Memory, a generic AI can write fluent prose and individually acceptable chapters. But by chapter 20, it has forgotten the narrative commitments from chapter 3. By chapter 40, secondary characters are virtually strangers. The book becomes internally inconsistent.
With Holistic Memory, chapter 40 knows exactly what happened in chapter 3 that is relevant to the current scene. Secondary characters maintain their voice and motivations. Secondary plots close at the right moments. The final reader does not perceive the seams.
Can Holistic Memory Be Used for My Own Writing?
Yes. YourNovel.app's Author Assistant (free, no registration) applies the same Holistic Memory system to manuscripts the user has already written. You can import your draft in DOCX or TXT and the system will automatically extract your character Bible, detect inconsistencies, and allow you to continue with full awareness of everything you have written before.