问题描述
我正在尝试制作医疗诊断聊天机器人。一般的想法是,机器人会提示用户出现症状。
用户必须输入至少1种症状,最多3种症状。
I'm trying to make a medical diagnosis chatbot. The general idea is that the bot prompts the user for symptoms.The user must input at least 1 symptom and a maximum of 3 symptoms.
当用户执行以下操作之一时,通话结束:
The end of conversation is reached when user does one of the following:
- 输入3种症状或
- 输入至少1种症状后输入'end'
示例1(3种症状):
Bot:您好!诊断机器人在这里为您服务。请输入您遇到的症状。
Bot: Hello! Diagnosis Bot at your service here. Please type in the symptoms you are having.
用户:咳嗽
注意:咳嗽!请输入其他症状。
Bot: Gotcha! Please type in another symptom.
用户:发烧
提示:Roger that。请输入其他症状。
Bot: Roger that. Please type in another symptom.
用户:痰
Bot:我收到以下症状:咳嗽,发烧,痰。给我几秒钟来计算您的诊断.....
Bot: I have received the following symptoms: Cough, Fever, Phlegm. Give me a few seconds to calculate your diagnosis.....
//这部分将连接到定制的AI引擎
// This part will connect to a custom built AI engine
示例2(2种症状):
Bot:您好!诊断机器人在这里为您服务。请输入您遇到的症状。
Bot: Hello! Diagnosis Bot at your service here. Please type in the symptoms you are having.
用户:胸痛
注意:该死!请输入其他症状。
Bot: Gotcha! Please type in another symptom.
用户:头晕
Bot:Roger that。请输入其他症状。
Bot: Roger that. Please type in another symptom.
用户:结束
Bot:我收到以下症状:胸痛,头晕。给我几秒钟来计算您的诊断.....
Bot: I have received the following symptoms: Chest pain, Dizziness. Give me a few seconds to calculate your diagnosis.....
要设计此聊天机器人,我需要进行以下设置:
To design this chat bot, I have setup the following:
- 一个症状实体
- 一个入门意图
- 一个症状-输入的意图,需要3个症状参数。
问题:
我想对其进行设置,以便用户随时随地在任何提示中键入 end,然后完成症状输入意图并调用症状结束意图。我该怎么做?
Question:I would like to set it up so that at any point the user types 'end' to any of the prompts then it finishes the symptom-input intent and invokes the symptom-end intent. How do I do so?
症状实体:
入门意图:
症状输入意图:
症状-最终意图:
推荐答案
似乎不是一个好的设计,用户如何知道他可以用'end'k完成输入eyword?最好是您的代理人只接受这样的症状列表:
This doesn't seem like a good design, how would the user know that he can finish the input with the 'end' keyword? It would be better if your agent would simply accept a list of symptoms like so:
Bot:您好!诊断机器人在这里为您服务。请告诉我您有什么症状。
Bot: Hello! Diagnosis Bot at your service here. Please tell me what symptoms you are having.
用户:我发烧,头晕和胸痛。
User: I'm having fever, dizziness and chest pain.
Bot:好的,请给我几秒钟的时间来计算您的诊断....
Bot: Ok, give me a few seconds to calculate your diagnosis.....
您要做的就是检查<$ c $症状输入意图参数表中症状参数旁边的c> list 框。这将使您的对话框更短,更直观,并且省去了单独的症状末期意图的需要。有关详细信息,请参见。
All you have to do for that is to check the list
box next to the symptom parameter in the parameter table of your symptom-input intent. This would make your dialog shorter and more intuitive and save you the need for a separate symptom-end intent. See the documentation on parameters for details.
这篇关于如何设置条件参数?我想提示用户3种症状,但是如果用户键入“ end”,则意图已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!