- Newest
- Most votes
- Most comments
In Amazon Lex, you cannot directly extend the built-in AMAZON.Confirmation slot type with custom synonyms. Instead, you should create your own custom slot type to handle the specific phrases you want to map to "Yes" or "No" responses.
Here's the recommended approach:
-
Create a custom slot type (with a name other than "Confirmation" since that's reserved for the built-in type)
-
Define your slot values as "Yes" and "No"
-
Add your custom synonyms to each value:
- For "Yes": add standard affirmatives like "yeah", "yep", "ok", "sure", etc.
- For "No": add standard negatives like "nope", "naw", etc., plus your custom phrase "add one by one"
- Configure the valueSelectionStrategy when creating or updating your slot type so that when a user enters a synonym, the slot will be filled with the corresponding slot value ("Yes" or "No")
When a user enters a synonym like "add one by one", the model will populate the originalValue field with "add one by one" and the first entry in the resolvedValues field will be "No". With the proper valueSelectionStrategy configuration, the slot value will be filled with "No".
This approach gives you full control over which phrases map to which values, while still maintaining the binary Yes/No structure you need for your AddAll slot.
Sources
Custom slot type - Amazon Lex
Custom Slot Types - Amazon Lex V1
AMAZON.Confirmation - Amazon Lex
answered a year ago
Relevant content
asked 3 years ago
asked 3 years ago
