This visitor submit was written by Mulay Ahmed and Caroline Lima-Lane of Principal Monetary Group. The content material and opinions on this submit are these of the third-party authors and AWS is just not accountable for the content material or accuracy of this submit.
With US contact facilities that deal with tens of millions of buyer calls yearly, Principal Monetary Group® wished to modernize their buyer name expertise. Within the submit Principal Monetary Group will increase Voice Digital Assistant efficiency utilizing Genesys, Amazon Lex, and Amazon QuickSight, we mentioned the general Principal Digital Assistant resolution utilizing Genesys Cloud, Amazon Lex V2, a number of AWS companies, and a customized reporting and analytics resolution utilizing Amazon QuickSight.
This submit focuses on the acceleration of the Digital Assistant (VA) platform supply processes by automated construct, testing, and deployment of an Amazon Lex V2 bot (together with different database and analytics sources described later on this submit) utilizing a GitHub steady integration and supply (CI/CD) pipeline with automated execution of the Amazon Lex V2 Take a look at Workbench for high quality assurance. This resolution helps Principal® scale and keep VA implementations with confidence and pace utilizing infrastructure as code (IaC), configuration as code (CaC,) and an automatic CI/CD method as an alternative of testing and deploying the Amazon Lex V2 bot on the AWS Administration Console.
Principal is a worldwide monetary firm with practically 20,000 workers captivated with enhancing the wealth and well-being of individuals and companies. In enterprise for 145 years, Principal helps roughly 70 million prospects (as of This fall 2024) plan, shield, make investments, and retire, whereas working to assist the communities the place it does enterprise.The enterprise digital assistant engineering staff at Principal, in collaboration with AWS, used Amazon Lex V2 to implement a voice digital assistant to supply self-service and routing capabilities for contact heart prospects. The next engineering alternatives have been acknowledged and prioritized:
- Elimination of console-driven configuration, testing, and deployment of an Amazon Lex V2 bot
- Collaboration by structured model management and parallel improvement workflows for a number of staff members
- Acceleration of improvement cycles with automated construct, take a look at, and deployment processes for Amazon Lex bot creation and optimization
- Enhanced high quality assurance controls by automated testing gates and coding customary validation for dependable releases
With the automation options described within the submit, as of September 2024, Principal has accelerated improvement efforts by 50% throughout all environments (improvement, pilot, and manufacturing) by streamlined implementation and deployment processes. This resolution additionally enhances deployment reliability by automated workflows, offering constant updates whereas minimizing errors throughout improvement, pilot, and manufacturing environments, and maximizes improvement effectivity by integrating the Take a look at Workbench with GitHub, enabling model management and automatic testing.With the automation of the Take a look at Workbench and its integration with GitHub, the answer strengthens the CI/CD pipeline by sustaining alignment between take a look at information and bot variations, making a extra agile and dependable improvement course of.
Resolution overview
The answer makes use of the companies described in Principal Monetary Group will increase Voice Digital Assistant efficiency utilizing Genesys, Amazon Lex, and Amazon QuickSight. The next companies/APIs are additionally used as a part of this resolution:
- AWS Step Capabilities to orchestrate the deployment workflow
- The Take a look at Workbench APIs, that are invoked inside the Step Capabilities state machine as a sequence of duties
- AWS Lambda to course of knowledge to assist a number of the Take a look at Workbench APIs inputs
VA code group and administration
The Principal VA implementation makes use of Genesys Cloud because the contact heart software and the next AWS companies organized as totally different stacks:
- Bot stack:
- The Amazon Lex V2 CDK is used for outlining and deploying the bot infrastructure
- Lambda features deal with the bot logic and handle routing logic (for Amazon Lex and Genesys Cloud)
- AWS Secrets and techniques Supervisor shops secrets and techniques for calling downstream programs endpoints
- Testing stack:
- Step Capabilities orchestrates the testing workflow
- Lambda features are used within the testing course of
- Take a look at information incorporates take a look at circumstances and eventualities in Take a look at Workbench format
- Simulated knowledge is used to simulate numerous eventualities for testing with out connecting to downstream programs or APIs
- Information stack:
- Analytics stack:
- Amazon S3 shops logs and processed knowledge
- Amazon Information Firehose streams logs to Amazon S3
- Lambda orchestrates extract, remodel, and cargo (ETL) operations
- AWS Glue manages the Information Catalog and ETL jobs
- Amazon Athena is used for querying and analyzing analytics knowledge in Amazon S3
- Amazon QuickSight is used for knowledge visualization and enterprise intelligence
- CI/CD pipeline:
- GitHub serves because the supply code repository
- A GitHub workflow automates the CI/CD pipeline
Amazon Lex V2 configuration as code and CI/CD workflow
The next diagram illustrates how a number of builders can work on modifications to the bot stack and take a look at in parallel by deploying modifications regionally or utilizing a GitHub workflow.
The method consists of the next steps:
- A developer clones the repository and creates a brand new department for modifications.
- Developer A or B makes modifications to the bot configuration or Lambda features utilizing code.
- The developer creates a pull request.
- The developer deploys the Amazon Lex V2 CDK stack by one of many following strategies:
- Create a pull request and guarantee all code high quality and requirements checks are passing.
- Merge it with the primary department.
- Deploy the Amazon Lex V2 CDK stack from their native atmosphere.
- The developer runs the Take a look at Workbench as a part of the CI/CD pipeline or from their native atmosphere utilizing the automation scripts.
- Exams outcomes are displayed in GitHub Actions and the terminal (if run regionally).
- The pipeline succeeds provided that outlined checks resembling linting, unit testing, infrastructure testing and integration, and Take a look at Workbench practical testing cross.
- In any case assessments and checks cross, a brand new pre-release may be drafted to deploy to the staging atmosphere. After staging deployment and testing (automated and UAT) is profitable, a brand new launch may be created for manufacturing deployment (after guide overview and approval).
Amazon Lex Take a look at Workbench automation
The answer makes use of GitHub and AWS companies, resembling Step Capabilities state machines and Lambda features, to orchestrate the whole Amazon Lex V2 Bot testing course of (as an alternative of utilizing the current guide testing course of for Amazon Lex). The pipeline triggers the add of take a look at units, Lambda features to work together with the Amazon Lex V2 bot and Take a look at Workbench, then one other Lambda operate to learn the assessments outcomes and supply leads to the pipeline.
To take care of constant, repeatable evaluations of your Amazon Lex V2 bots, it’s important to handle and set up your take a look at datasets successfully. The next key practices assist hold take a look at units up-to-date:
- Take a look at set information are version-controlled and linked to every bot and its model
- Separate golden take a look at units are created for every intent and up to date frequently to incorporate manufacturing buyer utterances, rising intent recognition charges
- The versioned take a look at knowledge is deployed as a part of every bot deployment in non-production environments
The next diagram illustrates the end-to-end automated course of for testing Amazon Lex V2 bots after every deployment.
The post-deployment workflow consists of the next steps:
- The developer checks the take a look at file into the GitHub repository (or deploys straight from native). After every bot deployment, GitHub triggers the take a look at script utilizing the GitHub workflow.
- The take a look at scripts add the take a look at information to an S3 bucket.
- The take a look at script invokes a Step Capabilities state machine, utilizing a bot title and checklist of file keys as inputs.
- Amazon Lex Mannequin API calls are invoked to get the bot ID (ListBots) and alias (ListBotAliases).
- Every take a look at file secret’s iterated inside a Map state, the place the next duties are executed:
- Name Amazon Lex APIs to begin import jobs:
- StartImport – Creates a take a look at set ID and shops it beneath an S3 bucket specified location.
- DescribeImport – Checks if the standing of StartImport is full.
- Run the take a look at set:
- StartTestExecution – Creates a take a look at execution ID and executes the take a look at.
- ListTestExecutions – Gathers all take a look at executions. A Lambda operate filters out the present take a look at execution id and its standing.
- Get take a look at outcomes.
- Name Amazon Lex APIs to begin import jobs:
- When the take a look at is full:
- The ListTestExecutionResultItems API is invoked to assemble general take a look at outcomes.
- The ListTestExecutionResultItems API is invoked to fetch take a look at failure particulars on the utterance stage if current.
- A Lambda operate orchestrates the ultimate cleanup and reporting:
- DeleteTestSet cleans up take a look at units which are not wanted from an S3 bucket.
- The pipeline outputs the outcomes and if there are take a look at failures, these are listed within the GitHub motion or native terminal job report.
- Builders conduct the guide strategy of reviewing the take a look at outcome information from the Take a look at Workbench console.
Conclusion
On this submit, we introduced how Principal accelerated the event, testing, and deployment of Amazon Lex V2 bots and supporting AWS companies utilizing code. Along with the reporting and analytics resolution, this supplies a strong resolution for the continued enhancement and upkeep of the Digital Assistant ecosystem.
By automating Take a look at Workbench processes and integrating them with model management and CI/CD processes, Principal was capable of lower testing and deployment time, enhance take a look at protection, streamline their improvement workflows, and ship high quality conversational expertise to prospects. For a deeper dive into different related companies, discuss with Evaluating Lex V2 bot efficiency with the Take a look at Workbench.
AWS and Amazon will not be associates of any firm of the Principal Monetary Group.
This communication is meant to be instructional in nature and isn’t meant to be taken as a suggestion.
Insurance coverage merchandise issued by Principal Nationwide Life Insurance coverage Co (besides in NY) and Principal Life Insurance coverage Firm. Plan administrative companies supplied by Principal Life. Principal Funds, Inc. is distributed by Principal Funds Distributor, Inc. Securities supplied by Principal Securities, Inc., member SIPC and/or impartial dealer/sellers. Referenced firms are members of the Principal Monetary Group, Des Moines, IA 50392. ©2025 Principal Monetary Companies, Inc. 4373397-042025
In regards to the authors
Mulay Ahmed is a Options Architect at Principal with experience in architecting complicated enterprise-grade options, together with AWS Cloud implementations.
Caroline Lima-Lane is a Software program Engineer at Principal with an unlimited background within the AWS Cloud area.