Building a Weather Chatbot with RASA NLU and RASA Core
什么是chatbot?
chatbot可以通过按程序编写的响应或人工智能来满足用户的问题,而无需过多的人工敢于。chatbot有两种类型,一种是基于规则的,无法管理复杂的。 另一个是自学机器人。
为何选择rasa?
RASA是一个开源AI工具,可以轻松安装在本地计算机上。
rasa 是什么?
- rasa nlu
RASA NLU(自然语言理解)是一种开源自然语言处理工具,用于做意图分类(描述什么类型的消息)和实体识别(具体是用户询问的内容),以下是 intent is ask_weather_location and entity is location
- rasa core
RASA Core是用于构建AI助手的对话引擎。它使用在示例对话(来自NLU的结构化输入)上训练的机器学习模型而不是一堆if / else语句来决定下一步做什么(使用像LSTM神经网络这样的概率模型的下一个最佳动作)。
a.Defind stories: 它包含用户和机器人将拥有的示例交互。 RASA(Core)从每个故事中创建了一个可能的交互模型。
b. Define Domain: 这个文件列出了所有的intents, entities, actions, templates, slots and some more information.
i. Slots: Slots 就像值的占位符一样,使机器人能够跟踪对话。
ii. Actions: chatbot 会说或者做的事情。
iii. Templates: chatbot返回给用户的模板。
c. Define custom actions: 要获取天气数据,我们需要天气API“https://weather.api.here.com”。
d. Train: Define agent and train the NLU core.