How Knowledge Graphs Stop Continuity Errors in AI Novels
How a novel knowledge graph tracks character states, settings and plot events and checks them before each chapter. Setup steps for 300,000+ character novels.
In this article 5 sections
What Is a “Continuity Error”?
“Continuity error” (literally “eating the book”) is web-novel slang for contradictions an author makes in the course of writing:
- A character clearly dies in chapter 5 and shows up again in chapter 20
- The protagonist’s master is called “Yun Feng” (“cloud peak”) in the first half and “Yun Feng” (“cloud blade”) in the second, a different character with the same sound
- The setting says Golden Core cultivators can fly, but in chapter 8 the protagonist, at the Golden Core stage, is walking to get somewhere
For a human author, keeping a million-character novel consistent from memory is extremely hard. For AI, the problem is worse: a large model’s context window is limited, and it cannot “remember” everything that has happened in the plot.

How a Knowledge Graph Works
A knowledge graph is a structured database of facts that records every “fact” established in the novel’s world:
Entity: Zhang San
- Type: character
- Current realm: Golden Core stage (updated in chapter 23)
- Current location: Azure Cloud Sect (confirmed in chapter 25)
- Items held: Dark Iron Sword, Qiankun Bag
- Known relationships: master = Daoist Yunfeng, enemy = Li Si
Entity: Dark Iron Sword
- Type: magic artifact
- Owner: Zhang San
- Acquired: chapter 12
- Ability: sharp + triple attack bonus
After each time AI generates new content, the consistency agent automatically extracts the newly appearing entities and events and updates the knowledge graph.
Three Layers of Protection
1. Retrieval Before Generation (RAG)
Before generating any chapter, the system retrieves the currently relevant setting information from the knowledge graph and injects it into the AI’s context:
“Currently known: protagonist Zhang San, Golden Core stage, at the Azure Cloud Sect, carrying the Dark Iron Sword...”
2. Checking After Generation
Once the content is generated, the consistency agent checks:
- Is the state of the entities mentioned in the new content consistent with what the knowledge graph records?
- Are there new events that need to be updated into the graph?

3. Conflict Alerts
If a contradiction is found, the system flags the conflict and asks the author to confirm, rather than silently letting it pass.
![]()
Real-World Results
Take a completed xuanhuan novel of 50 chapters and about 100,000 characters as an example:
| Consistency problem | Before | After using the knowledge graph |
|---|---|---|
| Contradictory character states | About once every 5 chapters | Almost none |
| Forgotten settings | Frequent | Very rare |
| Lost tracking of artifacts/items | Common | Tracked automatically |
Manual Maintenance and Automatic Updates
The knowledge graph supports two ways of maintenance:
- Automatic extraction: after AI generates content, the system identifies and updates the graph automatically (recommended)
- Manual editing: the author can add or edit any entry directly in the story bible management interface
During the early world-building stage, we suggest building the core settings by hand first; during day-to-day writing, automatic updates are enough.
