跳至内容

How to get out of the RETRY loop for Lex Slot Confirmation

0

I have set RETRY for my slot to 2...it goes through but if I say NO to the value it still goes back to the the beginning slot fill for the same intent. I want to branch out to another intent but I just don't see where I can detect or specify to branch when its through its alloted Retry prompts.

  • note it does the correct number of retry's but after its done it starts again..where can I tell it to go to another intent after x retry's are negative

已提问 2 年前1058 查看次数

2 回答
0
已接受的回答

So I finally figured out the flow of this. Simple Bot with one intent and one slot variable. Enable confirmations and decline, null the slot variable and go to initial response. That is how that loop works.

I then added my "decline counter" lambda at Initial Response and had it direct to a new intent I added called TooManyAttempts if it hit my limit of retry's.

For what its worth, this simple flow is a classic example of how things are often way too messy, difficult and not well documented in the AWS world. IMHO

已回答 2 年前

专家

已审核 2 年前

0

To handle the RETRY loop in Amazon Lex when a slot confirmation fails:

  1. Use Conditional Branching: After the RETRY attempts are exhausted, you can define a condition in your Lex bot to branch out to a different intent or message. This is done using Lambda function hooks or conditional checks within your Lex bot's flow.

  2. Configure Fallback Intent: You can also configure a fallback intent that triggers when the maximum retries are reached. This allows you to direct the conversation to a different flow or provide an alternative response.

For detailed steps, refer to the Amazon Lex Slot Types Documentation and Fallback Intent Documentation.

I hope this helps! 😁

已回答 2 年前

  • sounds promising but what condition am I checking and in which section? If I knew what was invoked in that intent after the retries were exhausted I might be closer.

  • Alternatively, how do I trigger the fallback after retries exhausted? I am just not seeing where I hook anything in the retry loop to catch the last one and branch somewhere. Its probably there but not jumping out at me...p.s. V2 bot

  • Clarification..this is after the CONFIRMATION LOOP has been answered NO, not just a failed data type entry...that DOES fallback correctly. What I am looking for is to have 2 retry/Confirmation combinations and if the answer is always NO then redirect to Fallback or?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。