Crafting a Conversation

This guide walks you through how to design a conversation action using a simple number guessing game as an example to explain key concepts and best practices that you can use to build great experiences.

Before getting started, familiarize yourself with our recommended design process methodology. The main steps are:

  • Pick the right use cases. Use cases that work well with conversational interfaces are usually simple and intuitive and don't require much complexity.
  • Create a persona. The way your conversation actions read and function give it consistency, unique brand presence, and personality.
  • Write dialogs. This walks you through the bulk of creating dialogs and gives you best practices along the way
  • Test it out. Say it out loud, test it in our simulator tools, and make sure it sounds conversational.
  • Build and iterate. Build it in Dialogflow or with your own tooling using the Actions SDK.

Pick the right use cases

Games are low risk when it comes to task completion, but can be tricky in that users have a low boredom threshold and therefore bring high expectations for a game UI to be engaging.

A number guessing game is great starting point for an intuitive conversation that leverages a domain which requires no background knowledge from users and therefore opens up opportunities for exploration and ways to test the boundaries of the UI.

Create a Persona

Personas help you design and write your conversations, so choose one early on to make it easier to pick the right words, syntax, and structure.

Our game persona has the following characteristics:

  • Upbeat, cheery, and encouraging
  • Engaging and witty to keep the game moving and encourage exploration
  • Never formal and uses simple language so the game appeals to many ages and groups

Let's call it "Number Genie" to infuse it with even more personality, tapping into users' shared understanding of the "magic" connotation and innate expectations about the guessing game genre.

Write dialogs

Now that we've settled on our game use case and decided on a persona, we're ready to start writing out our user journeys in the form of sample dialogs.

For our Number Genie game, we've come up with the following dialogs to get started with. Let's step through them in order to understand what each dialog reveals about our design thinking and best practices.

Journey 1: Happy path

This dialog depicts a typical flow one round with three guesses.

UserHey Google, let me talk to Number Genie.
Google AssistantSure, here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User50
Number GenieIt's higher than 50. What's your next guess?
User65
Number GenieIt's lower than 65. Next guess?
User60
Number GenieCongratulations, that's it! I was thinking of 60. Wanna play again?
UserNo thanks.
Number GenieAlright, talk to you later then.

Journey 2: Happy path with two rounds

This dialog depicts a user that plays twice and with many more guesses.

UserHey Google, let me talk to Number Genie.
Google AssistantSure, here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User30
Number GenieIt's higher than 30. What's your next guess?
User47
Number GenieIt's lower than 47. Next guess?
User45
Number GenieCongratulations, that's it! I was thinking of 45. Wanna play again?
UserSure.
Number GenieGreat! I'm thinking of a new number from 0 to 100. What's your guess?
User99.
Number GenieIt's lower than 99. Next guess?
User98.
Number GenieIt's lower than 98. Next guess?
User92.
Number GenieYou're getting warmer. It's also lower than 92. Have another guess?
[Persona addition: warmer when within 10]
(If too low) Warmer. It's also higher than 92. Take another guess.
User86.
Number GenieClose, but not quite!
User85.
Number GenieYou're piping hot! But it's still lower.
[Persona addition: hot when within 3]
(If too low)You're hot as lava! Go higher.
User82.
Number GenieWell done! It is indeed 82. Wanna play again?
UserNo.
Number GenieOK, I'm already thinking of a number for next time. Bye!

Journey 3: Exploratory guesses

This dialog depicts a user saying random guesses and Number Genie providing hints to get users to guess the right number (in this case, 23).

UserHey Google, let me talk to Number Genie.
Google AssistantSure, here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User50
Number GenieIt's lower than 50. Next guess?
User99
[LOGIC: catch when they go against the hints, i.e. go higher when they were told lower]
Number GenieNice try, but it's still lower than 50.
(if too low) Clever, but no. It's still higher than %s.
User0
Number Genie(if guess = 0) I see what you did there. But no, it’s higher than 0.
(if guess = 100) Oh, good strategy. Start at the top. But no, it's lower than a hundred.
User99.
[LOGIC: cold if >75 away]
Number GenieYou're ice cold. It's way lower than 99.
(if too high) You're freezing cold. It's a lot higher than %s.
User25
Number GenieIt's lower than 25. Next guess?
User24
[LOGIC: catch if they were 2 away and then 1 away in the same direction, e.g. 25 then 24 when it's 23 or 15 then 16 when it's 17]
Number GenieKeep going.
[LOGIC: same prompt for both high and low]
User23
[LOGIC: catch if they had a lot of turns (maybe more than 10) and use a "one more" round question instead of just asking to play again generically]
Number GenieYes! It’s 23. Nice job! How about one more round?.
UserNo thanks.
Number GenieAlright, talk to you later then.

Journey 4: Conversation repair outside of game context

UserOK Google, let me talk to Number Genie.
Google AssistantSure, Here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User50
Number GenieIt's higher than 50. What's your next guess?
UserHow long is the Great Wall of China?
Number GenieAre you done playing Number Genie?
[LOGIC: first nomatch with discernible context, listen for yes/no and number]
UserYes.
Number GenieOK, till next time. Bye!

Journey 5: Conversation repair for timeouts

UserOK Google, let me talk to Number Genie.
Google AssistantSure, Here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User[says nothing]
Number GenieI didn't hear a number.
User[silent or muffled]
Number GenieIf you're still there, what's your guess?
User[silent]
Number GenieWe can stop here. Let's play again soon.

Journey 6: User guesses same number 3x

UserHey Google, let me talk to Number Genie.
Google AssistantSure, here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User50
Number GenieIt's higher than 50. What's your next guess?
User50
[LOGIC: catch same number]
Number GenieIt's still not 50. Guess higher.
User50
[LOGIC: catch same number again]
Number GenieMaybe it'll be 50 the next time. Let's play again soon.

Journey 7: Quit game. User gives up and ends the game

UserHey Google, let me talk to Number Genie.
Google AssistantSure, here's Number Genie.
Number GenieWelcome to Number Genie! I'm thinking of a number from 0 to 100. What's your first guess?
User21
Number GenieIt's higher than 21. What's your next guess?
UserI give up.
[LOGIC: catch ending intent]
Number GenieSure, I’ll tell you the number anyway. It was 90.

Test it out

Now that you have a group of great dialogs, try reading them out loud. As mentioned in our principles about writing conversationally, you will have a tendency to write in written English, so doing this for each dialog lets you catch awkward dialogs. In addition to practicing them out loud, you can use the Actions Simulator to type out your dialogs and have them spoken back to you. The simulator is also a good way to test how the text-to-speech will sound. You might even find yourself adjusting wording after that step.

Use the Actions Simulator

Read more resources

After testing the conversation out, you might want to discover scenarios you want to refine and build out for even smoother conversations. Creating a natural and easy-to-use conversational interface is often harder than it looks at first. Take the time to refine and make the best experience possible for your users. Here are some topics to get your started:

Get the sample

Now that you have a good idea of how to design a great conversational interface, see the Number Genie sample and tutorial for more information on how to build the Number Genie game that we just designed.