Dialogflow entity automated expansion

Viewed 2497

In Dialogflow, what is the best way of "training an entity" that is set to be automated by expansion. Is there any difference between adding the entity in training phrases and simply adding example values in the entitiy screen? Does the Dialogflow training take one into more consideration than the other? It is required that you add at least one value when creating an entity.

So should I just add one value and then add the rest as highlights in training phrases for a given intent? Or should I add as many values as possible when creating the entity.

I hope this makes sense.

1 Answers

Automated expansion is used when a user input matches an intent but the entity value doesn't exist yet. See a detailed explanation in the documentation.

Example:

  • Entity color [blue, green]

  • Intent "My favorite color is [color]"

User says "My favorite color is yellow" - it matches the intent and the color is added to the entity.

But what if the intent isn't exactly the same?

User says "I like the color blue" - knows that blue is part of the color entity so might be matched.

User says "I like the color yellow" - the phrase doesn't match the intent and the color isn't in the entity - probably not matched.

Having a lot of examples in your entity helps match an intent, even if the phrasing is a bit off. Having a lot of training phrases helps match an unknown entity value.

Ideally, you have both a lot of training phrases and a lot of entity values to help recognition. Hope this makes sense.

[keep in mind that these examples are just for illustration]

Related