add nlu fallback handling
Browse files- config.yml +3 -1
- data/rules.yml +5 -0
- domain.yml +4 -1
config.yml
CHANGED
@@ -11,4 +11,6 @@ pipeline:
|
|
11 |
# Configuration for Rasa Core.
|
12 |
# https://rasa.com/docs/rasa/core/policies/
|
13 |
policies:
|
14 |
-
- name: RulePolicy
|
|
|
|
|
|
11 |
# Configuration for Rasa Core.
|
12 |
# https://rasa.com/docs/rasa/core/policies/
|
13 |
policies:
|
14 |
+
- name: RulePolicy
|
15 |
+
- name: FallbackClassifier
|
16 |
+
threshold: 0.7
|
data/rules.yml
CHANGED
@@ -16,3 +16,8 @@ rules:
|
|
16 |
steps:
|
17 |
- intent: out_of_scope
|
18 |
- action: action_human_handoff
|
|
|
|
|
|
|
|
|
|
|
|
16 |
steps:
|
17 |
- intent: out_of_scope
|
18 |
- action: action_human_handoff
|
19 |
+
|
20 |
+
- rule: Ask the user to rephrase whenever they send a message with low NLU confidence
|
21 |
+
steps:
|
22 |
+
- intent: nlu_fallback
|
23 |
+
- action: utter_please_rephrase
|
domain.yml
CHANGED
@@ -9,7 +9,10 @@ actions:
|
|
9 |
- action_ReversePhoneLookup
|
10 |
- action_CallReservationHotline
|
11 |
- action_human_handoff
|
12 |
-
|
|
|
|
|
|
|
13 |
|
14 |
session_config:
|
15 |
session_expiration_time: 60
|
|
|
9 |
- action_ReversePhoneLookup
|
10 |
- action_CallReservationHotline
|
11 |
- action_human_handoff
|
12 |
+
|
13 |
+
responses:
|
14 |
+
utter_please_rephrase:
|
15 |
+
- text: 不好意思,我不太明白您的意思。可以請您再說一次嗎?
|
16 |
|
17 |
session_config:
|
18 |
session_expiration_time: 60
|