Amazon LexΒΆ
The Amazon Lex NLU connector enables integration with Amazon Lex to use its language understanding results for powering AI Agents in Cognigy.AI.
PrerequisitesΒΆ
- Access to Amazon Lex.
Configuration on the NLU Provider SideΒΆ
- Log in to the AWS Console, then go to the Lex Start page to create a new bot.
- Make sure to configure the languages that the bot will support, based on the Locale in Cognigy.AI. This step is important for proper integration.
- After configuring the bot, save your changes and build the bot. Ensure all languages are built, especially if you intend to use multiple languages in Cognigy.AI.
- In the Lex Console, navigate to Bot versions and create a new version for your bot.
- Create a Bot Alias and associate it with the new version. Copy the Bot ID and Bot Alias ID from the URL for later use in Cognigy.AI.
-
Create a new IAM user in the AWS IAM Console, ensuring the user has the appropriate permissions. Make sure the AWS user has the following permissions:
User Permissions
iam:CreateUser iam:CreatePolicy iam:AttachUserPolicy lex:ListBotAliases lex:ListBotLocales lex:ListBots lex:ListBotVersions lex:ListBuiltInIntents lex:ListBuiltInSlotTypes lex:ListSlots lex:ListSlotTypes lex:DescribeBot lex:DescribeBotAlias lex:DescribeBotLocale lex:DescribeBotVersion lex:DescribeSlot lex:DescribeSlotType lex:CreateBot lex:CreateBotAlias lex:CreateBotLocale lex:CreateBotVersion lex:CreateIntent lex:CreateSlot lex:RecognizeText lex:StartConversation
- Once the user is created, retrieve the Access Key ID and Secret Access Key.
Configuration on the Cognigy.AI SideΒΆ
- In Cognigy.AI, go to Build > NLU Connectors and create an Amazon Lex NLU connector.
- (Optional) Toggle Reparse Lex Slots if you want to use reparse Lex Slots.
- Enter the retrieved credentials.
Parameter | Description & How to Find |
---|---|
Access Key | The Access Key ID you retrieved when creating the IAM user. |
Secret Access Key | The Secret Access Key you retrieved when creating the IAM user. |
AWS Region | The AWS region in which your Lex bot was created (for example, us-east-1 ). |
Bot ID | The Bot ID copied from the URL in the Lex Console. |
Bot Alias ID | The Bot Alias ID copied from the URL in the Lex Console. |
Test your NLU ConnectorΒΆ
By default, the Cognigy NLU connector is used in the Interaction Panel for testing purposes. To change this behavior, open the Settings tab in the Interaction Panel, then select the configured connector form the NLU Connector list.
Add your NLU Connector to Endpoint SettingsΒΆ
By default, the Cognigy NLU connector is used in the Endpoint. To change this behavior, follow these steps:
- Go to Deploy > Endpoints.
- Select the desired Endpoint and open the Endpoint Settings.
- Go to Natural Language Understanding > NLU Connector and select the configured connector.