如何针对问题做出正确的回应?
来自用户的3个对话流后,我得到了机器人的线性响应。
现有的API结构。 Screenshot of my api.ai flow
eg: user: I'd like to book a room, please.
bot: What kind of room would you like?
user: March 23rd.
bot: Certainly. When for, Sir/Madam?
user: Three nights.
bot: How long will you be staying?
user: What kind of rooms do u have?
bot: Certainly. When for, Sir/Madam?
exceptation
user: I'd like to book a room, please.
bot: Certainly. When for, Sir/Madam?
user: March 23rd.
bot: How long will you be staying?
user: Three nights.
bot: What kind of room would you like?
user: What kind of rooms do u have?
答案 0 :(得分:0)
看起来你已经混淆了意图,用户说例子和回复。每个用户都说示例是用户可以说出来以匹配整个意图的示例。如果意图匹配,则随机选择意图的响应之一并将其呈现给用户。如果您想在用户表明他们想要预订房间后提出您提及的问题顺序,那么您应该使用API.AI调用slot filling。如果你这样做,你的意图将如下所示: 您还需要创建一个房间类型实体。我为你创建了一个基本的,看起来像这样:
如果您使用&#34查询您的API.AI代理商,我想预订房间。"对话将如下所示:
用户:"我想预订房间。"
API.AI :" Certianly。什么时候,先生/女士?"
用户:" 3月23日。"
API.AI :"您将如何记录日志?"
用户:"三晚。"
API.AI :"您想要什么样的房间?"
用户:"套房"
API.AI :"太棒了!我已于3月23日预订了您的套房3天。"