How to get subjective answer from user

情到浓时终转凉″ 提交于 2019-12-24 21:33:27

问题


Is it possible to get a subjective answer from user? Here is sample conversation that I am trying to build,

  1. User: "I found a bug." => [triggers 'bug report' intent]
  2. Agent: "Can you explain the problem?"
  3. User: "App crashes everytime when I ask about xxx." => ['bug report follow-up' intent fails]

I wanted to catch the user answer, line #3. Even if I setup correct follow-up context, 'Default Fallback' or other intent came out and handle the user response. It seems there is no intent that can handle this kind of user query. I could not put 'Training phrase' because the answer can be any sentence. Maybe I can ask user to answer like "[The problem is] xxxxx", or "xxxxx [is not working], but it is not natural and limit the user answer. If there is a workaround to catch whole user query right after some intent, please share with me. :)


回答1:


You should make 2 intents for this, lets say bug-1 and bug-2.

In the bug-1, provide found a bug in training phrases and bug in output context and Can you explain the problem? in response.
Now in bug-2, give bug as input context, change training phrases to template mode and give @sys.any in that and give some parameter name. Ex: @sys.any:bug.

Now bug will contain the entire user query.

EDIT 1:
By using @sys.any:bug, the the user query will be stored in the parameter named bug, which we can use in response by referencing $bug. See the pic below for clarification.

Hope it helps.



来源:https://stackoverflow.com/questions/52264546/how-to-get-subjective-answer-from-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!