Skip to content

Instantly share code, notes, and snippets.

@AdonousTech
Created October 19, 2019 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdonousTech/4a734ea6c532c3c1280d1d1be80312a5 to your computer and use it in GitHub Desktop.
Save AdonousTech/4a734ea6c532c3c1280d1d1be80312a5 to your computer and use it in GitHub Desktop.
Snippet of ASK Dialog Model with Auto Delegation Strategy
{
"interactionModel": {
"languageModel": {
"invocationName": "",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "FindADogIntent",
"slots": [
{
"name": "action",
"type": "actionType",
"samples": [
"{action} dog"
]
},
{
"name": "indefiniteArticle",
"type": "indefiniteArticleType",
"samples": [
"{action} {indefiniteArticle} dog"
]
},
{
"name": "breed",
"type": "breedType",
"samples": [
"{action} {indefiniteArticle} {breed}"
]
}
],
"samples": [
"{action}",
"{action} {indefiniteArticle} {breed}"
]
}
],
"types": [
{
"name": "actionType",
"values": [
{
"name": {
"value": "adopt"
}
}
]
},
{
"name": "indefiniteArticleType",
"values": [
{
"name": {
"value": "a"
}
},
{
"name": {
"value": "an"
}
},
{
"name": {
"value": "the"
}
}
]
},
{
"name": "breedType",
"values": [
{
"name": {
"value": "Affenpinscher"
}
},
{
"name": {
"value": "Afghan Hound"
}
},
{
"name": {
"value": "Airedale Terrier"
}
}
]
}
]
},
"dialog": {
"delegationStrategy": "SKILL_RESPONSE",
"intents": [
{
"name": "FindADogIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "action",
"type": "actionType",
"confirmationRequired": false,
"elicitationRequired": false
},
{
"name": "indefiniteArticle",
"type": "indefiniteArticleType",
"confirmationRequired": false,
"elicitationRequired": false
},
{
"name": "breed",
"type": "breedType",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Intent-FindADogIntent.IntentSlot-breed"
},
"validations": [
{
"type": "isNotInSet",
"prompt": "Slot.Validation.0.Intent-FindADogIntent.IntentSlot-breed",
"values": [
"giraffe",
"lion",
"tiger"
]
},
{
"type": "hasEntityResolutionMatch",
"prompt": "Slot.Validation.1.Intent-FindADogIntent.IntentSlot-breed"
}
]
}
]
}
]
},
"prompts": [
{
"id": "Elicit.Intent-FindADogIntent.IntentSlot-breed",
"variations": [
{
"type": "PlainText",
"value": "What breed are you looking for?"
},
{
"type": "PlainText",
"value": "There are lots of dog breeds to choose from, which breed did you have in mind?"
}
]
},
{
"id": "Slot.Validation.0.Intent-FindADogIntent.IntentSlot-breed",
"variations": [
{
"type": "SSML",
"value": "<speak>Hmm <break time='500ms' /> {breed} seems to be an animal <break time='300ms' /> not a dog breed</speak>"
},
{
"type": "SSML",
"value": "<speak>Seriously? <break time='500ms' /> Do you really think a {breed} is a dog breed?</speak>"
}
]
},
{
"id": "Slot.Validation.1.Intent-FindADogIntent.IntentSlot-breed",
"variations": [
{
"type": "PlainText",
"value": "Unfortunately, that dog breed is not in our list. Try a different breed."
},
{
"type": "PlainText",
"value": "We don't have that breed in our list. You should choose a different breed."
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment