当前位置:   article > 正文

rasa_core之Slot Filling翻译(未完待续)_rasa3.0 表单

rasa3.0 表单

英文地址:http://www.rasa.com/docs/core/slotfilling/ 

当前版本: 0.10.2

Slot Filling(词槽填充)

One of the most common conversation patterns is to collect a few pieces of information from a user in order to do something (book a restaurant, call an API, search a database, etc.). This is also called slot filling.

最常见的对话模式是从多次对话中收集一些信息,这些信息可以用来做一些事情,比如:预定一个酒店、调用一个api接口、查询数据库等,这个也称之为词槽填充。

Example: Providing the Weather(例如:提供天气服务)

Let’s say you are building a weather bot ⛅️. If somebody asks you for the weather, you will need to know their location. Users might say that right away, e.g. What’s the weather in Caracas? When they don’t provide this information, you’ll have to ask them for it. We can provide two stories to Rasa Core, so that it can learn to handle both cases:

假设你要建设一个提供天气服务的机器人,如果有人向你询问天气情况,那么你需要知道他要询问哪里的天气?用户可能会说:首都的天气怎么样?这个时候你可能不知道用户说的是哪个首都,那么你就可能需要去反问用户从而得到你想要的信息,我们可以提供2个故事给rasa_core 让他可以学习这2个案例。

  1. # story1
  2. * ask_weather{"location": "Caracas"}
  3. - action_weather_api
  4. # story2
  5. * ask_weather
  6. - utter_ask_location
  7. * inform{"location": "Caracas"}
  8. - action_weather_api

Here we are assuming you have defined an inform intent, which captures the cases where a user is just providing information.

这里假设你定义了一个能够捕获用户提供信息的 inform (通知) 意图。

But Custom Actions can also set slots, and these can also influence the conversation. For example, a location like San Jose could refer to multiple places, in this case, probably in Costa Rica

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/630319
推荐阅读
相关标签
  

闽ICP备14008679号