-
Notifications
You must be signed in to change notification settings - Fork 17
/
patterns.yml
73 lines (68 loc) · 2.37 KB
/
patterns.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
flows:
pattern_correction:
description: Confirm a previous correction of a slot value.
steps:
- noop: true
next:
- if: context.is_reset_only
then:
- action: action_correct_flow_slot
next: END
- else:
- collect: confirm_slot_correction
description: boolean value set when the user affirms or denies the correction
next:
- if: not slots.confirm_slot_correction
then:
- action: utter_not_corrected_previous_input
next: END
- else:
- action: action_correct_flow_slot
- action: utter_corrected_previous_input
next: END
pattern_chitchat:
description: Handle chitchat using intentless policy
steps:
- action: action_trigger_chitchat
pattern_search:
description: handle knowledge-based requests using enterprise search
steps:
- action: action_trigger_search
pattern_cancel_flow:
description: A meta flow that's started when a flow is cancelled.
steps:
- id: decide_cancel_step
noop: true
next:
- if: context.canceled_name = "transfer money"
then: inform_user
- else: cancel_flow # skips the inform step
- id: inform_user
action: utter_flow_cancelled_rasa
next: cancel_flow
- id: cancel_flow
action: action_cancel_flow
pattern_completed:
description: all flows have been completed and there is nothing else to be done
name: pattern completed
steps:
- action: utter_can_do_something_else
- action: action_reset_routing
pattern_clarification:
description: Conversation repair flow for handling ambiguous requests that could match multiple flows
name: pattern clarification
steps:
- action: action_clarify_flows
next:
- if: context.names contains "add a contact"
then:
- link: add_contact
- else:
- action: action_increase_clarification_count
next:
- if: slots.clarification_count > 2
then:
- link: pattern_human_handoff
- else: clarify_options
- id: clarify_options
action: utter_clarification_options_rasa