What this prompt does
This prompt designs a complete multi-turn conversation flow for an AI assistant — the state machine behind chatbots, wizards, and interactive assistants. Rather than a single response, it maps [turn_count] turns with branching paths, defines the state variables tracked across turns, and specifies for each turn how user intent is detected, which response template fires, and what the next state becomes. It handles interruptions, ambiguity fallbacks, a confirmation step before any action, conversation memory management, human-handoff criteria, and produces a Mermaid flowchart of the whole tree.
The variables shape the assistant and its flow. [assistant_type] and [goal] define what the assistant is and what it helps users accomplish. [turn_count] sets the expected conversation length, and [state_vars] lists exactly what is remembered across turns — language, experience level, completed steps, and so on. [platform] decides the deployment target, including whether tool-calling is available, and [happy_path] specifies the example transcript scenario so you can see the flow play out end to end for a concrete user.
When to use it
- You are building an onboarding wizard or support assistant that needs to remember context across turns.
- A flat single-prompt chatbot keeps losing track of state and you need explicit state management.
- Users change topics mid-conversation and the assistant needs graceful interruption handling.
- You want defined human-handoff points so the assistant escalates instead of flailing.
- Mapping a branching flow with
[turn_count]turns and visualizing it as a diagram for the team. - Planning a confirmation step before the assistant takes any consequential action.
Example output
Expect a turn-by-turn flow: each turn's intent detection, response template, and state transition, built around the [state_vars] you defined. It includes interruption and ambiguity handling, a summary-and-confirm step before action, memory-management rules for what to keep versus forget, escalation criteria for human handoff, a Mermaid flowchart of the full conversation tree, and an example transcript walking through your [happy_path] scenario from start to finish.
Pro tips
- Define
[state_vars]carefully — these are the assistant's memory, and a missing variable is the usual cause of a wizard asking the same question twice. - Plan the human-handoff points up front; deciding when to escalate is what separates a usable assistant from a frustrating dead end.
- Design the interruption handling for real, since users rarely follow the
[happy_path]and an assistant that breaks on a topic change feels brittle. - Keep a confirmation step before any consequential action, so the assistant summarizes and gets a yes before doing something it cannot undo.
- Be deliberate about memory management — keeping everything bloats context, while forgetting the wrong thing breaks continuity across
[turn_count]turns. - Use the Mermaid diagram to sanity-check branches; flows that read fine in prose often reveal dead ends or loops once drawn.