Search code examples
alexa-skills-kitalexa-slot

Alexa sample utterance can't discern slots based on connector words


I have two simple Alexa questions I am trying to get working:

when is the next train from chicago to new york
when is the next train to new york from chicago

In both questions above, the first city gets mapped to the origin and the second to the destination, effectively yielding:

when is the next train *from* new york *to* chicago

instead of

when is the next train *to* new york *from* chicago

I have my sample utterances set up like this:

NextTrainIntent next train from {OriginCity} to {DestinationCity}
NextTrainIntent next train to {DestinationCity} from {OriginCity} 

I realize that the connector words are being ignored. But in cases like this, they are critical, because this is how the english language works. Is there any way to make both questions work?


Solution

  • Implement these utterances into two different Intents.

    FirstIntent ... {OriginCity} to {DestinationCity}
    SecondIntent ...{DestinationCity} from {OriginCity}
    

    Alexa will listen more carefully then.

    Or try the Alexa Skill Builder (BETA).