问句:今天济南下雨吗?
对话模板:“RAIN”,包含两个词槽,一个特征词
“user_locale”,必须匹配:否,包含词汇“济南”
“user_time”,必须匹配:否,包含词汇“今天”
“kw_weather”,必须匹配:是,包含词汇“天气”
遇到问题:
词槽confidence接近100的情况下,机器人依然会反问。
请问如何调整词槽匹配的阈值,使confidence较高的词直接匹配,无需反问。
对话截图及JSON如下:
{
"begin": 0,
"confidence": 99.776931762695,
"father_idx": -1,
"length": 2,
"name": "user_time",
"need_clarify": false,
"normalized_word": "",
"original_word": "今天",
"word_type": ""
},
{
"begin": 2,
"confidence": 99.78426361084,
"father_idx": -1,
"length": 2,
"name": "user_locale",
"need_clarify": false,
"normalized_word": "",
"original_word": "济南",
"word_type": ""
}
查看JSON及完整内容
{
"bot_id": "3896",
"bot_session": "{\"bot_id\":\"3896\",\"bot_views\":{\"bernard_res\":[{\"action_list\":[{\"action_id\":\"rain_user_locale_clarify\",\"confidence\":100.0,\"custom_reply\":\"\",\"refine_detail\":{\"clarify_reason\":\"slot_absent\",\"interact\":\"ask\",\"option_list\":[{\"info\":{\"name\":\"user_locale\",\"text\":\"地点\"},\"option\":\"user_locale\"}]},\"say\":\"在哪里\",\"type\":\"clarify\"}],\"msg\":\"ok\",\"qu_res\":{\"candidates\":[{\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"4\\\",\\\"match_keywords\\\":\\\" kw_weather:下雨\\\",\\\"match_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_slots\\\":{\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"RAIN\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"[D:kw_weather] kw_weather:下雨\\\",\\\"slots\\\":[{\\\"begin\\\":8,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":4,\\\"name\\\":\\\"kw_weather\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"下雨\\\",\\\"word_type\\\":\\\"\\\"}]},\\\"real_threshold\\\":0.0,\\\"threshold\\\":0.3000000119209290}\\n\",\"slots\":[]}],\"lexical_analysis\":[{\"basic_word\":[\"今天\"],\"term\":\"今天\",\"type\":\"32\",\"weight\":0.0},{\"basic_word\":[\"济南\"],\"term\":\"济南\",\"type\":\"23\",\"weight\":0.0},{\"basic_word\":[\"下雨\"],\"term\":\"下雨\",\"type\":\"34\",\"weight\":0.0},{\"basic_word\":[\"吗\"],\"term\":\"吗\",\"type\":\"38\",\"weight\":0.0},{\"basic_word\":[\"?\"],\"term\":\"?\",\"type\":\"37\",\"weight\":0.0}],\"qu_res_chosen\":\"{\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"RAIN\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"{\\\\\\\"group_id\\\\\\\":\\\\\\\"4\\\\\\\",\\\\\\\"match_keywords\\\\\\\":\\\\\\\" kw_weather:下雨\\\\\\\",\\\\\\\"match_pattern\\\\\\\":\\\\\\\"[D:kw_weather]\\\\\\\",\\\\\\\"ori_pattern\\\\\\\":\\\\\\\"[D:kw_weather]\\\\\\\",\\\\\\\"ori_slots\\\\\\\":{\\\\\\\"domain_confidence\\\\\\\":0.0,\\\\\\\"extra_info\\\\\\\":{},\\\\\\\"from_who\\\\\\\":\\\\\\\"smart_qu\\\\\\\",\\\\\\\"intent\\\\\\\":\\\\\\\"RAIN\\\\\\\",\\\\\\\"intent_confidence\\\\\\\":100.0,\\\\\\\"intent_need_clarify\\\\\\\":false,\\\\\\\"match_info\\\\\\\":\\\\\\\"[D:kw_weather] kw_weather:下雨\\\\\\\",\\\\\\\"slots\\\\\\\":[{\\\\\\\"begin\\\\\\\":8,\\\\\\\"confidence\\\\\\\":100.0,\\\\\\\"father_idx\\\\\\\":-1,\\\\\\\"length\\\\\\\":4,\\\\\\\"name\\\\\\\":\\\\\\\"kw_weather\\\\\\\",\\\\\\\"need_clarify\\\\\\\":false,\\\\\\\"normalized_word\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"original_word\\\\\\\":\\\\\\\"下雨\\\\\\\",\\\\\\\"word_type\\\\\\\":\\\\\\\"\\\\\\\"}]},\\\\\\\"real_threshold\\\\\\\":0.0,\\\\\\\"threshold\\\\\\\":0.3000000119209290}\\\\n\\\",\\\"slots\\\":[]}\\n\",\"raw_query\":\"今天济南下雨吗?\",\"sentiment_analysis\":{\"label\":\"1\",\"pval\":0.0},\"status\":0,\"timestamp\":0},\"schema\":{\"domain_confidence\":0.0,\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"slots\":[]},\"status\":0}],\"bernard_status\":[{\"index\":0,\"step\":\"AFTER_DM_TRIGGER\"}],\"intervention\":{\"qu_res_original\":\"\",\"query_original\":\"\",\"type\":\"\"},\"user_slots\":{}},\"dialog_state\":{\"contexts\":{},\"intents\":[{\"index\":0,\"name\":\"RAIN\"}],\"user_slots\":{}},\"interactions\":[{\"interaction_id\":\"interaction-1528677432257-1690144744-8013-1\",\"request\":{\"bernard_level\":0,\"client_session\":\"{\\\"client_results\\\":\\\"\\\", \\\"candidate_options\\\":[]}\",\"query\":\"今天济南下雨吗?\",\"query_info\":{\"asr_candidates\":[],\"source\":\"KEYBOARD\",\"type\":\"TEXT\"},\"updates\":\"\",\"user_id\":\"UNIT_WEB_3896\"},\"response\":{\"action_list\":[{\"action_id\":\"rain_user_locale_clarify\",\"confidence\":100.0,\"custom_reply\":\"\",\"refine_detail\":{\"clarify_reason\":\"slot_absent\",\"interact\":\"ask\",\"option_list\":[{\"info\":{\"name\":\"user_locale\",\"text\":\"地点\"},\"option\":\"user_locale\"}]},\"say\":\"在哪里\",\"type\":\"clarify\"}],\"msg\":\"ok\",\"qu_res\":{\"candidates\":[{\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"4\\\",\\\"match_keywords\\\":\\\" kw_weather:下雨\\\",\\\"match_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_slots\\\":{\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"RAIN\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"[D:kw_weather] kw_weather:下雨\\\",\\\"slots\\\":[{\\\"begin\\\":8,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":4,\\\"name\\\":\\\"kw_weather\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"下雨\\\",\\\"word_type\\\":\\\"\\\"}]},\\\"real_threshold\\\":0.0,\\\"threshold\\\":0.3000000119209290}\\n\",\"slots\":[]},{\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"ml_qu\",\"intent\":\"RAIN\",\"intent_confidence\":99.99987030029297,\"intent_need_clarify\":false,\"match_info\":\"\",\"slots\":[{\"begin\":0,\"confidence\":99.77693176269531,\"father_idx\":-1,\"length\":2,\"name\":\"user_time\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"今天\",\"word_type\":\"\"},{\"begin\":2,\"confidence\":99.78426361083984,\"father_idx\":-1,\"length\":2,\"name\":\"user_locale\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"济南\",\"word_type\":\"\"}]}],\"lexical_analysis\":[{\"basic_word\":[\"今天\"],\"term\":\"今天\",\"type\":\"32\",\"weight\":0.0},{\"basic_word\":[\"济南\"],\"term\":\"济南\",\"type\":\"23\",\"weight\":0.0},{\"basic_word\":[\"下雨\"],\"term\":\"下雨\",\"type\":\"34\",\"weight\":0.0},{\"basic_word\":[\"吗\"],\"term\":\"吗\",\"type\":\"38\",\"weight\":0.0},{\"basic_word\":[\"?\"],\"term\":\"?\",\"type\":\"37\",\"weight\":0.0}],\"qu_res_chosen\":\"{\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"RAIN\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"{\\\\\\\"group_id\\\\\\\":\\\\\\\"4\\\\\\\",\\\\\\\"match_keywords\\\\\\\":\\\\\\\" kw_weather:下雨\\\\\\\",\\\\\\\"match_pattern\\\\\\\":\\\\\\\"[D:kw_weather]\\\\\\\",\\\\\\\"ori_pattern\\\\\\\":\\\\\\\"[D:kw_weather]\\\\\\\",\\\\\\\"ori_slots\\\\\\\":{\\\\\\\"domain_confidence\\\\\\\":0.0,\\\\\\\"extra_info\\\\\\\":{},\\\\\\\"from_who\\\\\\\":\\\\\\\"smart_qu\\\\\\\",\\\\\\\"intent\\\\\\\":\\\\\\\"RAIN\\\\\\\",\\\\\\\"intent_confidence\\\\\\\":100.0,\\\\\\\"intent_need_clarify\\\\\\\":false,\\\\\\\"match_info\\\\\\\":\\\\\\\"[D:kw_weather] kw_weather:下雨\\\\\\\",\\\\\\\"slots\\\\\\\":[{\\\\\\\"begin\\\\\\\":8,\\\\\\\"confidence\\\\\\\":100.0,\\\\\\\"father_idx\\\\\\\":-1,\\\\\\\"length\\\\\\\":4,\\\\\\\"name\\\\\\\":\\\\\\\"kw_weather\\\\\\\",\\\\\\\"need_clarify\\\\\\\":false,\\\\\\\"normalized_word\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"original_word\\\\\\\":\\\\\\\"下雨\\\\\\\",\\\\\\\"word_type\\\\\\\":\\\\\\\"\\\\\\\"}]},\\\\\\\"real_threshold\\\\\\\":0.0,\\\\\\\"threshold\\\\\\\":0.3000000119209290}\\\\n\\\",\\\"slots\\\":[]}\\n\",\"raw_query\":\"今天济南下雨吗?\",\"sentiment_analysis\":{\"label\":\"1\",\"pval\":0.0},\"status\":0,\"timestamp\":0},\"schema\":{\"domain_confidence\":0.0,\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"slots\":[]},\"status\":0},\"timestamp\":\"2018-06-11 08:37:12.257\"}],\"session_id\":\"session-1528677432121-1690144744-8013-1\"}\n",
"interaction_id": "interaction-1528677432257-1690144744-8013-1",
"log_id": "9497bf30-6d0f-11e8-b7f2-73f1d09232d4",
"response": {
"action_list": [
{
"action_id": "rain_user_locale_clarify",
"confidence": 100,
"custom_reply": "",
"refine_detail": {
"clarify_reason": "slot_absent",
"interact": "ask",
"option_list": [
{
"info": {
"name": "user_locale",
"text": "地点"
},
"option": "user_locale"
}
]
},
"say": "在哪里",
"type": "clarify"
}
],
"msg": "ok",
"qu_res": {
"candidates": [
{
"domain_confidence": 0,
"extra_info": [],
"from_who": "smart_qu",
"intent": "RAIN",
"intent_confidence": 100,
"intent_need_clarify": false,
"match_info": "{\"group_id\":\"4\",\"match_keywords\":\" kw_weather:下雨\",\"match_pattern\":\"[D:kw_weather]\",\"ori_pattern\":\"[D:kw_weather]\",\"ori_slots\":{\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"[D:kw_weather] kw_weather:下雨\",\"slots\":[{\"begin\":8,\"confidence\":100.0,\"father_idx\":-1,\"length\":4,\"name\":\"kw_weather\",\"need_clarify\":false,\"normalized_word\":\"\",\"original_word\":\"下雨\",\"word_type\":\"\"}]},\"real_threshold\":0.0,\"threshold\":0.3000000119209290}\n",
"slots": []
},
{
"domain_confidence": 0,
"extra_info": [],
"from_who": "ml_qu",
"intent": "RAIN",
"intent_confidence": 99.999870300293,
"intent_need_clarify": false,
"match_info": "",
"slots": [
{
"begin": 0,
"confidence": 99.776931762695,
"father_idx": -1,
"length": 2,
"name": "user_time",
"need_clarify": false,
"normalized_word": "",
"original_word": "今天",
"word_type": ""
},
{
"begin": 2,
"confidence": 99.78426361084,
"father_idx": -1,
"length": 2,
"name": "user_locale",
"need_clarify": false,
"normalized_word": "",
"original_word": "济南",
"word_type": ""
}
]
}
],
"lexical_analysis": [
{
"basic_word": [
"今天"
],
"term": "今天",
"type": "32",
"weight": 0
},
{
"basic_word": [
"济南"
],
"term": "济南",
"type": "23",
"weight": 0
},
{
"basic_word": [
"下雨"
],
"term": "下雨",
"type": "34",
"weight": 0
},
{
"basic_word": [
"吗"
],
"term": "吗",
"type": "38",
"weight": 0
},
{
"basic_word": [
"?"
],
"term": "?",
"type": "37",
"weight": 0
}
],
"qu_res_chosen": "{\"domain_confidence\":0.0,\"extra_info\":{},\"from_who\":\"smart_qu\",\"intent\":\"RAIN\",\"intent_confidence\":100.0,\"intent_need_clarify\":false,\"match_info\":\"{\\\"group_id\\\":\\\"4\\\",\\\"match_keywords\\\":\\\" kw_weather:下雨\\\",\\\"match_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_pattern\\\":\\\"[D:kw_weather]\\\",\\\"ori_slots\\\":{\\\"domain_confidence\\\":0.0,\\\"extra_info\\\":{},\\\"from_who\\\":\\\"smart_qu\\\",\\\"intent\\\":\\\"RAIN\\\",\\\"intent_confidence\\\":100.0,\\\"intent_need_clarify\\\":false,\\\"match_info\\\":\\\"[D:kw_weather] kw_weather:下雨\\\",\\\"slots\\\":[{\\\"begin\\\":8,\\\"confidence\\\":100.0,\\\"father_idx\\\":-1,\\\"length\\\":4,\\\"name\\\":\\\"kw_weather\\\",\\\"need_clarify\\\":false,\\\"normalized_word\\\":\\\"\\\",\\\"original_word\\\":\\\"下雨\\\",\\\"word_type\\\":\\\"\\\"}]},\\\"real_threshold\\\":0.0,\\\"threshold\\\":0.3000000119209290}\\n\",\"slots\":[]}\n",
"raw_query": "今天济南下雨吗?",
"sentiment_analysis": {
"label": "1",
"pval": 0
},
"status": 0,
"timestamp": 0
},
"schema": {
"domain_confidence": 0,
"intent": "RAIN",
"intent_confidence": 100,
"slots": []
},
"status": 0
},
"timestamp": "2018-06-11 08:37:12.257",
"version": "2.0"
}
同问词槽的置信度问题
是不是个BUG,bot反问频率修改后无效
应该有什么参数可以控制这个阈值才对,不知道在哪里