Wild West API

Mystery roleplay: making an AI run a fair whodunit

The difference between a mystery and random events is that the answer existed before you started. Models improvise by nature, so you have to fix the answer in place.

A photograph that sets the mood for mystery roleplay
Photo by Suhash Villuri on Unsplash

What a mystery requires

A fair mystery means the culprit, motive and method are set before play, and every clue points at them. Suspects have to lie consistently, with each lie covering something specific. The model also has to resist two urges at once: making the solution up on the spot, and giving it away. Cozy mysteries need warmth and gossip; darker ones need murder scenes described with enough forensic detail to deduce from.

Where filtered models fail

Mainstream models make mysteries easy, because being helpful means answering questions. Ask a suspect where they were and they tell you, with a hint of guilt. Ask the narrator about the body and you get "a tragic scene" rather than the detail you need to notice the wrong shoe. Some refuse to describe a murder scene concretely at all. Worst, they improvise the culprit at the end to fit whatever you guessed, which makes the deduction meaningless.

Locking the solution in

  • Write a case file. Culprit, motive, method, timeline, and for each suspect: what they hide and why. Put it in an always-active lorebook entry marked as secret.
  • List the clues. Six to ten clues, each tied to a location or person. Tell the model clues are found only by searching or asking the right person.
  • Give every suspect a secret. Innocent suspects lying about something unrelated make the best red herrings.
  • Do not peek. If you want a surprise, have a friend write the case file, or ask the model to generate it in a separate chat and paste it in unread.

Sample game master prompt

You run a murder mystery. The CASE FILE in the lorebook is fixed and true.
Never change the culprit, motive or timeline, whatever {{user}} guesses.
Suspects answer in character. Each lies only about their secret, and lies
consistently. Clues are revealed only when {{user}} searches the right place
or asks the right person. Describe crime scenes with concrete, observable
detail. Never hint at the solution. Never write {{user}}'s actions.

Samplers and model choice

  • Temperature 0.7. Mysteries punish inconsistency more than any other genre.
  • Min-p 0.1.
  • Repetition penalty 1.0 to 1.03. Suspects repeating their alibi word for word is fine, even useful.

This is the clearest case for glm-5.3-outlaw. Holding a hidden timeline steady while several characters lie about parts of it is a reasoning task, and the full GLM 5.3 is the strongest model on the line for it. outlaw-1 works for cozy mysteries with simpler cases and costs much less per session.

Failure modes and fixes

  • The culprit changes. The case file is not in context. Check that the lorebook entry is set to always active.
  • Suspects confess too easily. Tell the model suspects confess only when confronted with two pieces of hard evidence.
  • Clues arrive unprompted. Add "the narrator never volunteers clues".
  • Accusations always succeed. State that a wrong accusation has consequences.

FAQ

How do I stop the AI from changing the killer to match my guess?

Write a fixed case file into an always-active lorebook entry and tell the narrator it is true and must never change. Lower temperature to around 0.7.

Which model is best for mysteries?

GLM 5.3 Outlaw. Keeping a hidden timeline consistent while several characters lie is a reasoning job, and it is the strongest on the line. Outlaw 1 is fine for simpler cozy cases.

Can the model describe a murder scene in detail?

Yes, fictional violence between adult characters is allowed, and concrete crime scene detail is what makes deduction possible.

Related

Uncensored AI models on one key

OpenAI and Anthropic compatible, pay as you go. New to it? Start with uncensored AI, explained.