0

I have this intent.

Context: asset
Query: When will the @asset fail?

Entity @asset has synonyms "unit, equipment, machine"

Now when I query "when will the asset fail? or when will the unit fail?" It works.

But when I say "when will it fail?" It does not work.

Is there a way I can make the entity @asset optional?

iitum studant
  • 856
  • 2
  • 8
  • 24
  • as per my understanding, there is a different way to do. when a user asks about " when will it fail " in this case you want to know about "it " and you can ask the user about it @asset. – Manjeet Thakur Aug 03 '17 at 09:33

1 Answers1

0

There are two ways to deal with that.

When you want an asset, than you set asset to required. Then you use a feature called slotfilling. You set a prompt like:

What asset do you mean?

User says:

  • When will it fail
  • When will the unit fail <-- mark the unit as asset

In the Action segment you may set asset to required and set a prompt. If it is set. API.ai tries to "fill the slot" by showing the user the prompt: (Example: What asset do you mean?)

If required isn't set: When will it fail will be accepted and the asset field is empty. In this case your backend has to handle it. Either with a default value or an error message.

Of course it is better for the experience of the user, if he doesn't get a: I don't know what you mean response ;-)

MrEbbinghaus
  • 963
  • 7
  • 15