Does dialogflow learn from user data? For example, I built a chatbot which answers some general-purpose queries. Whatever questions a user asks(relevant or irrelevant), does dialogflow uses that to train the agent?
Please let me know if the question is unclear.
DialogFlow has done a very basic NLP for you. What I mean by that is that if a user enters something very similar to what you have added in User Says section the specified Intent will be triggered. But it does not learn on its own. You will have to see the user queries from the training tab and add these queries by yourself in order for it to work.
See, there is basic difference between AI & ML, understanding & interpreting the context of what user wants to say & then performing tasks is AI, on the contrary, ML involves when you try to learn something from user responses & then try to answer. NLP here tries to match user-entered response to user says in dialogflow.com & then compute the score, based on which our bot pick up an intent & answer the user. That's it! In case of dialogflow.com, it will never be like it has stored 1000 user responses & then it has used it for learning & answering. So the answer to user question is No!
Now coming to second point, if you'd like to explicitly train a bot based on specific responses, there's provision to do so. You can move to Training tab & then choose a dialog where you can check matched & unmatched intents. You can choose to right intent & say approve to train your bot. Please check snaps for more understanding.
You can train the agent using the training tab & discard the irrelevant user queries. Is that what you were looking for?
Related
I'm currently working on a bot that helps a user fill in a form in a conversational way. I'm wondering if I should pick LUIS or azure text analytics for this. Or maybe both? Since I'll need to respond to certain intents but answering a question obviously has no intent. Or can I count answering a question as an intent. Either way I'll have to deal with various types of answers ranging from well ranges to names, dates and sentiments. And to add to this: it'll need to support dutch.
Simple example:
Bot asks:
On a scale of 1 - 10 how do you feel about some subject?
User responds:
Well I would give it a 10
Bot extracts:
feelingScore = 10
More complex example
Bot asks:
How do you feel about some subject?
User responds:
Well I would give it a 10
Bot extracts:
feeling = "10"
User responds:
I honestly didn't feel that good about it.
Bot extracts:
feeling = "not that good" (or possibly a sentiment score)
Since there's no action based on user's input, I don't see a reason for using LUIS. You can achieve what you want using Text Analytics.
PS: Please notice that even tough users reply with a 10, the sentiment analysis may not be 100%.
Example:
"I will give it a 10" -> sentiment score is 95
"Well I would give it a 10" -> sentiment score is 85
But at the same time, you can check the NAMED ENTITIES and get the extracted number from it (when provided in the answer)
https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/
I'm new to using Dialogflow,and I want to create a simple DialogFlow bot that can answer basic addition,subtraction,multiplication,division questions.How would I code it that it responds to the specific question asked by the user? For example if I made a math intent, I used the training phase "What's 2 x 3", and I made the response "6". Now, I want to add more training phases and I need the bot to use the correct response. Also, another problem is that it would take an impossible amount of time to teach it every possible math question,so is there code I could use to change that?
The easiest way to be able to answer every combination of math question would be by using a fulfillment webhook. Here you can use code to do the calculations based on the user input. You could create an addition intent where you train the bot to recognize addition input and you would connect it to code in your webhook which can do additions and return the response. You can then also add intents for subtracting, multiplication and divisions and connect each of those intents to code which can do the math.
For the setup, you have two options. You can write code in the inline editor in Dialogflow or host your code in your own server and connect dialogflow to the url of that server. More info on that can be found here.
I need following feature in the flow.
based on users input like gold , silver bot should direct him to those particular credit card flows.
How to enable loop in flows.
How to perform 4 to 5 steps long guided flow which is a big complex tree.
I have gone through documentations, read about input and output context not of much help but could not get any help in providing hops in the conversation flow as mentioned in the diagram.
Tried using Dialogflow only
I am not able to navigate between the flows.
I would suggest to build a basic Action to get familiar with the concepts, check out this codelab
If I understand correctly, you want to ask the user:
"...which one should I tell you about?"
and then the user can say "Silver", "Gold" or "Platinum".
First try to just implement this simple step. Create 4 intents in Dialogflow.
Welcome intent, the response should be "...which one should I tell you about?"
Silver Intent. Training phrase should be "Silver", response should be "You chose Silver"
Gold Intent. Training phrase should be "Gold", response should be "You chose Gold"
Platinum Intent. Training phrase should be "Platinum", response should be "You chose Platinum"
Once you've done that. Test it! It should trigger the correct intent based on your input. It's very simple to build a "switch" from a flow chart in Dialogflow.
Next step: You can replace Silver/Gold/Platinum with a custom entity, read more about this here.
This should already help you implement your flow chart.
In your chart you have currently just one answer for each card type Silver/Gold/Platinum - if you want more than one step per card type and need to remember you're still in the context of the Silver card - you can use contexts. In Dialogflow you can hover over the Silver intent you created earlier and create a follow-up intent. But with your current flow chart it's not necessary.
I have created a pizza bot in dialogflow. The scenario is like..
Bot says: Hi What do you want.
User says : I want pizza.
If the user says I want watermelon or I love pizza then dialogflow should respond with error message and ask the same question again. After getting a valid response from the user the bot should prompt the second like
Bot says: What kind of pizza do you want.
User says: I want mushroom(any) pizza.
If the user gives some garbage data like I want icecream or I want good pizza then again bot has to respond with an error and should ask the same question. I have trained the bot with the intents but the problem is validating the user input.
How can I make it possible in dialogflow?
A glimpse of training data & output
If you have already created different training phrases, then invalid phrases will typically trigger the Fallback Intent. If you're just using #sys.any as a parameter type, then it will fill it with anything, so you should define more narrow Entity Types.
In the example Intent you provided, you have a number of training phrases, but Dialogflow uses these training phrases as guidance, not as absolute strings that must be matched. From what you've trained it, it appears that phrases such as "I want .+ pizza" should be matched, so the NLU model might read it that way.
To narrow exactly what you're looking for, you might wish to create an Entity Type to handle pizza flavors. This will help narrow how the NLU model will interpret what the user will say. It also makes it easier for you to understand what type of pizza they're asking for, since you can examine just the parameters, and not have to parse the entire string again.
How you handle this in the Fallback Intent depends on how the rest of your system works. The most straightforward is to use your Fulfillment webhook to determine what state of your questioning you're in and either repeat the question or provide additional guidance.
Remember, also, that the conversation could go something like this:
Bot says: Hi What do you want.
User says : I want a mushroom pizza.
They've skipped over one of your questions (which wasn't necessary in this case). This is normal for a conversational UI, so you need to be prepared for it.
The type of pizzas (eg mushroom, chicken etc) should be a custom entity.
Then at your intent you should define the training phrases as you have but make sure that the entity is marked and that you also add a template for the user's response:
There are 3 main things you need to note here:
The entities are marked
A template is used. To create a template click on the quote symbol in the training phrases as the image below shows. Make sure that again your entity is used here
Make your pizza type a required parameter. That way it won't advance to the next question unless a valid answer is provided.
One final advice is to put some more effort in designing the interaction and the responses. Greeting your users with "what do you want" isn't the best experience. Also, with your approach you're trying to force them into one specific path but this is not how a conversational app should be. You can find more about this here.
A better experience would be to greet the users, explain what they can do with your app and let them know about their options. Example:
- Hi, welcome to the Pizza App! I'm here to help you find the perfect pizza for you [note: here you need to add any other actions your bot can perform, like track an order for instance]! Our most popular pizzas are mushroom, chicken and margarita? Do you know what you want already or do you need help?
I'm using wit to recognize different intents in a retail context. Some of them trigger (successfully) FAQ answers, other initiate a business logic.
Surprisingly, I'm having a lot of trouble with the most basics conversational intents, like answering a hi or hello. Specially if they come as a single word (it doesn't get hi or hello but it successfully returns the correct intent for hi buddy or hey dude). Obviously there's a high chance that the first thing an user would say is just a simple hello, any of you found the same issue? Any guidance on that?
It is actually the first time I experience this issue, and I haven't heard about it. Could it be related to the increasing number of intents created (now 15+)? I'm using trait as a search strategy.
Greetings intent
Click on image for a larger version of the image.
Thank you very much for your help,