1

I want to define an intent PlaceReservation that would capture a restaurant reservation. The parameters for that would be numOfPeople and time. Both of those parameters are optional, so a user can say:

  • get a table for 5 people for 9pm
  • get a table for 5 people
  • get a table for 9pm
  • get a table
  • get a table for 5
  • get a table for 9pm for 5 people
  • get a table for 5 for 9pm

My problem is with the last one, get a table for 5 for 9pm the intent then captures 5 as the hour (5am) and ignores 9pm. time is defined as a @sys.time system entity.

Is there a way to tell it to not accept simple integers as time, as I think this is what is confusing it?

Is there some other solution I'm missing? I certainly understand why it is making the mistake, but we, as humans understand how to interpret it, and I want to help DialogFlow interpret it accordingly.

Tejas Bramhecha
  • 880
  • 5
  • 19
eran
  • 14,496
  • 34
  • 98
  • 144
  • Can you add a screen shot of the Intent's sample phrases you're using and the parameters that are matching it? – Prisoner Jan 11 '18 at 11:02

2 Answers2

1

I've had a similar problem and haven't found a proper solution for it yet. In your case you could define your own time entity that consists of entries like 9pm or 10am or even expand it with a composite entity to also let users say "10 in the morning" https://dialogflow.com/docs/entities#dev_composite.

Bart
  • 498
  • 2
  • 8
0

This is definitely confusing for the bot to understand/interpret which one is time & which one is the number of people. Even creating a separate entity for time like 9am/10am won't work cause this does not guarantee that user will enter 9am/pm only. They may not append am/pm ahead of time as well. The solution to your problem can be creating separate intents, first asking users for time & then for number of people. This way you reduce the complexity & can train the bot in a proper way. In addition, you can direct user to a certain direction instead of keeping your bot open for questions.

Tejas Bramhecha
  • 880
  • 5
  • 19