You can add multiple training phrases and multiple responses per intent using the 4 Column CSV format.
However, if you want to specify input and output contexts, you need more columns in your CSV file. The 10 Column CSV file helps you specify the following:
output context and lifespan
second text response
whether or not the intent calls a webhook
You can download a sample 10 column CSV file at the bottom of this article.
Here is an image for the CSV format.
The following column names are mandatory AND case sensitive. You can have some empty columns where it makes sense (for example, your entire Response2 column might be empty because you don't use multiple responses in your bot).
So let us go over these column names.
The first four column names are identical to the 4 Column CSV format, and you can refer to this guide to see the rules.
The Response2 is a way to specify a SECOND response in your text based FAQ bot.
This will help you define the action inside an intent.
You can use any input context name which is valid in Dialogflow ES. (some characters, such as : and , are not allowed in ES). Make sure you are following those conventions when you define the input context.
Specify the output context. The same rules for disallowed characters apply for the OutputContext field too, as expected.
This is the lifespan corresponding to the OutputContext you just specified in the previous column. Remember that EVERY output context is associated with a lifespan in Dialogflow, so you cannot leave this column empty if you have an output context defined in the same row.
This sets the toggle at the end of the intent which specifies whether the intent calls a webhook.
If you leave this blank, then it defaults to NOT calling the webhook.
If you type the word Yes, it sets the toggle to call the webhook.
If you use any other word (Such as No), then it just goes to the default and does NOT call the webhook.
How the CSV translates to Dialogflow agent ZIP file
The images below show how the CSV file at the beginning of this article translates into Dialogflow intents.