Get to Know the Conversation Design Process
Learning Objectives
After completing this unit, you’ll be able to:
- Explain the four key phases of the conversation design lifecycle.
- Use the SPEAKING framework to discover the context for an AI agent’s conversation.
- Describe the role of conversation maps and prompt writing in the design phase.
- Explain why it’s important to test and revise AI agents.
A Lifecycle for Conversation
Designing a great conversation is a journey, not a one-time task. To manage this journey, you use a simple, iterative lifecycle with four key phases.
- Discover and Define
- Design
- Test and Evaluate
- Revise and Maintain
It’s like writing a script for a play: You start with research and ideas, write the script, rehearse it with actors, and then refine it based on feedback before and after opening night. This process helps you create a single, well-defined AI agent that can be used across your organization, making sure you have a consistent strategy.
Phase 1: Discover and Define
Before you write a single prompt, first understand the world your conversation will live in. The Discover and Define phase is all about research. You need to know who you’re designing for, what their goals are, and the rules of the conversation.
A powerful tool for this phase comes from linguistics: the SPEAKING framework. It’s an acronym that acts as a checklist to verify that you consider the entire conversational context.
-
Setting and scenario: Where and when will the interaction happen? Is the user on a mobile phone while walking, or on a laptop at their desk?
-
Participants: Who is the user? And who is the agent? This is where you define your agent’s persona, like a “friendly customer service assistant” or an “efficient IT helper.”
-
Ends: What is the goal? What does the user want to accomplish (such as get a weather forecast)? What does the agent need to achieve?
-
Act sequence: What is the logical order of the conversation? What does the user say first? What actions does the agent take? How should it reply?
-
Key: What is the tone or mood of the conversation? Formal, informal, serious, or humorous?
-
Instrumentalities: How is the conversation happening? Voice-only, text-based, or a mix of both with buttons and menus?
-
Norms: What are the social expectations for the conversation? For example, the agent should be polite and shouldn’t share personal information.
-
Genre: What type of conversation is this? Is it a quick Q&A, a troubleshooting session, or a complex booking process?
Scenario
A roadside assistance company creates an AI agent that can help customers find a towing service and connect customers to a service agent who can assist them further. The company uses the SPEAKING framework to fully define the context.
SPEAKING Framework |
Statement |
---|---|
Setting |
Customer driving home with their family |
Participants |
|
Ends |
|
Act sequence |
|
Key |
|
Instrumentalities |
|
Norms |
|
Genre |
|
Phase 2: Design
After discovery, your next step is to outline how the agent should behave. You’ll still use familiar design tools: sample dialogues, flow maps, and utterance analysis—but the purpose is different. In agentic design, these tools don’t script every response or intent. Instead, they help you shape the agent’s role, set its tone, and evaluate how well it reasons across different situations.
Write Sample Dialogues
In agentic design, sample dialogues show the qualities of a good response: voice, tone, and clarity—rather than fixed scripts the agent must follow.
These sample dialogues are scripts of ideal happy paths, successful conversations where everything goes right. This exercise helps you establish the agent's voice and tone. Keep in mind the key that you defined in the SPEAKING model and sketch out the basic back-and-forth of the interaction.
For example, a sample dialogue for a weather agent might look like this.
- User: What’s the weather today?
- Agent: In San Francisco, it’s currently 63 degrees and partly cloudy. Today’s high will be 71 with a low of 54 in the evening.
- User: Is it supposed to rain on Friday?
- Agent: There’s a 85% chance of rain on Friday, so you might need an umbrella.
This simple script makes the conversation feel real and serves as the foundation for a more detailed map.
Create a Conversation Design Map
In agentic design, conversation flow maps act as evaluation scaffolds, helping you test recovery paths and edge cases, not program decision trees.
A conversation design map is a visual of a conversation. It helps you plan for different ways the conversation might go, including what happens when things go wrong. This map is where you put your understanding of fundamentals like intent, utterance, and turns into practice.
Starting with your happy path sample dialogues, think about the ways that users can interact with the agent. What are their goals? What are the diverse ways that users express words and concepts? With that context in mind, think about turn design. How does a previous turn shape the current one, which then sets up what comes next?
For example, here’s a conversation design map for the sample weather agent.
Branches in your conversation design map indicate potential prompts and instructions that you must plan for in your agent. For example, the weather agent needs to consider:
- If there’s a severe weather event, how should the response change?
- What if the user asks about rain further in the future? What if they ask about snow?
- How should the agent respond if there’s 0% chance of precipitation? 15% chance?
- What if there’s an error and the agent can’t access current weather information?
Craft Effective Prompts and Instructions
With your map as a guide, begin writing the prompts that instruct your AI agent. In an agentic world, you don’t write the AI's exact responses. Instead, you prompt the agent on how to generate a response.
Use these seven guidelines to write clear, effective prompts and instructions.
-
Define your task and goal: Be explicit about what you want the agent to do.
-
Supply relevant context: Provide the necessary background information and data the agent needs to complete the task successfully.
-
Be clear and specific: Use short, clear sentences and avoid vague words. The more specific your instruction, the more likely the agent is to generate a relevant and accurate response.
-
Set agent boundaries: Instruct the agent on what it shouldn’t do, such as providing false information or sharing sensitive or personal information.
-
Structure output for readability: Tell the agent how you want the answer formatted. Asking for a response "in a list," "as a table," or "with a single paragraph" makes the output easier for your user to understand.
-
Understand LLM capabilities: Know what an LLM is good at and what its limitations are. Tailor your instructions to the technology's strengths for the best results.
-
Iterate for improvement: Your first prompt is rarely your last. Test your prompts, see what the agent produces, and refine your instructions based on the results.
Phase 3: Test and Evaluate
You can’t know if a conversation works until you test it with data and real people. The Test and Evaluate phase is about putting your design in front of users to see what's working and what isn't. You can do this with simple role-playing exercises or by using a testing tool such as Prompt Builder or Agentforce Builder. The feedback you gather is critical for finding confusing spots or dead ends in your conversational flow.
Phase 4: Revise and Maintain
A great AI agent is never truly done. The final phase of the lifecycle is a continuous loop of improvement.
-
Improve: Based on your testing and on real-world chat logs, you can make your conversation design better.
-
Nurture: An agent's knowledge isn’t static. You must keep its information current. For example, if a product's price changes, update the agent's knowledge base.
-
Grow: As your agent becomes more effective, expand its capabilities by adding new skills, like booking appointments or processing returns.
This iterative cycle makes sure that your AI agent remains helpful, accurate, and effective over time.
[This image was generated with Google Docs Gemini using this prompt: Using the Salesforce Trailhead style, display the lifecycle of a robot or AI agent. Don't include any words.]
Next Up
Awesome! You learned how to plan and build your AI agent conversations using a standard design lifecycle. In the next unit, you learn how to measure agentic quality and use that information to continuously improve your conversations and prompts.