Phil Ouimet avatar image
Phil Ouimet suggested

Dialog Interface : Support empty/null values when building prompts and intent confirmation dialogs with non-required slots

I have used the Alexa dialog model to build my skill in which I have some slots that are not required.

I use the intent confirmation to summarize the information captured before saving it to my system. In the intent confirmation I have built the reply to gracefully support the fact that some slot may not be present.

You want me to schedule a monthly task <s>{TaskName}{TaskSpecific}</s>
<s>assigned to {TaskAssignee}</s>
<s>to be done {MonthlyTaskFrequency}</s>
<s>on the {DayOfTheMonth}{DayOfTheWeek}?</s>
{MonthlyTaskFrequency}: Every X months
{DayOfTheMonth}: On the [ordinal number]
{DayOfTheWeek}: Optionally specify a day of the week
So we get:
Every 2 months on the 23rd, Every month on the 2nd Monday, etc...

From experiment I have found that if the {DayOfTheWeek} is not provided then testing the skill in the console would return at intent confirmation a generic non-descriptive error.

I have since then found that either if the DayOfWeek is null or an empty string that would trigger the error.

I have work around the issue by initializing the slot value to a whitespace which is of course less than ideal.

The minimal solution would be that at least Alexa successfully builds the response and tolerate null values for non-required slots (or at least return a more descriptive error).

Over time as people invest in the dialog model I think it would be great to support minimal conditional response template formatting.

Example something like:


You want me to schedule a monthlytask <s>{TaskName}{TaskSpecific}</s>
<s>assigned to {TaskAssignee}</s>
<s>to be done {MonthlyTaskFrequency}</s>
<%if DayOfTheWeek is null%>
<s>on the {DayOfTheMonth}?</s>
<s>on the {DayOfTheMonth}{DayOfTheWeek}?</s>
dialog modelbuilt-in libraryslots
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

No Comments

· Write a Comment

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.