1

I have built a multiple-choice Q&A Amazon Lex chatbot connected to a lambda function written in Python. Due to the complexity of the intent, simple built-in slot type and response cards do not satiate my needs, so I have created a customized slot type and fed it with common button values. The intent is supposed to take in the user's chosen option and find it a match in a numpy array. However, to my surprise, the Lex fails to take in some of the button values or filters out some stop words randomly from the the values.

Initially, I thought the problem is caused by the fact that the button values are non-English. Yet, the issue was not solved after I have switched all the button values to English. It is bewildering to me that simple string texts such as "Hole puncher" and "Remote protector" cannot be recognized. It is even stranger that under the same question, button with the value "Minimally invasive approach device" works perfectly while button with the value "Conveying guide" does not. I tried to find patterns of how Amazon Lex processes these value inputs, but I have found none. I have also read through the developer's guide and found no explanation on this issue.

I then suspected that the Advanced Options in the chatbot's settings is the cause of this issue, because it appears to be an advanced NLP function that is responsible for the interruptions in value inputs (I guess, I am not sure). So I attempted to switch it to "No" and rebuild the chatbot. But the chatbot failed to rebuild and threw an error. I do not really know how to check what that error is either, but I am pretty sure that it is due to the change in the Advanced Options. Here is what the error looks like and the Advanced Options in Settings.

Can anyone please help me with this? It would be really helpful if anyone can provide any insight on how Amazon Lex processes button values. Much appreciated!


UPDATE: I checked the Monitoring Utterances page on Lex today, and I found out that almost all of the unrecognized text strings were displayed there categorized as "Missed". Turned out that the chatbot assumes that these texts are utterances instead of button values. I do not really understand why Lex is confusing these two. Any help would be appreciated!

1 Answer 1

0

Lex needs a way to map the user's input to an intent within your Bot. The way this is done is through the user utterances. In order for Lex to further map the user's input to your custom slot type, these slot types need to be assigned to one or more intents.

How does the user initiate the conversation with your Bot? Would the user start the conversation using a term found within your custom slot? If so, then you'd need to set the custom slot as a valid sample user utterance.

Lex attempts to understand the user's intention within the context of a conversation. If the conversation has not been initiated and the custom slots are not mapped to any utterance, then starting a conversation using your custom slots will result in the failure that you're seeing now.

If it is a case of Lex moving to the correct intent but not then being able to map the input to the correct slot then confirm you're using the most recent version of your custom slot within the utterance.

If the build is failing then it's likely you have an issue with an incorrect mapping or value somewhere in your Bot which needs to be rectified to rule out any extraneous issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.