question

newuser-c630592e-475a-4c82-82ea-bc47e4dff788 avatar image
newuser-c630592e-475a-4c82-82ea-bc47e4dff788 asked ·

Amazon doesn't get the right Function

My Skill doesn't get the right answer to my Sample Utterances.

If i say "sechs drei sieben vier eins"

Amazon calls a Function named

getPaketCost, which has the following settings:

Intent:

{
"slots":[        
	{	
	"name":"packetSizex",         
	"type":"AMAZON.NUMBER"      
	},      
	{           
	"name":"packetSizey",         
	"type":"AMAZON.NUMBER"      
	},      
	{           
	"name":"packetSizez",         
	"type":"AMAZON.NUMBER"      
	}   
	],   
"intent":"getPaketCost"
}

Utterance:

getPaketCost nach den kosten für ein Paket der größe {packetSizex} {packetSizey} {packetSizez}
getPaketCost nach den kosten für ein Paket der größe {packetSizex} mal {packetSizey} mal {packetSizez}

but it should use getNumber instead

Intent:

    {
      "slots": [
        {
          "name": "number",
          "type": "AMAZON.NUMBER"
        }
      ],
      "intent": "getNumber"
    }

Utterance:

getNumber {number}
getNumber Postleitzahl {number}
getNumber Option {number}

If i say Postleitzahl sechs drei sieben vier eins, it works... But why isn't the first one Working?

I have a similar Problem with another Function.

If i say "Gartenhaus", it should use a function named ASG. But it chooses a completely other Function.

If i add a word phare at the beginning like

"bitte rufe diese Funktion auf {variable}". It also picks a completely other function.

Could you please check this out?

ID: amzn1.ask.skill.ef84d184-114d-4664-a5ea-f572e969afbb

alexa skills kitskilldebugginghelpvoice-user interface
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Jenn@amazon avatar image
Jenn@amazon answered ·

If there were only single word values, NLU will lean toward the Intent with sample utterances of longer word length.

The utterance you tried 'sechs drei sieben vier eins' is 5 words long. The utterances for getNumber are at most 2 words, because of this, NLU will weigh more heavily on the Utterance with a larger number of words - 'nach den kosten für ein Paket der größe {packetSizex}{packetSizey}{packetSizez}'

If users will be saying more than 1 number in an utterance, I would add additional utterances to the getNumber Intent to account for that.

Like:

Utterances

getNumber {numberOne}
getNumber Postleitzahl {numberOne}
getNumber Option {numberOne}
getNumber {numberOne}{numberTwo}
getNumber {numberOne}{numberTwo}{numberThree}
getNumber {numberOne}{numberTwo}{numberThree}{numberFour}
getNumber {numberOne}{numberTwo}{numberThree}{numberFour}{numberFive}
getNumber {numberOne}{numberTwo}{numberThree}{numberFour}{numberFive}{numberSix}

Intent

{      "slots": [        
	{          
		"name": "numberOne",          
		"type": "AMAZON.NUMBER"       
	},
		"name": "numberTwo",          
		"type": "AMAZON.NUMBER"
	},
	},
		"name": "numberThree",          
		"type": "AMAZON.NUMBER"
	},
     	},
		"name": "numberFour",          
		"type": "AMAZON.NUMBER"
	},
	},
		"name": "numberFive",          
		"type": "AMAZON.NUMBER"
	}
	],      
	"intent": "getNumber"    }
10 |2000 characters needed characters left characters exceeded

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