← All posts

Behind the GM: How We Prompt Claude to Run Your Adventures

Blind Savage

Behind the GM: How We Prompt Claude to Run Your Adventures

Lines of glowing prompt text behind a futuristic GM screen

Every time you take an action in EchoQuest, Claude receives a carefully structured prompt and generates a response. That prompt is the product of months of design work — testing, iterating, and tuning until the AI GM behaved the way a great human GM would. Most players never see the prompt; they just experience the output. We think the work is interesting on its own terms, and being transparent about how it operates is part of building trust with players who care about how their stories are made.

This post is a guided tour of the system prompt that powers the AI Game Master. Some specifics are abstracted (the literal prompt is a moving target and includes details we keep private for safety reasons) but the structural choices are public, and we explain why each one is the way it is. If you're a developer building AI applications, the patterns below generalise. If you're a player, you'll come away with a much clearer picture of what the GM is doing on your behalf.

The Structure of a GM Prompt

Before Claude sees your action, it receives a system prompt that contains several components:

Identity and role. The GM is told explicitly what it is: a skilled, empathetic Game Master running a collaborative RPG. It's told its primary job is to make the player feel capable and engaged while maintaining narrative stakes. We invest a lot of time in this section because the model's self-conception shapes everything else. A GM that thinks of itself as "an AI assistant answering a question" will produce different output than one that thinks of itself as "a Game Master running a session for someone they care about." The framing isn't decorative; it's structural.

World context. The entire Game Bible — your world's lore, factions, tone, rules, and constraints — is embedded in the prompt. This is what makes the AI behave consistently with your world rather than defaulting to generic fantasy tropes. The Bible is summarised down to a dense, AI-friendly format before being injected; what the model sees is a structured representation, not the raw uploaded document. This pre-processing keeps the context window efficient and the model's grasp of the world precise.

Character information. Your character's name, class, backstory, current stats, inventory, and any story flags set by previous choices are included. The GM knows who you are, what you've done, and what your character cares about. Backstory is read carefully — a backstory mentioning a sister is the kind of detail the GM will weaponise, dramatically, when the right scene comes up.

Location and current state. Where you are right now, what's around you, and what the AI's current "scene state" is (time of day, active NPCs, recent events). Location is re-injected on every turn; the GM doesn't have to remember it from earlier in the conversation history because the system supplies it fresh.

Recent conversation history. The last several exchanges between you and the GM, so it has immediate context without reading the entire session history. Older exchanges are condensed into a structured summary that captures the meaningful events without using up context window space on routine narration.

Structured game state. A compact representation of HP, conditions, faction reputations, NPC dispositions, and any story flags. This is the most important consistency tool we have. Rather than relying on the model to remember "you were rude to Sera Volant last session," we explicitly tell the model "current disposition of Sera Volant: cool, +1 (warmed slightly when you returned the locket)." The model doesn't have to remember; it just has to honour what's already written down.

Instructions for output format. The GM is told to produce structured output: narration, choices, any state changes, any sound cues. This structured output is what allows EchoQuest to update the game state, trigger sounds, and update your character sheet automatically. The model produces both prose (for the player) and structured data (for the engine) in the same response.

What We Ask the GM to Do

Mist drifting through a dark, ancient mirewood

Beyond the factual context, we give the GM explicit behavioural instructions:

  • Respond to the spirit of the player's action, not just the letter. If the player says "I throw my drink in his face," they're communicating intent (provocation, disrespect, escalation), not asking for a literal physics simulation
  • Never say "I can't do that" — always interpret the action charitably and find a way to respond. The AI's first instinct is sometimes to refuse; we explicitly forbid this
  • Vary sentence length and rhythm; avoid repetitive sentence structures. Without this nudge, AI prose tends toward a uniform medium-length sentence cadence that becomes hypnotic in a bad way
  • Use sensory detail — what the player hears, smells, and feels, not just sees. For an audio-first platform this is doubly important; visual-only descriptions translate poorly to narration
  • End narration at a moment of tension or decision, not resolution. The player should always have something to do
  • Maintain NPC consistency — the same character should speak and behave the same way across scenes. Use the structured game state to verify
  • Honour the player's stated tone preferences. If the player has said they want a tragedy, don't soften the blows
  • "Play to find out what happens" — borrowed from Apocalypse World. Don't push the player toward a predetermined outcome

What We Ask the GM Not to Do

  • Don't kill characters without clear player agency unless the player has set high difficulty. Even then, give the player a chance to escape
  • Don't railroad — if the player wants to go somewhere or do something the story didn't anticipate, follow them. The "story" is whatever happens; it isn't a path the player must walk
  • Don't repeat information the player already knows just to pad narration. The GM should trust the player's memory
  • Don't use the word "suddenly" (a classic bad writing crutch that AI models love). Other banned words and phrases include "in a way that," "a sense of," and excessive use of "perhaps"
  • Don't make the world feel hostile to the player's creative choices. When the player does something unexpected, the GM should be visibly delighted, not annoyed
  • Don't give NPCs the same speech rhythms or vocabulary. Each NPC should sound different
  • Don't apologise mid-scene. If something needs to be different, the player can tell the GM out-of-character; the GM's narration should never break frame to express AI-style hedging

The Ongoing Refinement

Sunlit trails winding through a lush green forest

We tune the prompt continuously based on player feedback. When players report that the GM made an unfair ruling, forgot something important, narrated inconsistently, or fell into a particular bad pattern (overusing certain words, defaulting to certain story shapes), we investigate whether the prompt is responsible and update it if so. The fixes propagate to every player simultaneously.

Some examples of recent changes: we noticed the GM was ending too many scenes with a question to the player, which felt formulaic. We added an explicit instruction to mix scene endings (sometimes a question, sometimes an action beat, sometimes a silence). We noticed NPCs were drifting toward similar speech patterns over long sessions. We added explicit per-NPC voice guidance to the structured state. We noticed difficulty was too uniform across campaigns. We added more nuanced difficulty tuning based on the player's stated preferences and the campaign's tags.

This is one of the advantages of a software-powered GM: we can improve every player's experience simultaneously by improving the instructions. A great human GM in a tabletop campaign improves only that campaign. A change to our prompt improves every campaign in EchoQuest from that point on.

What We Don't Promise

We're honest about limitations. The prompt can't make the model perfect. It can't fully eliminate the model's tendency to hedge under uncertainty. It can't give the model human emotional perception. It can't make consistency across hundreds of sessions automatic — we've engineered structured state to compensate, but the AI alone wouldn't manage it. Prompts are a powerful tool, not a magic wand. The GM gets better, year over year, both because the underlying models get better and because we keep refining the instructions. We expect the gap between AI GM and best-of-class human GM to keep narrowing for a long time.

Experience the GM yourself →