I have a travel bot with following intents:-
BookAFlight (trained with 20 utterances)
GetTicketCopy (trained with 20 utterances)
CancelTicket (trained with 20 utterances)
None (default) (currently not trained)
MS documentation suggests that I train None for atleast 1-2 utterances for every 10 utterances added to other intents. Which means I would need say 6-12 utterances to train None.
My query is what kind of utterances should be used to train None?
Everything under the sun apart from what is relevant to my bot ( for e.g. I want to order a pizza, How is the weather today, Who is the president of USA? etc.)
All negative statements corresponding to the utterances used to train my other intents (for e.g. I don't want to book a flight ticket, I don't want to take a print out, I don't want to cancel my ticket etc.)
All utterances that corresponds to intents currently not covered in my scope but which users could still ask to a travel bot (for e.g. I want to Book a Cab to the airport, What is the status of my flight)
Long story short, I am trying to identify what kind of utterances should go into my None intent . Is None the right place to handle "Negative" variations of valid utterances.
None intent is not made for "Negative variations" but to tag everything that is not managed by your other intents.
So you should add utterances corresponding to cases that your bot cannot handle but linked to your context (your 3rd idea).
For example in one of my projects, None intent is trained with other use-cases of my customer than the one I will treat with my bot, based on my customer logs. And it's helping avoiding to throw an intent in a bad case
The LUIS docs suggest you should use COMPLETELY off-topic utterances for the None intent:
"Start with something specific that your bot shouldn't answer such [as] 'What kind of dinosaur has blue teeth?'"
They also suggest that for positive and negative reaction to some actions you create separate intents. Eg. Don't want a car / Want a car. Alternatively use single intent and mark relevant terms as positive and negative entities.
Related
I want to have the user respond with a longish response, like talk about their education and family background. In this, I would like to identify multiple intents and then go back to the user with multiple questions (one by one) as a follow-on to the intents detected. Can I do this in DialogFlow CX and how?
Note that your desired use case is currently not feasible in Dialogflow CX. By default, Dialogflow matches a user query to only one intent route. Intents are matched based on the confidence value in the detectIntent Response’s queryResult.match field.
Moreover, the maximum detect intent text input length is 256 characters. If you are using an integration, the integration platform may have a smaller limit. However, you can use the sys.long-utterance built-in event to handle user queries that exceed the 256-character limit. Note that the long user query will still only get matched to only one intent route.
If you want to ask the user multiple questions, you can design your agent to have a conversation flow that asks the user one question at a time. You can utilize State Handlers to control the conversation flow. You may refer to the Voice agent design documentation for best practices for designing your agent.
You could do several intents with no response that has several follow up intents with your questions, u are going to need to change the number of context to match the amount of intents that you are going to use.
I am a bit lost in terms of how to use the Microsoft QnA maker and LUIS together. If I understand correctly QnA maker only works on FAQ styled data whereas LUIS is for understanding intents and providing the answer.
So the question I have is how to get both of them to work together. First, what technologies are there and how do they determine where the calls get routed to, as in QnA maker or LUIS.
Any insights will be most helpful.
I used this example a few times and it seems to work.
QnAMAker is use when the user would ask a question. "How can I set an alarm on my phone"
Luis is use to execute a command/action and identify entities. "Set an alarm at three o'clock"
Dispatch is used to route the message to the right service, either QNA or Luis (you can have more than one of each, or 5 qna and no Luis)
Hope this helps
To expand on other answers:
QnAMaker is for direct question => answer pairs. It trains based on exact questions, such as the one exampled by Alexandre, and has exact answers.
LUIS parses the question from the user, instead of using it directly, and uses the resulting score to return an 'intent'. The bot dev then uses this score/intent to route the conversation flow to other dialogs. A good example is to think about how many ways you can say 'goodbye' (Goodbye, bye, byebye, cya, peace!, TTYL). All of these can be programmed, or trained, in LUIS to return 'Goodbye' as the main intent. Then you can code 'if Goodbye is return, go to Goodbye dialogs' into your own chatbot.
Dispatch is like an umbrella over both. At it's core, it's a LUIS model (It looks at messages and scores them). Based on that score, it returns an intent, just like LUIS. And again, like LUIS, it would be up to the bot developer to route the returned intent (if QnAIntent is returned, go to QnA dialogs). Using dispatch to route your initial intents means you don't need to hit every single one of your models (both QnA and LUIS) just to test an utterance (message from a user). Just once through dispatch.
I made a QnA bot using bot-framework SDK3 and QnAmaker service.
As I know, we can train our knowledge base. But I don't know how to train it while using my QnA bot in other channels like teams.
I think I can let user judge whether the bot's answer has solved the problem. So I make the conversation like below.
User: Ask a question
bot: give a answer
bot: does it solve your problem? yes or no?
user: yes/no
At this time, how could I let my knowledge base know it and master it? Then next time my bot may give a correct answer.
Dialog-based training like you described above is not currently supported in the current (GA) release of the QnA Maker. It is, however, something that the dev team is looking into. Currently, you can only train the QnAMaker portion of your bot from the QnA Maker portal.
Hi you can handle this kind of problem by Scores property
100 An exact match of user query and a KB question
90 High confidence - most of the words match
40-60 Fair confidence - important words match
10 Low confidence - important words don't match
0 No word match
reference https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/concepts/confidence-score
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I'm attempting to write my requirements out as User Stories. Moving from a waterfall world, I am much more familiar with Use Cases.
One of the things I like about Use Cases is each interaction with the system is well-defined, as well as all the alternate and exception flows of action.
UC-01
Success Scenario:
The user navigates to the customer
The user clicks the Add Contract button
The user fills in the Contract Name, Contract #, Start Date and End Date fields
The system asks for confirmation
The user fills clicks the save button, and the contract is saved
Exceptions
5a. The user aborts, and the contract is not saved
Alternate flow
1a. The user uses the filter to select the customer
Where would the exception and alternate flows be captured in an Agile approach?
They wouldn't be captured as such.
You are approaching user stories from the wrong angle. Coming from waterfall this is quite a common misunderstanding.
Your story in this example should be something like:
As a user I want to add a contract to a customer so that [insert value here]
From the example you can note two things:
I can't finish it because I have no idea of what the value of this story is to the customer. This is quite important because it drives any negotiation over the story. For example, one doesn't want to spend a lot of time on stories which have a very marginal value.
There isn't much detail. This is on purpose, because the story tries to capture the problem or the opportunity, not the solution. As a user, there are many theoretical ways in which I can achieve my aim of adding a contract to a customer.
The focus of stories is letting the users achieve their goals.
Normally you can write details about how you currently speculate that the story will be implemented on the "back of the card" or in a notes field in your ALM tool, but the point I am trying to make is that stories are negotiable in how they are implemented.
Your developers are expected to interact with your customer representative during the iteration to discuss/prototype/try out the various different possible solutions so that the aim of the story is achieved efficiently and effectively.
A very simple and yet quite exemplary and typical example: what if you forget an edge case, alternate flow or exception? With stories, that's no problem: the developer discovers it, has a chat with the product representative, and they make up a plan to handle it.
You can do this because it's clear that handling these cases is part of the user story. Not so with the requirement, which is prescriptive on what the solution should be, instead of what it should achieve.
> Where would the exception and alternate flows be captured in an Agile approach?
A Use Case is a form of feature documentation.
This documentation can be created
before implementation (as specificatoin in waterfall)
during or after implementation or not at all (agil)
In Scrum you would just have a feature-request "Add Customer" in the Backlog without the scenarios.
Many agile practices do not dictate that you have to write your requirements out as user stories with acceptance criteria. All that is needed is a list of requirements (aka Product Backlog) that is ordered. When giving these requirements to the team in a sprint planning session they should be the minimal amount of information that is still clear enough for the team to understand and build. There is a fine line between doing too little grooming and over analysing the requirement; this takes time to get right.
Having said that, user stories are commonly used as they make sense to multiple parties involved in the process where other forms of requirements are limited to a specific audience; i.e. you have to teach people how to read and understand use cases but do not have to do that for user stories. Obviously writing it is a different problem.
I like #Sklivvz and #k3b answers.
Regarding your example.
First: As Sklivvz wrote, the User Story defines the problem and the goal. I differ in the opinion regarding side tracks and exceptions. Those are, in my eyes, small stories to. With there own priority. I.e. the ability to cancel the process could be of higher prio than some validation problem story.
My Answer in short: Write a story for the main goal, side goals, exceptions and alternate flows.
positive side effect: The product owner (you?) has the chance to prioritize those stories.
agree with some of the above and would like to add the following (hope this is useful).
Use Cases are not specifically/only related to waterfall, they are merely a means to visual behaviours (use cases) of a system and the relationships between those behaviours and other system behaviours, and external entities to the system (actors).
There is no reason why a user story cannot be further described by use cases and use case scenarios.
Remember, just because you are practicing (I guess, but not restricted too) Agile that does not means you cannot design stuff. Just don't let the design have more value over the result i.e the product (although in complex . safety systems this should be the case).
When you capture stories initially, they should be very brief and focused on benefits.
When you've discussed solution with the team and ready to start implementation, you should document it with more details.
I like Given/When/Then format and I'd re-write this Use Case into this (real goal may be different, but still you'll get the main idea):
Title:
As a user I want to add contract to customers so that I can track contracts history
Given customers list
When user clicks to Customer
Then he sees Customer Details view
And Add Contract button
[mockup]
Given Customer Details view
When user clicks Add Contract button
Then he see a popup with fields:
Contract Name - field spec: [default value, max lenth, etc]
Contract # - [field spec]
Start Date - [field spec]
End Date - [field spec]
[form mockup]
Given user filled form correctly
When he click Save button
Then he sees confirmation dialog ["Do you really want to add this contract?"]
[NOTE: I think this confirmation is stupid and not required]
Given user see a confirmation dialog
When he clicks Yes
Then the contract is saved
And user sees success message "Contract is saved for customer XXX"
Given user see a confirmation dialog
When he clicks No
Then the contract is not saved
And confirmation dialog closes
NOTE: most likely this scenario is a separate user story
Given home page
When I click Add Contract link
Then I see Contract form
And "Select customer" drop down field
...
As you see, you can quite easily use Given/When/Then format to describe user stories. It is very important to make sure that true value of user story is captured. Otherwise it is very easy to make some decisions that will be really bad from the business point of view.
I'm thinking how and when a DCI context can be used in a Web application. I'm considering this high-level use case:
User enters city, arrival, departure, room type and clicks "Search".
System displays a list of hotels
User clicks on a Hotel logo to read its details
System displays hotel details
User clicks "Book now"
System displays payment form
User enter customer details, billing information and clicks "Submit".
System validates billing information and displays a booking confirmation.
This is very high-level and surely needs to be broken down. The first steps (1-2, 3-4, 5-6) feels like simple resource requests that could be handled with some search- and REST-architecture. So my first question is, is there a need for a DCI-context in those cases, isn't plain MVC enough? Of course a "Hotel" data entity could play a role, but would you consider it feasible, especially if it's the only actor?
The last step is where I see that DCI could be very useful, for now there is work to do in a procedural fashion. (Creating a Customer, adding a Booking to the Hotel, sending confirmation mail...)
What are your thoughts on this? Am I on the right track?
I think I would say that a context starts at step 2.
You have a list of offers that plays a part. Currently those offers are hotel offers but what's a hotel offer? they might be different things. Some might be from brokers and some might be directly from hotels those are two different types of entities but they play the same part in this context, you might have many more types some which might be contexts the self. E.g. flight and hotel combined to an offer, where in that context a hotel/broker offer and a cheap flight offer plays each a role but the the listed use case you shouldn't have to worry about this but simply make it possible for the domain to evolve independently of the use case and though the use case is book cheap hotel I'd say that the form which we are trying to capture can be expressed better (though not exact) with "find best offer"
Then when picking a specific offer I'd agree that you start a new context