Test an intent

In this section, we'll go over how a simple conversation works. In this example, there are two intents, city_name and favorite_color, that handle input about the city the user is from and the user's favorite color. We then reference both these parameters in the final response to the user.

You can use the simulator in the Dialogflow console to converse with your agent and test how your intents work. When we provide input and our agent responds, we'll see the following fields in the simulator:

  • User says: the user's input.
  • Default Response: your agent's response.
  • Contexts: any contexts attached to the matched intent.
  • Intent: the matched intent.
  • Action: the field that is passed to fulfillment that specifies what intent is triggered.
  • Parameter: the parameter that is extracted from the user's utterance.
  • Value: the extracted parameter's value.

To have a conversation with your agent, follow these steps:

  1. Locate the simulator in the Dialogflow console.
  2. Enter input into the "Try it now" text field. For this example, we'll type "hi" and press Enter:

    In our example, the agent responds with, "Hello! Please tell me your favorite color." Notice how this response guides the user to provide input that matches the favorite_color intent.

  3. Provide input based on your agent's prompt. Since our agent asked for our favorite color in this example, we'll type "I like yellow" into the "Try it now" text field and press Enter.

In this case, our agent responds with, "Nice! I love yellow. What city were you born in?" Just as with the previous dialog turn, the agent's response guides the user to provide a certain parameter (city name) in their next input. Again, provide input based on your agent's prompt. For this example, we'll type "I'm from Seattle" and press Enter: