# Temporal Knowledge Graphs: Mapping 180k Words of Narrative

> Source: <https://promptcube3.com/en/threads/3524/>
> Published: 2026-07-26 04:01:40+00:00

# Temporal Knowledge Graphs: Mapping 180k Words of Narrative

The data reveals some wild contradictions: the Tin Woodman actually has the highest kill count in the series, despite being the character most prone to crying over a crushed beetle. Similarly, the system can track "state" edges—like a debt the Scarecrow owes a stork—that remain active across 92 chapters, something a standard LLM context window would likely lose track of.

## The AI Workflow and Architecture

Building this required more than a single prompt; it took five distinct multi-agent pipelines combining LLMs and NLP:

1. A global prescan and ontology construction.

2. Chapter-by-chapter graph extraction.

3. Retrospective validation across long spans of text.

4. A linguistic prescan for speech profiles.

To make this work as a real-world LLM agent deployment, the system uses three specific edge types to handle the dimension of time:

**Event:** Instantaneous actions.**Identity:** Fixed facts.**State:** Persistent actions that require a specific quote from the text to be marked as "terminated."

## Overcoming LLM Extraction Issues

A major hurdle in prompt engineering for knowledge graphs is "schema drift." If you let an LLM extract entities freely, it will invent new aliases and inconsistent fields for every chapter. The solution here is a mandatory ontology scan of the entire story first, which defines the entity and edge types before any extraction begins.

The system also introduces "epistemic nodes." Since stories rely on who knows what, these nodes capture different characters' perspectives on the same fact, moving beyond simple event-based mapping. This is a sophisticated way to handle narrative irony and secrets (the system identified 60 secrets in the first 100 chapters).

[Next DeepSeek vs US Labs: The Compute Gap →](/en/threads/3512/)
