-
Notifications
You must be signed in to change notification settings - Fork 0
/
gold_standard_bot.yml
559 lines (559 loc) · 14.4 KB
/
gold_standard_bot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
---
name: day-planner
context_variables:
# user's location
location:
type: json
extraction:
method: spacy
config_method: gpe
known:
type: fflag
init: false
options:
Toronto:
variations:
- downtown
Kingston:
variations:
- k-town
# user's phone number
phone_number:
type: json
extraction:
method: regex
pattern: \d{10}
known:
type: fflag
init: false
examples:
- 1234567890
- 2345678901
- 3453452794
# user's preferred cuisine; must map to one of the 4 options
cuisine:
type: enum
known:
type: fflag
init: false
options:
- Mexican
- Italian
- Chinese
- dessert
# indicates if the user has an allergy
have_allergy:
type: flag
init: false
known:
type: flag
init: false
# food restrictions/allergies that the bot can take into account
food_restriction:
type: enum
known:
type: flag
init: false
options:
- dairy-free
- gluten-free
# possible budget options
budget:
type: enum
known:
type: flag
init: false
options:
- low
- high
# user's outing preferences
outing_type:
type: enum
known:
type: fflag
init: false
options:
high-energy:
variations:
- fun
- exciting
- social
low-energy:
variations:
- chill
- relaxing
- laid-back
# activated if there is a conflict between the user's cuisine preference and food restrictions
conflict:
type: flag
init: false
known:
type: flag
init: false
# possible restaurant options
restaurant:
type: enum
known:
type: flag
init: false
options:
- Guac Grill
- Alfredo's Pizza Café
- Mandarin
- Geneva Crepes
# possible outing options
outing:
type: enum
known:
type: flag
init: false
options:
- Stages
- Stauffer Library
- Broadway Theater
- Smith's Golfing Club
# ends the conversation if true
goal:
type: flag
init: false
known:
type: flag
init: false
intents:
confirm:
utterances:
- "yes"
- yeah
- that's it
- "Y"
- mhm
- confirm
- yes please
deny:
utterances:
- "no"
- not at all
- that's not what i meant
- absolutely not
- i don't want that
- nah
- no thanks
- no thank you
share_phone_number:
entities:
- phone_number
utterances:
- My phone number is $phone_number.
- My number is $phone_number.
- $phone_number
share_location:
entities:
- location
utterances:
- I live in $location.
- I am located in $location.
- Can you help me find things to do in $location?
share_cuisine:
entities:
- cuisine
utterances:
- I want to eat $cuisine.
- Do you have restaurants of type $cuisine?
- Are there any $cuisine restaurants in the area?
share_allergies:
entities:
- food_restriction
utterances:
- I have to eat $food_restriction.
- I can only eat foods that are $food_restriction.
- I am allergic to any foods that are not $food_restriction.
share_all_outing_preferences:
entities:
- budget
- outing_type
utterances:
- I have a $budget budget and I would prefer a $outing_type atmosphere today.
- I am operating within a $budget budget and I want to go to a $outing_type place.
- I can do activities with a $budget budget and I want to find the most $outing_type place in the city.
share_budget:
entities:
- budget
utterances:
- I have a $budget budget.
- I am operating within a $budget budget.
- I can do activities with a $budget budget.
share_outing_type:
entities:
- outing_type
utterances:
- I would prefer a $outing_type atmosphere today.
- I want to go to a $outing_type place.
- What is the most $outing_type place in the city?
actions:
get-location:
type: custom
subtype: slot_fill
parameters:
action_name: get-location
overall_intent: share_location
entities:
- location
message_variants:
- Where are you located?
fallback_message_variants:
- Sorry, that isn't a valid location.
config_entities:
location:
clarify_message_variants:
- I wasn't sure about your location. Do you live in $location?
additional_updates:
- outcome:
location:
known: true
response_variants:
- Tailoring your results to what's available in $location...
get-phone_number:
type: custom
subtype: slot_fill
parameters:
action_name: get-phone_number
entities:
- phone_number
overall_intent: share_phone_number
message_variants:
- What is your phone number? I can use it to make reservations.
fallback_message_variants:
- Sorry, that isn't a valid number.
config_entities:
phone_number:
clarify_message_variants:
- I'm unsure about your phone number, is it $phone_number?
get-cuisine:
type: custom
subtype: slot_fill
parameters:
action_name: get-cuisine
entities:
- cuisine
overall_intent: share_cuisine
message_variants:
- What is your cuisine of choice? Mexican, Italian, Chinese, and dessert restaurants are in the area.
fallback_message_variants:
- Sorry, that isn't a valid cuisine.
config_entities:
cuisine:
clarify_message_variants:
- I didn't quite get your cuisine preference. Do you want to eat $cuisine?
additional_updates:
- outcome:
cuisine:
known: true
response_variants:
- Cuisine preference has been logged.
get-have-allergy:
type: dialogue
message_variants:
- Do you have any allergies? (Y/N)
condition:
have_allergy:
known: false
effect:
set-allergy:
oneof:
outcomes:
indicate_allergy:
updates:
have_allergy:
value: true
known: true
intent: confirm
follow_up: get-allergy
indicate_no_allergy:
updates:
have_allergy:
known: true
value: false
conflict:
known: true
value: false
intent: deny
get-allergy:
type: dialogue
message_variants:
- What type of allergy do you have? (I currently account for dairy and gluten allergies).
fallback_message_variants:
- Sorry, I don't recognize that type of allergy.
condition:
have_allergy:
known: true
value: true
effect:
set-allergy:
oneof:
outcomes:
update_allergy:
updates:
food_restriction:
value: $food_restriction
known: true
intent: share_allergies
check-conflicts:
type: system
subtype: Context dependent determination
condition:
location:
known: true
have_allergy:
known: true
value: true
food_restriction:
known: true
cuisine:
known: true
conflict:
known: false
effect:
check-conflicts:
oneof:
outcomes:
restriction-dessert:
updates:
conflict:
known: true
value: true
context:
cuisine:
value: dessert
food_restriction:
value: dairy-free
restriction-mexican:
updates:
conflict:
known: true
value: true
context:
cuisine:
value: Mexican
food_restriction:
value: gluten-free
no-restriction-1:
updates:
conflict:
known: true
value: false
context:
cuisine:
value: Italian
no-restriction-2:
updates:
conflict:
known: true
value: false
context:
cuisine:
value: Chinese
no-restriction-3:
updates:
conflict:
known: true
value: false
context:
cuisine:
value: dessert
food_restriction:
value: gluten-free
no-restriction-4:
updates:
conflict:
known: true
value: false
context:
cuisine:
value: Mexican
food_restriction:
value: dairy-free
reset-preferences:
type: system
condition:
conflict:
known: true
value: true
effect:
reset:
oneof:
outcomes:
reset-values:
updates:
have_allergy:
known: false
food_restriction:
known: false
cuisine:
known: false
conflict:
known: false
response_variants:
- Sorry, but there are no restaurants that match your allergy and cuisine preferences. Try entering a different set of preferences.
set-restaurant:
type: system
subtype: Context dependent determination
condition:
cuisine:
known: true
conflict:
known: true
value: false
restaurant:
known: false
effect:
assign_restaurant:
oneof:
outcomes:
set-mexican:
updates:
restaurant:
value: Guac Grill
known: true
context:
cuisine:
value: Mexican
set-italian:
updates:
restaurant:
value: Alfredo's Pizza Café
known: true
context:
cuisine:
value: Italian
set-chinese:
updates:
restaurant:
value: Mandarin
known: true
context:
cuisine:
value: Chinese
set-dessert:
updates:
restaurant:
value: Geneva Crepes
known: true
context:
cuisine:
value: dessert
get_outing:
type: custom
subtype: slot_fill
parameters:
action_name: get_outing
entities:
- budget
- outing_type
overall_intent: share_all_outing_preferences
message_variants:
- What kind of outing would you like to go to? Please specify both your budget (high or low) and the type of atmosphere you're looking for (i.e. fun, relaxing, etc.)
fallback_message_variants:
- Sorry, that isn't a valid outing preference.
config_entities:
budget:
fallback_message_variants:
- Sorry, that isn't a valid budget option. Please select either high or low.
single_slot_message_variants:
- What is your budget preference? Please select either high or low.
single_slot_intent: share_budget
outing_type:
fallback_message_variants:
- Sorry, that isn't a valid outing type.
single_slot_message_variants:
- What is your preferred outing type? Use a descriptive adjective like fun, high-energy, relaxing, etc.
single_slot_intent: share_outing_type
clarify_message_variants:
- Sorry, I wasn't quite sure about your outing type preference. Did you want a(n) $outing_type atmosphere?
additional_updates:
- outcome:
budget:
known: true
response_variants:
- Ok, I'll take that into account.
- outcome:
outing_type:
known: true
response_variants:
- Great choice!
set-outing:
type: system
subtype: Context dependent determination
condition:
budget:
known: true
outing_type:
known: true
effect:
assign_outing:
oneof:
outcomes:
set-club:
updates:
outing:
value: Stages
known: true
context:
budget:
value: low
outing_type:
value: high-energy
set-library:
updates:
outing:
value: Stauffer Library
known: true
context:
budget:
value: low
outing_type:
value: low-energy
set-theater:
updates:
outing:
value: Broadway Theater
known: true
context:
budget:
value: high
outing_type:
value: low-energy
set-golf:
updates:
outing:
value: Smith's Golfing Club
known: true
context:
budget:
value: high
outing_type:
value: high-energy
complete:
disable-fallback: true
type: dialogue
condition:
phone_number:
known: true
location:
known: true
restaurant:
known: true
outing:
known: true
message_variants:
- Booked a reservation at $restaurant as well as a spot at $outing in $location.
effect:
finish:
oneof:
outcomes:
finish:
updates:
goal:
value: true
known: true
intent:
...