Skip to main content

Multi-Turn AI Conversation Flow Designer

Design multi-turn AI conversation flows for chatbots, wizards, and interactive assistants with state management and branching logic.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
Design a multi-turn conversation flow for an AI onboarding wizard that helps users set up their development environment and first project. Requirements: 1) Map out 8-12 conversation turns with branching paths, 2) Define state variables tracked across turns (language, framework, experience_level, os, project_type, completed_steps), 3) System prompt that establishes context and personality, 4) Each turn: user intent detection → response template → next state, 5) Handle interruptions (user changes topic, asks unrelated question), 6) Graceful fallback when AI is uncertain or user input is ambiguous, 7) Summary/confirmation step before taking action, 8) Conversation memory management — what to keep vs forget, 9) Exit points and handoff to human criteria, 10) Mermaid flowchart diagram of the full conversation tree. Platform: Claude API with tool_use. Include example conversation transcript for beginner setting up a React project on macOS.

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.

Frequently Asked Questions

Does this build the chatbot or just design the flow?
It designs the conversation flow — turns, state, branching, and handoff logic — plus a diagram and example transcript, not the running application. You still implement the flow on your `[platform]`, but the design gives you the state machine and templates to build against.
How does it keep track of context across turns?
Through the `[state_vars]` you define, which list exactly what the assistant remembers between turns. It also includes memory-management rules for what to keep versus forget, so context persists without the prompt growing unbounded across a long conversation.
What happens when a user goes off the happy path?
The flow includes explicit interruption handling for topic changes and unrelated questions, plus graceful fallbacks when input is ambiguous. The `[happy_path]` is only the example transcript; real users diverge, so the branching paths and fallbacks are what keep the assistant usable.
When should the assistant hand off to a human?
The prompt defines escalation criteria and exit points so the assistant defers to a human when it is uncertain or the task exceeds its scope. Planning these handoff points up front is what prevents the assistant from flailing on cases it cannot resolve.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in AI Prompt Engineering Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support