[英]How To construct Intents in Dialogflow
I'm creating a chatbot to identify questions about store and products and answer accordingly with Dialogflow. 我正在创建一个聊天机器人,以识别有关商店和产品的问题,并使用Dialogflow做出相应的回答。 But when constructing intents I came across this problem.
但是在构造意图时,我遇到了这个问题。 The approaches I think I can construct as follows.
我认为我可以构建的方法如下。
1st Approach 第一种方法
Create multiple intents 创建多个意图
GetPrice, GetColor, GetAvailability, GetType, GetStoreName, GetStoreContact
The difficulty that I found in this approach is I have to create dozens of intents for all product types and for all types of questions about store 我在这种方法中发现的困难是,我必须针对所有产品类型以及有关商店的所有类型的问题创建数十个意图
The advantage is that I can train for the intents seperately. 好处是我可以分别训练意图。
2nd Approach 第二种方法
Create 2 intents 创建2个意图
ProductQuestions, StoreQuestions
The training has to be done for all the 1st approach question types in those 2 必须针对这2种方法中的所有第一种方法问题进行培训
What approach I should take? 我应该采取什么方法? In future this will be more scalable.
将来这将更具可扩展性。
Most logic for conversation design can be based on your personal preferences. 对话设计的大多数逻辑都可以基于您的个人喜好。 If you're looking for best practices, check out Google's documentation here:
如果您正在寻找最佳做法,请在此处查看Google的文档:
https://developers.google.com/actions/assistant/best-practices https://developers.google.com/actions/assistant/best-practices
As per my opinion you should go with 1st approach. 根据我的意见,您应该采用第一种方法。 It is more flexible and scalable.
它更加灵活和可扩展。
You would need to make many intents for sure but you would be able to get what user wants to know exactly. 您需要确定许多意图,但是您将能够获得用户想要确切了解的内容。
In the 2nd approach, you would need to do many things for which you are using DialogFlow. 在第二种方法中,您将需要执行许多要使用DialogFlow的事情。
Try making conversation flow chart before designing the intents. 在设计意图之前,请尝试制作对话流程图。
Using Dialogflow: 使用Dialogflow:
WorkFlow: 工作流程:
2. Test with Dialogflow: 2.使用Dialogflow进行测试:
Dialogflow generates and uploads an Action package to your actions project automatically when you test it. 在测试时,Dialogflow会自动生成一个动作包并将其上传到动作项目。 To test your Action:
要测试您的操作:
Note : If you don't see a TEST button, you need to click on the AUTHORISE button first to give Dialogflow access to your Google account and Actions project. 注意 :如果没有看到“测试”按钮,则需要首先单击“授权”按钮,以使Dialogflow可以访问您的Google帐户和“操作”项目。
For more information refer below link: 有关更多信息,请参见下面的链接:
https://codelabs.developers.google.com/codelabs/actions-1/index.html#0 https://codelabs.developers.google.com/codelabs/actions-1/index.html#0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.