我使用Microsoft bot框架创建了一个客户服务LUIS QnA bot。这个机器人程序应该回答客户的问题和他们面临的问题,这样常见问题解答就会由机器人程序回答,而不会直接发送到服务台。
然而,它并不具有互动性,因为它不具备上下文智能。我如何训练它,使它能够回答诸如"我能获得有关该主题的更多细节吗?"等问题。如果使用LUIS可以做到这一点,我想知道如何做到。
您可以使用LUIS Action Binding框架,因为它支持下面提到和引用的三个主要场景,但它也提供了可用于在自己的应用程序中实现或支持自定义场景的工具。
场景#1:从一个操作切换到一个新操作
Bot: What do you want to do?
User: Find me a hotel in Madrid -- This would trigger a new `FindHotels` intent with Madrid as Location entity
Bot: When do you want to check-in?
User: Today
Bot: When do you want to check-out?
User: I changed my mind, find flights to Madrid -- This would trigger a new `FindFlights` intent with Madrid as Location entity (`FindHotels` progress is discarded)
Bot: When do you want to flight?
场景#2:在有效上下文内触发上下文操作
Bot: What do you want to do?
User: Find me a hotel in Madrid -- This would trigger a new `FindHotels` intent with Madrid as Location entity
Bot: When do you want to check-in?
User: Today
Bot: When do you want to check-out?
User: Sorry, change the checkin date to tomorrow -- This would trigger a `FindHotels-ChangeCheckin` intent with tomorrow as date (but will execute within the context of `FindHotels` and will update its check-in date previously set)
Bot: Ok, I changed the check-in date to tomorrow
Bot: When do you want to check-out?
场景#3:在没有先前上下文的情况下触发上下文操作(即从头开始(
User: Please change my check-in date to tomorrow
Bot: Ok, I changed the check-in date to tomorrow -- This triggered the `FindHotels-ChangeCheckin` intent which should run in the context of the `FindHotels` action (so main action also is instanced)
Bot: I changed your reservation in Madrid from 03/25 to 03/27 -- The required parameters of the main context are iterated until it can call the action fulfillment
我提到和引用的例子与Node示例有关,如果你使用C#,你可以在这里找到一个示例
你也可以在这里找到一篇关于它的博客文章来指导你