How to create a "catchall" intent


#1

I’m building a game where I say a list of words and I want the user to be able to repeat them back to me. So I was trying to build an intent to just get back everything the user says since they likely wouldn’t use another phrase before the list of words. However, I’m getting an error when uploading my model saying the intent must include a carrier phrase - code below.

		{
			"name": "WordScoringIntent",
			"phrases": [
				"{words}"
			],
			"inputs": [
				{
					"name": "words",
					"type": {
						"alexa": "AMAZON.SearchQuery"
					}
				}
			]
		},

I was wondering how anyone else might have gotten around this issue because I could see it being useful for other things such as a feedback intent.


#2

Hm, strange… I have one live Skill that uses such an intent to capture raw user input, so it’s possible, but I haven’t tried it with the AMAZON.SearchQuery type, and I haven’t heard of this error message about the carrier phrase before.
So my answer focuses on how it’s possible without the AMAZON.SearchQuery type.

What I did was to define a custom type, e.g. WordsType, and train it with a random range of utterances… Including, but not limited to the actual utterances you expect. Depending on the length of the input you expect, you can train it on only single words, or a mix of singe-word and phrasal input.

This approach has worked relatively well for me, even for input of several words. The quality of what the Skill captures using this slot is only about 80% accurate, but good enough to guess 98% of what the user actually said.