LUIS not identifying day-of-week anymore - bots

Today my LUIS app stopped recognizing day-of-week references as builtin.datetime.date entities. Previously, when I gave the bot an utterance of "Tuesday at 2PM" for example, LUIS will send through a builtin.datetime.date component (Tuesday) and a builtin.datetime.time component (2PM).
Now the date component (Tuesday) also comes through as a builtin.datetime.time.
Any ideas?
Thanks,
Pieter

Related

Appointment System with Google Calendar API (Timeslots) React/NodeJS

I am currently developing an appointment calendar with React and NodeJS using the Google Calendar API. The goal is to archive the following:
Step 1: User selects the desired Date in Calendar (done)
Step 2: Show Free 30 Minutes Timeslots in between the opening hours (done)
Step 3: Book Appointment and add to Calendar (done)
But now the problem is, that each timeslot can have 10 individual bookings and I want to show how much is left (e.g 3 People booked the slot at 15:30, I want to show that there are 7 Slots left) Currently if one booked the 15:30 slot it is removed. That is because I use a FreeBusy Query, and this only shows me the busy time not how many events there are.
My first thought was to save the bookings also in a database and then look for every timeslot how many people booked before, but this seems like not the best solution.
Do you have any better ideas on how to solve this problem?
Thanks in advance
Just a suggestion but maybe for each of the event placed on the calendar you could attach an extended property to mark the event as booked.
"extendedProperties": {
"shared": {
"booked": "false",}
}
https://developers.google.com/calendar/v3/reference/events#resource
Then whenever someone books an event, you could mark that event as booked by changing the extended property mentioned. To display the amount of event that are free to book you could filter the list of events by timeMin, timeMax of the selected Timeslot and count the number of events that are marked free or booked.

DialogFlow WelcomeDefaultIntent

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.

DialogFlow date intent always triggered over another similar date intent

Good day All,
I have a situation where am building the fulfilment service for the Flights Pre-built agent in Dialogflow. Below is a sample interaction in the application.
I want a return flight from London to New York - DialogFlow/Fulfilment back-end picks up the users Ticket-Type[return], To[New York] and From[London] entities.
The fulfilment service responds with - What date do you plan to travel? E.g next week Monday or 1st of April
User enters Tomorrow - Dialogflow captures the users Departure Date Entity, we will call this Intent the Departure Intent.
Fulfilment service now goes on to ask -
What date do you plan to return? E.g next week Monday or 1st of April, i will call this the Return Intent
User enters next week monday - Dialogflow will still match the Departure Intent from step 3 and this will cause a response back to the user for the same Return date. But if the user enters i will return next week monday then then the return date intent is matched.
So my question is how do i make the Return Intent match over the Departure Intent since i have captured the data for Departure and i cannot expect the user to also use the phrase that works with the dates?
Updated with the Screenshots of affected Intents
URL to Logs - https://jsbin.com/wofefivuqo/edit?js
sample code
Return Screenshot -
The general solution for this is to set a Context once you have the departure date. (For example, you can call it departure-set.) You then condition your Intent that gets the return date to say it expects departure-set in the Incoming Context. In these cases, it will favor the Intent that has the Context that matches over the one that doesn't (or that has a different Context.)
In your example, you have two Input Contexts, which is fine, but it means that both Contexts must be present for the Intent to be triggered. I don't know what the lifespan is for these two Contexts, but I noticed that your departure-set Context only has a lifespan of 1, which means it will only be valid on the next response from the user. If you did the same thing for the flight Context, then it is likely no longer valid at this point in the conversation.

Conditionally setting the required parameters in Google DialogFlow

I am working on a chatbot that is used to create leave requests. I have created an intent called "create_leave" and associated it with different system entities such as sys.date, sys.date-period to extract the dates from the text. The user can enter "I need leave from March 23 to march 25" or "I need leave on March 28". The problem is even though the user enters "I need leave on March 28", It still asks for the duration which is like "March 23 to 25".. So the solution should be either one of these are entered, the chatbot should not ask the duration again. So How do i conditionally set this?.. Please help. Thanks in Advance

LUIS does not recognize names with spaces

So I got a bot built with Microsoft Bot Framework and it's using the LUIS API for text recognition. With this bot, I'm able to ask about information about different devices that I got in my backend. They got names like Desk, Desk 2 and Phone Booth 4. The first and second name works just fine but whenever I send a name that contains 2 spaces or more, LUIS will fail to recognize it. I have added all the names to a feature list on LUIS but it doesn't seem to do anything. When I'm in the bot code executes the method for that intent, the entity is just null whenever I send this kind of names. Any idea how I might solve this? As I described, names with just one space like Desk 2 works just fine. Maybe there is a way to save multiple words as an entity inside LUIS?
In the image below, the top entry is "show me phone booth 4" and the bottom one "show me desk 2".
It'll take a little leg work, but have you tried updating your model programmatically?
On the LUIS API reference, you can label individual utterances or do it in batches. The benefit of doing it this way is that you can select what should be recognized as an entity based on index position.
Example:
{
"text": "Book me a flight from Cairo to Redmond next Thursday",
"intentName": "BookFlight",
"entityLabels":
[
{
"entityName": "Location::From",
"startCharIndex": 22,
"endCharIndex": 26
},
{
"entityName": "Location::To",
"startCharIndex": 31,
"endCharIndex": 37
}
]
}
I admit I haven't attempted to do this before, but I do not see how labeling/training this way would logically fail.
One thing I do note about your entities is that they're composed of an item and also a number. You could throw them into a composite entity; but in this case doing it the way I mentioned above is a good way to do what you're looking for.
That said, if you plan on using the office-furniture-pieces(?) as entities for a separate intent, say, 'PurchaseNewOfficePieces', it might pay to create use a composite entity for 'Desk 2' and 'Phone Booth 4'.

Resources