Urgent.News

What's breaking now, across hundreds of outlets.

AI

Preventing State Drift at Turn 15 in LLM Interactive Fiction: Architecture Notes & MCP Server

When we ran our reproducible 2026 10-App AI Story Benchmark (open data at Harvard Dataverse DOI 10.7910/DVN/YEBHQR and preprint at CERN Zenodo DOI 10.5281/zenodo.24549412 ), one engineering failure dominated every pure chatbot architecture: state drift by Turn 15 . Plant a concrete detail on Turn 2 ( "My cat's name is Marmalade" ) and ask for it unprompted on Turn 15: Open-ended persona chatbots…

In a study of the 2026 10-App AI Story Benchmark, state drift emerged as the primary engineering flaw in open-ended chatbot architectures at Turn 15. Even when a clear detail was planted early in the story, such as a cat named Marmalade, pure chatbots often failed to remember it by the 15th turn due to excessive summary compression and system prompt recency.

In contrast, structured story engines prevent this issue by maintaining canonical state separate from raw chat history, using an explicit ledger that isolates branches. To address this problem, the Three-Layer Architecture for Stateful Interactive Fiction was developed. This framework establishes fixed elements like cast, stakes, setting, and pacing at the top of the context, ensuring every branch maintains consistent tone and plot direction.

Branch-Scoped Memory Ledger enables structured fact extraction (add, update, retract) tied solely to the active branch's preceding turns, preventing leakage of alternate-timeline facts. The Reader-Steered Turn Interface combines curated choice points and custom free-text moves, feeding the same canonical state transition before presenting the next prose scene.

The project provides open-source tooling under the MIT license, including the Branching Story Kit (GitHub / PyPI / JSR) and the Branching Story MCP Server (Official MCP Registry). A Live Interactive Benchmark Explorer allows developers to test stateful branching narratives locally, and users can try a Reader-First Interactive Fiction for free, with 25 guest turns available without signing up.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

How to call Mark 1x-27B with the OpenAI Python SDK

I'm Saathwik, founder of Saanora, and I'm building Mark. This post is a short setup guide for Mark 1x-27B, our latest model, using the OpenAI Python SDK you probably already have.

  • Mark 1x-27B model available via OpenAI SDK
  • API compatible with OpenAI standards
  • Context window of 262K tokens

More from Friday 27 November →