Alexa Conversations Errors


When you build the skill model for your Alexa Conversations skill, you might encounter one of the following errors.

Common errors

The most common errors are MissingRequestTemplateV2, MissingDialogAnnotation, MismatchArgumentSize, and MissingSampleUtterance.

MissingRequestTemplateV2

Error message
Annotation of Request for argument <argument name> with slot type <slot type name> to a Response is missing from the sample dialogs and must be added.

Example
Annotation of Request for argument cityName with slot type CityName to a Response is missing from the sample dialogs and must be added.

Troubleshooting
Check to make sure that each required API argument has at least one Alexa turn that requests it. This error message is thrown because Alexa Conversations tried to compose an Alexa response to request an API argument, but it is not able to extract it from any sample dialogs. For example, if there is an API GetWeather(location, date), you must write at least one dialog to request both the location and date from user. In other words, you should include a turn such as "What location?" and "What date?" in at least one of your sample dialogs.

Also make sure that each API has at least one dialog that uses the Request Args dialog act. You can't simply have a dialog where the user provides your arguments as part of the initial utterance.

Case 1
If there is a GetWeather API that takes two required arguments, cityName and dayOfWeek, and you author only the dialog below, validation fails because you don't request dayOfWeek, which the API requires.

User: What's the weather?
Alexa: For what city?
User: Seattle.
Alexa: The weather in Seattle is 34 degrees.

A way to fix this is to modify the sample dialog to request both of the required arguments as follows.

User: What's the weather?
Alexa: For what city?
User: Seattle.
Alexa: What day?
User: Saturday.
Alexa: The weather in Seattle is 34 degrees.

Case 2
There are other cases where this error message might mean that you have to write additional dialogs. For example, you might have a GetWeather API that returns the zip code of the city, and you want to call another API called SetDefaultZipcode right after the GetWeather API to set the user's default zip code for future weather predictions. On its own, the following dialog fails validation.

User: What's the weather?
Alexa: For what city?
User: Seattle.
Alexa: What day?
User: Saturday.
Alexa: The weather in Seattle is 34 degrees.
Call GetWeather(cityName = Seattle, dayOfWeek = Saturday)zipCode = 98115
Call SetDefaultZipCode(zipCode = 98115)

This dialog in itself does not pass validation, and you receive the following error message.
A dialog must contain an Alexa Response with a Request Dialog Act for API definition argument zipCode of slot type AMAZON.Number

To fix this, you must author an Alexa turn that requests the zipCode API argument (for example, "What's your zip code?") and include this turn in at least one dialog.

User: What's the weather?
Alexa: What's your zip code?
User: Nine eight one one five.
Alexa: For what city?
User: Seattle.
Alexa: What day?
User: Saturday.
Alexa: The weather in Seattle is 34 degrees.
Call GetWeather(cityName = Seattle, dayOfWeek = Saturday)zipCode = 98115
Call SetDefaultZipCode(zipCode = 98115)

Case 3
Another example of when this error might appear is if the API is called immediately on the first turn for the dialog. In the following dialog, the user provides all the values in the first turn. On its own, the dialog fails validation.

User: I want to get weather for {seattle}
Alexa: The weather in Seattle on Saturday is 34 degrees.
Call GetWeather(cityName = seattle)

If this is the only dialog that you author, you see the error because there is no Alexa turn for the case when the user does not provide the value in the first turn. To fix this issue, add another dialog that requests the city.

Case 4
The same issue applies if there are multiple API arguments provided in the first turn. On its own, the following dialog fails validation.

User: What's the weather in {seattle} {today}
Alexa: The weather in Seattle on Saturday is 34 degrees.
Call GetWeather(cityName = seattle, daysOfWeek = today)

To fix this issue, add at least one additional dialog where an Alexa turn requests the city and date.

MissingDialogAnnotation

Error message
Dialog <dialog name> doesn't have annotation, please follow the guide to annotate it.

Example
Dialog GetWeatherWithArg doesn't have annotation, please follow the guide to annotate it.

Troubleshooting
The developer console currently doesn't automatically sync the information (such as API arguments) in the Alexa Response pane when you update the API definition in the API Definitions section of the console. Therefore, if you see this error, make sure that:

  • every sample dialog turn (both user and Alexa) is annotated in the developer console.
  • there is green check mark for every turn in the dialog.

MismatchArgumentSize

Error message
Dialog Name: <Dialog Name> - <API_Name> only has <number of arguments in definition> arguments in its definition, but <number of variables assigned in the dialog sample> variables are assigned to it

Example
Dialog Name: RecordFavoriteColor - RecordColor only has 1 argument in its definition, but 2 variables are assigned to it

Troubleshooting
Editing dialogs across multiple Build tabs is currently not supported and will cause errors or missing information. If you see this error multiple times, do the following:

  1. Delete the API from the responses first, add the API back, and then update the arguments in the response template.
  2. If all the MismatchArgumentSize build errors don't go away after you delete and re-add APIs, you might need to delete and re-add utterance set associations also. That is, in the dialog annotation tool, click a user turn. Then, in the User Input pane on the right, click the trash can to remove the utterance set association, save the model, reselect the utterance set, and build the model. Do this methodically. One removal/reselection might remove multiple instances of the MismatchArgumentSize error.

MissingSampleUtterance

Error message
Missing sample utterance. At least one sample utterance is required. Error code: MissingSampleUtterance

Troubleshooting
Make sure that the interaction model has at least one intent with a sample utterance. To access the intents in the developer console, expand Interaction Model > Intents in the left pane. For example, you can add a sample utterance to a built-in intent that your skill uses.

SchemaError

Error message
Unable to parse skill artifacts. Error code: SchemaError

Troubleshooting
Errors of type SchemaError often indicate a slot definition issue. For example, make sure that:

  • Each of your API definitions specifies a return type in the Return section at the bottom of the API definition page.
  • Your utterance sets don't have empty slot definitions.

Dialog errors

Error Name Error Displayed in UI Additional Information

UNRELATED TEMPLATE USED FOR API

Dialog Name: [DialogName] - Dialog: [DialogName] - Response Template [ResponseTemplateName] is not declared in the API definition for [ApiDefinitionName], but used immediately after the API in the dialog.

In the sample dialog, an API isn't followed by its associated response template.

COMPOUND ENTITY USED FOR ANNOTATION

Dialog Name: [DialogName] - Slot Type [SlotTypeName] cannot be used to annotate user utterance because it has properties. Only simple Slot Types can be used to annotate the user utterances in a dialog.

You can't use a slot type with properties to annotate a user utterance.

COMPOUND ENTITY USED FOR ADDELEMENTSTOLIST

Dialog Name: [DialogName] - Slot Type [SlotTypeName] cannot be used to annotate user utterance because it has properties. Only Simple Slot Types can be used to annotate the user utterances in a dialog.

You can't use a slot type with properties to annotate a user utterance. In this case, you tried to use a slot type with properties in a list.

DIALOG SEQUENCE ERROR

Dialog Name: [DialogName] - Dialog: [DialogName] - Invalid sample dialog sequence:

  • Dialogs must start with a user action.
  • Dialogs can't start with a response template, API, or utterance set.
  • Dialogs must end with a response template.
  • Dialogs can't end with an API or user action.

UTTERANCE SETS MUST FOLLOW USER ACTION

API [ApiDefinitionName] cannot be the immediate API after you use utterance sets [UtteranceSetName]. The first API action after [ApiDefinitionName] should be [ApiDefinitionName] because they are associated with each other.

A dialog must start with a user utterance, and you must follow each user utterance with an Alexa utterance.

Response template errors

Error Name Error Displayed in UI Additional Information

MISSING REQUEST TEMPLATE

Response Template - Request for argument [ArgumentName] with type [SlotTypeName] is missing and must be added

For each required API argument, you must provide a response template that requests that argument.

MISSING API AND ARGUMENT FOR CONFIRMATION

Response: [ResponseName] - must have at least an API or an argument for the Confirm Dialog Act.

Response templates that you use as confirmation can be an API confirmation (when you provide an API) or an argument confirmation (when you don't provide an API but you provide arguments in a dialog act).

MISSING REQUEST TEMPLATE FOR ENTITY CONFIRMATION

A dialog contains an Alexa Response with Confirm Dialog Act for argument [ArgumentName] with Slot Type [SlotTypeName] but a dialog with corresponding Alexa Response with Request Dialog Act is missing.

If an API argument has a confirmation template provided, it also must have a standalone request template.

MISSING REQUIRED TEMPLATE

Required Response Template [ResponseTemplateName] is missing and must be added

The following response templates are mandatory: welcome, provide_help, out_of_domain, reqmore, you_are_welcome, and bye.

INVALID ARGUMENT FOR NLG ASSOCIATED TO API

Response Template: [ResponseTemplateName] - argument type [SlotTypeName] does not match any argument or return type of the API(s) that associates with this template. " "If Response Template is referenced in any API definition, the template argument types are limited to match the API argument/return type

If you associate a response template with an API, the response template arguments can only come from API return or API arguments.

Utterance set errors

Error Name Error Displayed in UI Additional Information

MISSING INVOKE UUG

At least one Utterance Sets of Dialog Act category "invoke" is required. Please add one Utterance Sets with Dialog Act "invoke"

A skill must have at least one utterance set with the Invoke dialog act and must specify an API to invoke.

NO ARGUMENT FOR INFORM UUG

Utterance Sets: [UtteranceSetName] - classified as an "inform" dialog act, but has zero arguments to inform. Please add at least one argument to this template"

An utterance set that you associated with an Inform dialog act must have at least one argument.

MISSING REQUIRED API

Utterance Sets: [UtteranceSetName] - there is no API specified with it. Please associate an API because you used dialog act [DialogActName] for this Utterance Sets

An utterance set that you associated with an Invoke, Affirm, or Deny dialog act must include an API association.

MISSING ARGUMENT IN UUG FORMATTER

Utterance Sets: [UtteranceSetName] - each formatter must mention all defined arguments because it is classified as "inform" Dialog Act Category: [DialogActCategoryName]

The sample utterances of an utterance set that you associated with an Inform dialog act must include all arguments that the utterance set defines.

Slot type errors

Error Name Error Displayed in UI Additional Information

BUILTIN TYPE CONFLICT

Slot Type: [SlotTypeName] - is built-in and cannot be defined as a Custom Slot Type.

You can't create slot types that are predefined by Amazon, such as AMAZON.DATE, AMAZON.TIME. These built-in types typically start with AMAZON.

EXTEND UNDEFINED TYPE

Slot Type: [SlotTypeName] - is invalid. This is a system bug.

When defining a slot type, you can choose a base type that the new type extends. This base type must exist or be predefined as a built-in type.

VALUES USED IN NON ENUM

Slot Type: [SlotTypeName] - is invalid. This is a system bug.

You can only provide enum values for an AMAZON.Enum type.

INVALID ENUM

Slot Type: [SlotTypeName] - is invalid. This is a system bug.

If a slot type extends AMAZON.Enum, it can't have additional properties defined.

MISSING VALUES FOR ENUM

Slot Type: [SlotTypeName] - is invalid. This is a system bug.

If you define a slot type that extends AMAZON.Enum, you must provide at least one enum value for it.

INVALID PROPERTY TYPE

Slot Type: [SlotTypeName] - one of the properties is declared as type [SlotTypeName], but that Slot Type is not defined.

You defined a slot type property as an invalid type.

API errors

Error Name Error Displayed in UI Additional Information

BUILTIN API NAME CONFLICT

API name [ApiDefinitionName] cannot start with "AMAZON", it is preserved for BuiltIn APIs.

API names can't start with the prefix AMAZON.

UNDEFINED TYPE IN API

API: [ApiDefinitionName] - Entity Type [SlotTypeName] is referenced but not defined. Please always refer a valid response template in API definition.

You defined an API argument or return value as an invalid slot type.

UNDEFINED TEMPLATE IN API

API: [ApiDefinitionName] - Response Template [ResponseTemplateName] is referenced but not defined, please always refer a valid response template in API definition.

The response template associated with an API is invalid.

EMPTY RESPONSE IN API

API: [ApiDefinitionName] - There are no Response Templates associated with this API. Please connect this API with at least one Response Template.

You must associate each API with at least one response template.

Generic errors

Error Name Error Displayed in UI Additional Information

DIALOG ACT ERROR

Dialog act error: [DialogActName]

The dialog act is invalid.

SCHEMA ERROR

Invalid conversation definition schema [SchemaName]

Internal service error.

INVALID ALEXA CONVERSATION MODEL

There is some issue with the backend service. Please try again later.

The skill model failed to build.

MISSING WELCOME API IN UUG

Utterance Sets [UtteranceSetName] - missing welcome API [ApiDefinitionName]

If you associated an API with the welcome response template, Alexa Conversations considers this API the "welcome API." In this case, you must use this API for the welcome utterance set. That is, you must make the welcome utterance set invoke the "welcome API".


Was this page helpful?

Last updated: Nov 27, 2023