rasa_core之Slot Filling翻译(未完待续)

本文介绍了词槽填充技术,这是对话系统中常见的模式之一,旨在从用户的对话中收集必要的信息来完成任务,如预订餐厅或查询天气。文章通过具体例子说明了如何训练对话系统在不同场景下获取所需信息。

英文地址: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个案例。

# story1
* ask_weather{"location": "Caracas"}
   - action_weather_api

# story2
* ask_weather
   - utter_ask_location
* inform{"location": "Caracas"}
   - 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值