question

Alok Sinha avatar image
Alok Sinha asked

Utterances file limit

Team, Is there a limit or best practices for the size of utterances file. We have integrated the SDK with our platform, LifeOn - which is basically a IoT integration platform with hundreds of devices. Each device then has parameters and each parameter has some values (specially if you have to set something) Currently, in order to improve the quality, we are generating the utterance file based on the possible combinations. Currently, we are at about 1200+ lines... but will increase in time to come My question: 1. Is it a good practice to keep adding to the utterance file (assuming the algo has been identified and optimized) 2. Is there a limit to the size of utterance file 3. Is there a best practice of utterance file size ? Alok
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
The utterance file has a finite size limitation. I think it's about 200K, but I can't find the reference right now. If you are generating ALL possible combinations, that's probably too many. In my experimenting I concluded that as long as each value appears at least once per slot, then extra ones don't help. Given that, it should be possible to write a "utterance file optimizer" standalone tool. It would read your utterance file, and try to output an optimized one. Do you think that would help?
10 |5000

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

natejgreene01 avatar image
natejgreene01 answered
Are you listing every possible combination? Is there any way to parameterize? I was able you use a the slots as a placeholder in my utterances. "My favorite number is {one|FavoriteNumber}." From there I was able to have it get what ever was passed in One, Three, Five, Seven etc.. Message was edited by: natejgreene01
10 |5000

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

Ross@Amazon avatar image
Ross@Amazon answered
Sample Utterances have a 200K character limit. Recommendations for defining the Sample Utterances can be found here: https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit/docs/defining-the-voice-interface#Recommendations%20for%20Defining%20the%20Sample%20Utterances.
10 |5000

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

Alok Sinha avatar image
Alok Sinha answered
hmm... looks like another step of action required for my app. Need to think about the logic around it. 1. I have a server with lets say 100 devices (each with its own customer defined name) 2. Each device has a set of 10-20 params (5-8 may be common) 3. Each param can then have another suite of values I have so far created only the device and params - the values, I have kept open... but even with this the list is quite long Alok
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
Once you get past 10-20 examples for each slot, Alexa has as good an idea as it's going to get for the values for it. So you don't have to have an exhaustive list of utterances. And, even if you did, Alexa still has trouble aligning them correctly. You are going to need to have error detection and correction in your business logic. Don't expect one-shot invocations are going to work with, say, three slots in them. Write your code to take what it can get, validate it, and then iterate conversationally with the user to fill out the slots you didn't get.
10 |5000

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