Rasa 3.1 机器学习三中文模型训练,预言结果无法命中默认回复配置

1、domain.yml配置

version: "3.1"
actions:
  - action_dafault_fallback

2、config.yml

recipe: default.v1
assistant_id: 20230829-135604-instant-radix
language: zh

pipeline:
  - name: JiebaTokenizer #中文
  - name: LanguageModelFeaturizer
    model_name: "bert"
    model_weights: "bert-base-chinese"
  - name: DIETClassifier
    epochs: 100
    constrain_similarities: true
    min_ngram: 1
    max_ngram: 4
  - name: ResponseSelector

policies:
  - name: RulePolicy
    core_fallback_threshold: 0.3  #预言命中值低于或等于当前值执行默认
    core_fallback_action_name: "action_dafault_fallback"  # 预言结果无法命中默认回复配置
    enable_fallback_prediction: True

默认动作执行(action.py)

class DefaultAction(Action):

    def name(self) -> Text:
        return "action_dafault_fallback"

    def run(self, dispatcher, tracker, domain):
        dispatcher.utter_message(text='对不起,我还没有学会')
        return [UserUtteranceReverted()]

你可能感兴趣的:(机器学习,机器学习,人工智能)