Dustin Coates in Alexa

Fixing 'Error building interaction model: A sample utterance for a slot in the interaction model is invalid' error

While using the Code Editor in the Skill Builder Beta, ran into an error that didn’t have an obvious fix. It took me a while and I had to divide and conquer the problem, but I finally got there. Since I want to save you the same hassle, I’m writing it up now.

The error was this:

Error building interaction model: A sample utterance for a slot in the interaction model is invalid

Obviously this doesn’t help me out much. And there isn’t anything else in the Skill Builder that gives me a clue. I had 500 sample utterances and it could have been any of them. I started by removing sample utterances intent-by-intent until I got down to a tiny subset that could build. It took me to the very last intent before realizing:

A slot must have spaces on each side of the curly brace.

I had a single utterance that how has the {team}been doing lately. A missing space was all that threw it off. The Skill Builder is in beta, so I hope they’ll improve this soon and is one of the small reasons why I generally avoid the Skill Builder right now.

That’s it for this post. Want to reach out? Contact me on Twitter and let’s chat.