I had my agent working fine in the Dialogflow console, hitting on my intent training phrases where one of the entity/parameter matchings was a staff name entity. I would run it through the console and it would display the Action Parameter and value correctly. It's been around a week and I when back to the console to add additional training phrases. I simply copied one of the training phrases and pasted it into the "Try it Now" field and now the action no longer hits on the staff parameter.
Any ideas on why I can have training phrases hit on the parameter, but the "Try it now" the the exact same phrase can not?
I tried making changes to the Entity and run it through the learning phase.
I added a new training phrase and it did automatically pick up the staff entity. Saved it as well and allowed training to complete. Pasted in the exact training phrase to the "Try it now" and again no hit on the action parameter.
Dialogflow console screen shot
The Diagnostic info basically just showed what the console "Try it now" window showed.
Related
The DialogFlow documentation writes that the base WelcomeDefaultIntent is triggered either by matching training phrases or every time the user starts a dialogue. But this is not true. If the user's phrases match one of the training phrases of another intent, this intent is triggered, instead of a WelcomeIntent. As a result, the user does not understand that he is communicating with the bot and the quality of service fall down. Please, give a hint, how to make the DefaultWelcomeIntent always works first when the user starts a dialogue, no matter what he wrote. I hope on you
That is an expected behavior. As the documentation mentions:
The default welcome intent is matched in one of two ways:
One of its training phrases are matched, which are pre-populated with
common greetings, like "hello".
This intent has a welcome event
attached to it, which is triggered when the end-user begins a
conversation with your agent via a supported integration.
However, it doesn't specify that no other intents can be matched at the beginning of a conversation. At the end of the day, the default welcome intent is just another intent that is automatically created alongside the agent, and pre-populated with training phrases. Intents will always "compete" with each other's matching phrases, so the best intent gets selected according to the user input, regardless of whether the intent is the welcome default intent or not.
From a natural conversational point of view, it doesn't makes much sense to "force" the welcome intent to always be triggered at the beginning of a conversation, regardless of the user input. An example could be:
User: What time is it?
Bot: It's 1:55 pm PT.
And you would be forcing this into something like:
User: What time is it?
Bot: Hey, my name is Bot, how can I help you?
User: What time is it?
Bot: It's 1:55 pm PT.
Adding an extra interaction for the user.
However, if you do want to force your welcome intent at the start of a conversation, or your use case requires to, you could try with:
Dialogflow Contexts, or.
Using the Detect Intent API method, which can receive a EventInput object that allow for matching intents by event name instead of the natural language input. Hence, you could use this to match the intent attached to the Welcome event, regardless of the user input.
I'm having an issue when attempting to enter specific intents based on the value of a property.
I currently have a question that gets asked, which then fires off to the Microsoft Translator via a HTTP Request and from that, it fires off to the LUIS API with that text.
After that, I would like to enter an intent based on the top intent that the LUIS API Call brought back.
I have the Translator and The LUIS API bringing back values and I can output these using Send Responses:
However, when I attempt to call an intent based on the value of the property, I just get an Object Reference error:
Is what I'm trying to do possible and if so am I going about this entirely the wrong way causing more issues for myself?
Thanks In Advance
I'm trying to understand exactly what you are trying to achieve. Do I summarize it correctly as following?
You start a main dialog. In that dialog you take some user input.
You translate the input, and manually send the the translated text off to LUIS for intent recognition.
Based on the recognized intent, you want to start a specific sub dialog.
I don't believe you can just 'call an intent'. An intent is the result of a LUIS or Regex recognizer, which is processed automatically by Bot Framework. The recognizer is processed at every user input. There is no need to call LUIS yourself as a HTTP request. The recognizer (LUIS or RegEx) is configured on the main dialog properties in Bot Framework Composer:
Although in this case it looks like you are manually doing the LUIS intent recognition, because you want to do translation upfront. To achieve that scenario with the built-in recognizer, you would need a translation middleware. There is a short discussion going on here on Github about translation middleware for Bot Framework Composer, although the sample code is not ready yet.
While there is no code samples for the translation middleware yet, I believe what could already help you today is to start a subdialog based on the recognized intent, similar to what you already show in your screenshots.
Basically instead of "Send a response" at the end of your dialog, you would have something following like:
My sample here uses user input instead of the recognized intent. You would replace the user input with your intent variable instead. Based on the recognized intent, you would be able to spin up a specific dialog to handle that recognized intent.
The result would look something like:
About triggers, what you currently configured in your screenshot shows "no editor for null". I believe this might cause the "object reference" issue. Normally it should display a trigger phrase. For example, the below means:
If user inputs the text "triggerphrase"
And the dialog variable 'topintent' was previously set to 'test', then run this trigger.
I'm trying to build a basic "question/answer" app in Actions using DialogFlow. Right now I have two intents:
Intent 1: User says "Ask me a question" and the intent responds "Tell me about yourself"
Intent 2: I'd like to capture the user response to "tell me about yourself", but frankly there's no way to write enough training phrases to cover it.
I tried following this suggestion, and having Intent 1 send an output context called save_response and Intent 2 has an input context of save_response. Then for the training phrase I used #sys.any:save_response
When I try this action, it just invokes the default fallback intent every time. Thoughts on where I might be going wrong?
You need to create 2 intents, in the first intent your training phrase would be Ask me a question, output context will be save_response and response will be the question which you want to throw at the user.
Then in intent 2, you need to do following:
Set input context to save_response, so that it will only be
triggered when this is present in the contexts
Go to actions and parameters section and create a parameter named
answer, give entity type as #sys.any
Then go to training phrases section and add any training phrase, then
highlight it all, and select the parameter you just created
After that, your training phrases and entity section will be looking
like something like below image
Save the intent and you are done
Hope it helps.
In general, having an Intent with a training phrase that consists only of #sys.any may not always work as you expect.
Better would be to have a Fallback Intent that has the Input Context set to make sure you only capture things in that state (save_response in your case) and then to use the full text captured in your fulfillment.
When doing it this way, you do not need the "Intent 2" you described - or rather, this would be a Fallback Intent that you create in the Dialogflow UI. The Fallback Intent is triggered if no other Intent would match what the user has said.
To create a Fallback Intent, select the three dots in the upper right of the Dialogflow UI
then select "Create Fallback Intent"
The Fallback Intent editor is very similar to the normal Intent editor. The biggest difference is that the phrases you enter (and you don't need to enter any) will explicitly not match this Intent, and there are no parameters. Other aspects (the name, the Incoming Context, turning on fulfillment) are the same.
I have been working lately with Dialogflow to make chatbots to do some simple tasks. For instance with webhooks and youtube api where the user ask to show him a video and then the bot just answers with the youtube video url.
E.G.
USER SAYS
Show me Neil young harvest moon
AGENT SAYS
Here you go : https://www.youtube.com/watch?v=n2MtEsrcTTs
I do this by using a custom Entity I called "YoutubeQuery" I checked "Allow Automated expansion" and unchecked "Define Synonyms" then I just added 2 values "Kavinsky Night Call" and "Indigo Night Tamino"
In my Intent I just made a couple of training phrases like these:
And everything works.
Now my issue is with a new Agent which I called Orders
I want just to get Order Id's from the firestore database, but before getting there I'm running in kind of a huge problem
I defined the order's ID entity just like the one with the youtubeQuery. And I added some example Order ID's , I want them all to Start with OD and have 4digits after example (DX0001,DX0009,DX9999)
Afterwards I made the intent
Now unless I give the EXACT order ID's from the traininphrase or the ID examples I defined in the Entity it will always give me a response with an empty parameter OrderID
I start my intent by saying "my order" then I get prompted with "What is your ID?
So when I give an ID that has not been used in the training phrases of the Intent I get an empty value in the parameters like this:
But when I give an ID that has been used in the training phrases like for instance the first one DX0808 it does work...
How can I make this work without adding all the possible order id's ranging from DX0001 to DX9999 in the training phrases or the entity.
I mean it does work for my youtube query, I can put anything there it does "catch" the value. Any help please?
It looks like the required parameter is the problem here, my suggestion would be to:
Create intent to get the order id in one sentence without reprompt (turn off required on the order id) and id is always present, ex: "my id is DX0402". Include training response where only ID is provided like "DL3932", ex. below:
Set other intent for scenario when customer wants to provide the id but it is missing, for ex. customer says: "my id" and make your bot ask for the id as an response ex. "ok, provide me your id"
If you do it, in case user doesn't provide the id, intent 2 will be triggered and after id is provided you'll trigger intent 1.
Hope this makes sense.
My LUIS model used to return all intent scores when queried. However, now it only returns the top intent, entities and sentiment analysis.
I have "Include all predicted intent scores" checked on and I publish and still am only getting back topScoringIntent, entities, and sentimentAnalysis.
We're working on a new feature that is going to take advantage of the score breakdown of all intents and this is blocking us.
"Include all predicted intent scores" is merely UI setting by -> you may see changing the url value in "Keys and Endpoints" section in column "Endpoint" as you can see below.
If you would like to have all intents and scores you need to use following url when executing http GET towards LUIS:
https://yourlocation.api.cognitive.microsoft.com/luis/v2.0/apps/yourAppId?subscription-key=yourSubscriptionKey&verbose=true&timezoneOffset=-360&q=Test
test
If you omit
verbose=true
in the query string or set its value to false then you get only topScoringIntent and eventually sentiment if its detection is turned on.