I'm creating a chatbot to identify questions about store and products and answer accordingly with 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
ProductQuestions, StoreQuestions
The training has to be done for all the 1st approach question types in those 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:
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.
Try making conversation flow chart before designing the intents.
Using Dialogflow:
WorkFlow:
Open the Actions Console.
Click on Add/import project.
Type in a Project name, like "actions-codelab". This name is for your own internal reference; later on, you can set an external name for your project.
Click Create Project.
Rather than pick a category, click Skip on the upper-right corner.
Click Build > Actions in the left nav.
Click Add your first Action.
Select at least one language for your Action, followed by Update. For this codelab, we recommend only selecting English.
On the Custom intent card, click Build. This will open the Dialogflow Console in another tab.
2. Test with Dialogflow:
Dialogflow generates and uploads an Action package to your actions project automatically when you test it. To test your Action:
Make sure the Web & App Activity, Device Information, and Voice & Audio Activity permissions are enabled on the Activity controls page for your Google account.
Click on Integrations in the Dialogflow console's left navigation.
Click on the Google Assistant card to bring up the integration screen and click TEST. Dialogflow uploads your Action package to Google's servers, so you can test the latest version in the simulator.
In the Actions console simulator, enter "talk to my test app" in the Input area of the simulator to test your Action. If you have already specified an invocation name and saved your invocation information, you can start the conversation by saying talk to instead.
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.
For more information refer below link:
https://codelabs.developers.google.com/codelabs/actions-1/index.html#0
Related
I have a technical question about the Google Assistant - unfortunately, I couldn't find a clear answer anywhere.
At the moment our company have:
the conversational chatbot built on Dialogflow, which is constantly developed by our employees
Google Actions agent. Our developers managed to construct the connection of the Google account and our client's account on our platform using OAuth 2.0 and created the first actions that, by the exchange of tokens, allow the return of certain information from our platform to the Google Assistant and vice versa - providing certain information in the Google Assistant that are sent and saved in the customer's account on our platform.
We would like both actions on actions.google.com (2) and conversations on Dialogflow (1) to cooperate with each other in the Google Assistant. One team is working on the chatbot, and the other on advanced actions, and we would like it to stay that way.
My question is - is the absolute only way to finally publish it on the google assistant is to migrate the chatbot from Dialogflow to Actions Builder and stop using Dialogflow?
Or maybe there is a simpler solution where both these environments (of course woring on one profile / agent) cooperate with each other and it will be possible to continue working on dialogflow?
We understand the advantages of Action Builder, but Dialogflow is just good enough for our needs.
There are a few angles to how you can approach this, depending on your exact needs and limitations you may accept, but the general answer is "yes, you can do both at the same time".
First, Dialogflow ES continues to support the Actions on Google Integration. Just as your Dialogflow agent integrates with other platforms, it should still be able to integrate with Actions.
There are some caveats (and some upsides!) with this, however:
You'll be using the Actions on Google v2 platform, rather than the v3 that comes with the Action Builder (and newer SDK). If the features you need are supported on v2, then you're fine. (Account Linking is supported in v2.) But if you need some of the features in v3, then you will run into problems.
You can't have used the Action Builder on the same Cloud project, and you should start the integration from the Dialogflow side. (But once you do - you'll be able to use the Actions Console to do things such as submit it for review, etc.)
Make sure you do not "upgrade" from Dialogflow to Actions Builder. This severs the two, so you won't be able to update the Action from Dialogflow.
Another approach is that you can use Action Builder, but have it forward all (or nearly all) of the requests to Dialogflow. Under this scheme, you would have an Action Builder project that has as little as one Scene with an Intent that captures all input, sends that to a webhook you control, which sends it to your Dialogflow agent via the Dialogflow API, gets the response from your Dialogflow agent, and forwards that response through Action Builder.
This is a little more complicated, but may offer some benefits if you want to take advantage of more advanced Action concepts that may not be available using v2.
I am developing a Google Action for Google Assistant and it is not yet a state where I can release. Even so I want it to be available for some tester, and in a near future, my client.
The simulator with the "test" is somewhat limited at auth request, name recognition (since it will only knows my action) and experience (to show my client), so I prefer not to depend on it for this case.
I found it is only possible to interact with a test version of an action if the project owner's account is logged in as a Google account in the phone where you want to call the action. Is it correct? Or there is another way?
I even tried adding my wife's Google account as a viewer to the project, but I am unable to call my action from her phone.
You can add people as a viewer to the project. Before those users can call your action on any of their devices, they will need to use the test console at https://console.actions.google.com/ once, this will enable testing on their device. After that they will be able to interact with your action on their devices.
Do note, the time in which the action is available on their account is limited by a time period (about a couple of months). If they cant access the action any more after a couple of months, just repeat the above step to reactivate testing for their account.
Update
One thing that you could consider in the two approached posted by #Prisoner and me is if your testers need to test on just a device or need access to the console as well. Using the approach from #Prisoner will allow your users to test on devices. The above approach will also allow testers to use the console at https://console.actions.google.com/.
In addition to #Jordi's answer, you can also do an Alpha Release of your Action. This lets you permit up to 20 additional accounts to the released version
Once you permit them using the console, you will send them the opt-in URL, which they should visit on a mobile device with that account. Once they have opted into the Alpha, they can activate it using the regular trigger phrase.
It seems Google Assistant is unable to handle certain trigger phrases in the intent. The ones I have come across are the following:
Send message to scott
chat with q
Send text to felix
It seems to work fine inside dialogflow simulator. However, it doesn't work at all in Action Console Simulator or on a real device like google home mini. On Action Console Simulator, it gives "You cannot use standard Google Assistant features in the Simulator. If you want to try them, use Google Assistant on your phone or other compatible devices" and on a real device it gives an error "I am sorry, i cannot help you .." and exits completely and leaves the device in a funky state. It doesn't seem to trigger any fallback intent. I have tried adding input context but make no difference.
It's very easy to reproduce. Just create a demo action with an intent for the above phrases along with "communicate with penny", invoke your app and then try the above phrases after the welcome message. It will only work if you say "communicate with ..".
Is this a known issue/limitation? Is there a list of phrases that we cannot use to trigger an intent?
The Actions on Google libraries (Node.js, Java) include a limited feature-set that allow third-party developers to build actions for the Google Assistant.
Standard features available in the Google Assistant (like "text Mary 'Hello, world!'") won't be available in your action until you build that feature, using fulfillment.
Rather than looking for a list of phrases you can't use, review the documentation for invocation to see what you can use. Third party actions for the Google Assistant are invoked like:
To learn how to get started building for the Google Assistant, check out Google's codelabs at https://codelabs.developers.google.com/codelabs/actions-1/#0
If you've already reviewed Google's Actions on Google Codelabs through level three, consider updating your question to include a list of your intents and a code sample of your fulfillment, so other Stack Overflow users can understand how your project behaves.
See also, What topics can I ask about here?, and How do I ask a good question?
I can get intents confidence via the JSON response object by back-end languages like Node or Python, but I can't get that in the browser-based IBM Watson Assistant user interface. Is there a way to get that?
You can use <? intents ?> to get the information on the intents.
The object is read/writable in dialog.
The Watson Assistant online tool to edit workspaces and the dialog elements has the "Try it out". However, it does not have the capabilities yet to explore the JSON structure returned by the message API.
What I use is this tool which allows to test a conversation, see and edit the context and inspect the confidence levels. There is also another, browser-based, tool you could use. None of them are official.
You can also use network tools on your browser to see the Json of the whole message being passed around.
Typically you right click anywhere and click “inspect element” and then go to the network tab.
I've tried now several times understanding if it is possible, and if yes how, to create custom actions that are available just for me on a Google Home device. I have a working Dialog Flow agent that works well in the Dialog Flow simulator. It used to work in the Google Assistant simulator and I could enable it for one hour, but now that doesn't work either.
I would be happy using IFTTT if it had webhook responses instead of just fixed responses...
Am I barking up the wrong tree?
There is not a good way to have private actions for a given user. The only way to do it is to enable testing for a given project. Then all devices using your account should be able to "talk to my test app" and communicate to your webhook. However, this test may end after a few days.