question

callmerockyli avatar image
callmerockyli asked

Anyways to get unknown LITERAL slot?

Hi all, I am building an Echo app with a search function. The app would take a keyword from user and search on internet like "Hello Google". But how can I set that utterances to be and empty slot since the keyword can be anything? It's seem not possible to do something like: SearchNews please search news about {" "|Keyword} for me Does anyone has an idea? Thanks
alexa skills kitvoice-user interface
10 |5000

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

jjaquinta avatar image
jjaquinta answered
Just create 20 or so representative examples. One word, two words, three words, etc. Something like that. It's still not very good, but it seems to be the only choice for now.
10 |5000

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

callmerockyli avatar image
callmerockyli answered
But the searching word can be any word, and can be one or two or three words.
10 |5000

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

jjaquinta avatar image
jjaquinta answered
So put in utterances with one, two and three words. Once you hit about twenty, it makes Alexa think of it more like a wildcard slot. Putting in examples of each number of words is important though.
10 |5000

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

callmerockyli avatar image
callmerockyli answered
Thank you for your advice, but I still don't understand how to achieve that. Can you give an example? Let's say user want to search news about 'Apple' or 'Amazon Echo'. I know I can do this: SearchNews please search news about {"Apple"|Keyword} for me SearchNews please search news about {"Amazon Echo"|Keyword} for me But the searching keyword in slot can be anything here.
10 |5000

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

The Stig avatar image
The Stig answered
Correct. What he's saying is that by adding in 15-20 or so of those examples, Alexa will recognize that anything can go there. So in your utterances you'd have things like: SearchNews please search news about {"chocolate cake"|Keyword} for me SearchNews please search news about {"New York Jets"|Keyword} for me SearchNews please search news about {"open heart surgery"|Keyword} for me etc. etc.
10 |5000

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

callmerockyli avatar image
callmerockyli answered
Thank you so much! It worked!
10 |5000

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