Home / DialogFlow / Autogenerated Bots / Automatically generating a product lookup bot
Autogenerated Bots | DialogFlow

Automatically generating a product lookup bot

I got a comment on my article on bulk uploading intents into Dialogflow from a CSV file.  The commenter was asking if my Bot Generator tool could be used for creating a product info lookup bot.

But first, let us consider a few things that you need to understand before this question can be answered.

1 Entity annotation in Dialogflow

If you have worked inside of Dialogflow to create an entity, you know that when you type in a training phrase containing an entity, something happens automatically.

Dialogflow will attempt to annotate the word and try and figure out exactly what entity it is.

2 JSON format of the annotated entity

If you know how the Bot Generator tool works, you know that when you load a CSV file into it, it takes the contents of the CSV file, does some code magic, and makes sure that it produces a ZIP file that you can import into Dialogflow.

This is possible because the ZIP file consists of a set of JSON files.

Here is what the corresponding JSON format looks like for the annotation that Dialogflow did above.

Notice that Dialogflow stored the input as two chunks – with the second chunk containing the actual annotation of the word Seattle as a type @sys.geo-city.

3 Automating Dialogflow training requires an extra step

What does this mean?

When compared with creating a simple FAQ bot which doesn’t have any entities, automating something like a product lookup bot is quite a bit more complex.

For example, imagine if you simply used the product name in the training phrase without adding the metadata about the annotation as part of your FAQ bot. It won’t help, because Dialogflow will not be able to extract the entity value when the user types a phrase because it has not yet been “trained” to do so.

I wrote an article about what it would actually take to automate the training task.


If the majority of your questions are not entity dependent, one option is to use the Bot Generator to create an agent and import it into a different project (I have named this ScratchPadBot in my own Dialogflow console) in Dialogflow. Then you can bulk copy the intents and move them into your main project.

Once you do this, you would still have to manually create the intents in which you use entities.


The Bot Generator is useful if you wish to create a simple FAQ chatbot which doesn’t contain any entities.

If you need to automatically generate a product lookup bot (or any other lookup-type bot for that matter), you will need to use some of the ideas I have presented here and build out your own.


Related Posts