taskflow词槽收集错乱
不灭的魂之挽歌 发布于2021-08 浏览:466 回复:1
0
收藏

在taskflow配置相同词典的不同词槽收集时,出现覆盖的问题

[
    {
        "node_id":10006,
        "node_name":"所在城市采集",
        "node_type":"slot_filling",
        "code":"",
        "abscissa":227.91640250452,
        "ordinate":53.223518482031,
        "filling_mode":"sequential",
        "slots":[
            {
                "slot_name":"user_city",
                "slot_alias":"所在城市",
                "say_list":[
                    "请问您的所在城市是哪里呢?"
                ],
                "recover_say_list":[

                ],
                "say_mode":"sequential",
                "forced_filling":true,
                "clarify_times":3
            }
        ],
        "recoverable":true
    },
    {
        "node_id":10007,
        "node_name":"检测到买票意图",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":1,
        "conditions":[
            [
                {
                    "range":[
                        "slu",
                        "1109637",
                        "intent"
                    ],
                    "target":"intent",
                    "mode":"not_empty",
                    "content":"买票"
                }
            ]
        ],
        "previous_node":-1,
        "next_node":10006
    },
    {
        "node_id":10009,
        "node_name":"对话答复节点",
        "node_type":"reply",
        "code":"",
        "abscissa":130,
        "ordinate":379,
        "process":[
            {
                "action_option":"custom",
                "say_list":[
                    "不好意思,我只是一个小小的买票机器人~请输入关键词”买票“"
                ],
                "relay_skill_id":""
            }
        ],
        "wait_for_input":true,
        "recoverable":true,
        "recover_to_interrupted":true,
        "recover_say_list":[

        ],
        "session_reset":false
    },
    {
        "node_id":10010,
        "node_name":"未检测到买票意图",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":5,
        "conditions":[
            [
                {
                    "range":[
                        "slu",
                        "1109637",
                        "intent"
                    ],
                    "target":"intent",
                    "mode":"empty",
                    "content":""
                }
            ]
        ],
        "previous_node":-1,
        "next_node":10009
    },
    {
        "node_id":10011,
        "node_name":"去往城市采集",
        "node_type":"slot_filling",
        "code":"",
        "abscissa":402.7359513767,
        "ordinate":89.042964554243,
        "filling_mode":"sequential",
        "slots":[
            {
                "slot_name":"user_to_city",
                "slot_alias":"去往城市",
                "say_list":[
                    "请问您想去哪个城市呢?"
                ],
                "recover_say_list":[
                    "不好意思我没听清,您想去往哪个城市?"
                ],
                "say_mode":"sequential",
                "forced_filling":true,
                "clarify_times":3
            }
        ],
        "recoverable":true
    },
    {
        "node_id":10012,
        "node_name":"所在城市已采集",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":2,
        "conditions":[
            [
                {
                    "range":[
                        "slu",
                        "1109637",
                        "slot"
                    ],
                    "target":"user_city",
                    "mode":"filled",
                    "content":""
                }
            ]
        ],
        "previous_node":10006,
        "next_node":10011
    },
    {
        "node_id":10013,
        "node_name":"买票时间采集",
        "node_type":"slot_filling",
        "code":"",
        "abscissa":572.17185821697,
        "ordinate":127.13319011815,
        "filling_mode":"sequential",
        "slots":[
            {
                "slot_name":"user_time",
                "slot_alias":"时间",
                "say_list":[
                    "请问您想什么时间出发呢?"
                ],
                "recover_say_list":[

                ],
                "say_mode":"sequential",
                "forced_filling":true,
                "clarify_times":3
            }
        ],
        "recoverable":true
    },
    {
        "node_id":10014,
        "node_name":"去往城市已采集",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":3,
        "conditions":[
            [
                {
                    "range":[
                        "dialog",
                        "",
                        ""
                    ],
                    "target":"user_to_city",
                    "mode":"filled",
                    "content":""
                }
            ]
        ],
        "previous_node":10011,
        "next_node":10013
    },
    {
        "node_id":10015,
        "node_name":"肯定否定节点",
        "node_type":"yes_no",
        "code":"",
        "abscissa":773.44336718744,
        "ordinate":128.88538066577,
        "process":[
            {
                "inquiry_times":3,
                "say_mode":"random",
                "say_list":[
                    "请问您确定买这个票吗:时间:{@user_time.origin},从{@user_city.origin}去往{@user_to_city.origin}"
                ],
                "recover_say_list":[

                ],
                "match_threshold":70,
                "yes_dict":[
                    "ok",
                    "是的",
                    "好",
                    "没问题",
                    "正确",
                    "嗯嗯",
                    "嗯",
                    "是的呢",
                    "对",
                    "对的",
                    "没毛病"
                ],
                "no_dict":[
                    "不是",
                    "错了",
                    "错误",
                    "不是的",
                    "我不想要",
                    "no",
                    "有问题",
                    "否"
                ],
                "continue_wander":true,
                "result_var":"yesno",
                "match_words":"key"
            }
        ],
        "recoverable":true
    },
    {
        "node_id":10016,
        "node_name":"时间已采集",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":4,
        "conditions":[
            [
                {
                    "range":[
                        "dialog",
                        "",
                        ""
                    ],
                    "target":"user_to_city",
                    "mode":"filled",
                    "content":""
                }
            ]
        ],
        "previous_node":10013,
        "next_node":10015
    },
    {
        "node_id":10017,
        "node_name":"对话答复节点",
        "node_type":"reply",
        "code":"",
        "abscissa":1001.768325312,
        "ordinate":131.17960971049,
        "process":[
            {
                "action_option":"custom",
                "say_list":[
                    "好的,正在帮您买票,请稍候查看订单。"
                ],
                "relay_skill_id":""
            }
        ],
        "wait_for_input":true,
        "recoverable":true,
        "recover_to_interrupted":true,
        "recover_say_list":[

        ],
        "session_reset":true
    },
    {
        "node_id":10018,
        "node_name":"yes",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":1,
        "conditions":[
            [
                {
                    "range":[
                        "contexts",
                        "",
                        ""
                    ],
                    "target":"yesno",
                    "mode":"equals",
                    "content":"yes"
                }
            ]
        ],
        "previous_node":10015,
        "next_node":10017
    },
    {
        "node_id":10019,
        "node_name":"对话答复节点",
        "node_type":"reply",
        "code":"",
        "abscissa":1003.0572619393,
        "ordinate":285.85200498439,
        "process":[
            {
                "action_option":"custom",
                "say_list":[
                    "抱歉,我没听清楚您的买票请求,请输入”买票“重新购买。"
                ],
                "relay_skill_id":""
            }
        ],
        "wait_for_input":true,
        "recoverable":true,
        "recover_to_interrupted":true,
        "recover_say_list":[

        ],
        "session_reset":true
    },
    {
        "node_id":10020,
        "node_name":"对话答复节点",
        "node_type":"reply",
        "code":"",
        "abscissa":1004.3461985666,
        "ordinate":443.10227351285,
        "process":[
            {
                "action_option":"custom",
                "say_list":[
                    "买票失败!请重新输入”买票“。"
                ],
                "relay_skill_id":""
            }
        ],
        "wait_for_input":true,
        "recoverable":true,
        "recover_to_interrupted":false,
        "recover_say_list":[

        ],
        "session_reset":true
    },
    {
        "node_id":10021,
        "node_name":"mo",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":2,
        "conditions":[
            [
                {
                    "range":[
                        "contexts",
                        "",
                        ""
                    ],
                    "target":"yesno",
                    "mode":"equals",
                    "content":"no"
                }
            ]
        ],
        "previous_node":10015,
        "next_node":10019
    },
    {
        "node_id":10022,
        "node_name":"fail",
        "node_type":"link",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "priority":3,
        "conditions":[
            [
                {
                    "range":[
                        "contexts",
                        "",
                        ""
                    ],
                    "target":"yesno",
                    "mode":"equals",
                    "content":"fail"
                }
            ]
        ],
        "previous_node":10015,
        "next_node":10020
    },
    {
        "node_id":-9999,
        "node_name":"失败",
        "node_type":"reply",
        "code":"",
        "abscissa":0,
        "ordinate":0,
        "process":[
            {
                "action_option":"custom",
                "say_list":[
                    "我不知道该怎么答复您"
                ],
                "relay_skill_id":""
            }
        ],
        "wait_for_input":true,
        "recoverable":false,
        "recover_to_interrupted":false,
        "recover_say_list":[

        ],
        "session_reset":false
    },
    {
        "node_id":-1,
        "node_name":"前置",
        "node_type":"none",
        "code":"def process():\n\t# TODO\n\tpass",
        "abscissa":0,
        "ordinate":0,
        "process":[

        ]
    }
]

收藏
点赞
0
个赞
共1条回复 最后由unit_internal9回复于2021-08
#2unit_internal9回复于2021-08

1、taskflow机器人,语句的识别是在技能内完成的,技能给出识别结果,taskflow流程对结果进行判断,给出回复

2、你的对话模板配置有问题,特征词不合理,模板的是否匹配也有问题,建议多看看文档:https://ai.baidu.com/ai-doc/UNIT/Pkipmv8xy

3、既然意图是买票,那么,标注的样本就需要更准确,比如买票订票这样的语句,而北京到上海这种,不算是准确的表述订票的语句,可以删除。可以考虑删除除了买票、订票这两句样本以外的其他所有样本。

4、taskflow流程没什么问题,只需要注意一点,在技能内对话的时候,首轮(重置对话后)单独输入地点不能被识别到任何一个地点词槽,只能在多轮进行地点澄清的时候识别到才可以。

0
TOP
切换版块