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.
Related
Hi so I have a problem.
In Dialogflow, when I get a response to end the chat, I would like to ask the user for ratings.
so I've created 2 intents, "endchat" and "endchat2."
They both have the same training phrases, but it appears only endchat2 is being used (the most recently created intent)
How do I ensure that the chatbot randomly chooses an intent after a given response, instead of only using one intent? They have the same training phrases.
An alternate idea is in the attachments. The problem lies that I want the custom payload to only to appear after one of the text responses, (that being text response #1,) but not appear, if the chatbot decides to use text response #2. This is the reason I decide to make two separate intents, but it looks like that's not helping out because the bot is only using one intent.
Remember, Intents represent what the user says and does and not how you respond to that. So there is no way to "randomly choose an Intent" to use to respond.
What you can do, however, is setup a webhook for that Intent and determine how you wish to respond to what the user says. In some cases, you can thank them and end the conversation, while in others you can thank them, ask them the followup question, and set a Context so you can expect their reply.
Having the same / similar training phrase in multiple intents is an anti-pattern of bot design. Ultimately this confuses the bot and it leads to undefined behavior.
This should also trigger an warning in "Validation" with something like "Multiple intents share training phrases which are too similar:..." on the intents.
I have few intents which are getting trigger on the inappropriate User input. Below are a few examples.
Intent 1). Training phrases I have given
When will I get a job abroad?
Is there any possibility that I will be settled in foreign
When will I settle in foreign
This intent is getting called for user input I had a fight with my friend, will it settle down
Intent 2). Training phrases I have given
When my financial problems will over
Tell me about my financial condition
How will be my financial condition in the future
What will be my financial condition
This intent is getting called for user input When my family problems will over
Please help me out to handle these scenarios.
According to this documentation, you should use at least 10-20 trainning phrases.
You don't have to define every possible example, because Dialogflow's
built-in machine learning expands on your list with other, similar
phrases. You should create at least 10-20 (depending on complexity of
intent) training phrases, so your agent can recognize a variety of
end-user expressions. For example, if you want your intent to
recognize an end-user's expression about their favorite color, you
could define the following training phrases:
"I like red"
"My favorite color is yellow"
"black"
"Blue is my favorite"
...
Given that, to increase the assertiveness of your intents I'd recommend you creating more training phrases and focus them in the main terms necessary in your problem.
In our chatbot we have a fallback intent but it would be great if I could know if the user was
asking a question
just saying arbitrary things like "cool", "ok", "got it"
complaining (derogatory texts)
I think (3) can be achieved with sentiment analysis, but is there a tool or an additional API that can guess this sort level of categorisation.
These are chat texts so they are super short.
You can achieve your second option by activating smallTalk in Dialogflow. This is specially design and pre-built trained agent to handle such query 'hello, cool' okay, got it, etc.
For the first option asking a question. I am not sure, but before providing an open-end to the user (basically a broad category of the question) I would suggest narrowing down the scope and category with some option and then create an intent for a feature (less open-end scope of conversation the more effective it will be)
My agent’s goal is to ask 6 questions to make a price estimation of 2 different products.
It asks the 1st question: ‘do you want to make a price estimation for product1 or product2 ?’
And then, it asks 5 questions about the product’s characteristics (i.e. the product’s age, size…) to finally display the price estimation.
All flow made on Dialogflow UI with an inline editor for the fulfillment to calculate and then save data on Firebase DB.
My question -> Is it better to create :
1/ Create only 2 intents : product1 and product2 ? Then in those intents, ask the others 5 questions in ‘action and parameters’ section by filling parameters, entities and values.
2/ Create 6 differents intents for the 6 questions, with parameter value for each ones.
On my side :
I have tested the 1/, I’m able to retrieve all data on my Firebase DB but my 2 products have similar entities and parameters values (‘size’ for example) and my agent make errors’ flow to the wrong intent.
I have tested the 2/ (I think it’s the better way because all intents are more efficient) I’m able to make the good flow. But at the last question, I don’t know how to retrieve previous parameters values to make the price estimation.
Thanks a lot for the help ;)
Remember that Intents are designed to capture what the user is saying - not necessarily the logic behind how you intend to handle that. While you can use things like Contexts to keep track of state, it is sometimes better to handle that with your logic. (See Thinking for Voice: Design Conversations not Logic)
You should be storing anything you wish to remember between Intents in the parameters of a long-lived Context.
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?