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 isn’t chargeable for the content material or accuracy of this submit.
With US contact facilities that deal with thousands and thousands of buyer calls yearly, Principal Monetary Group® needed 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 answer utilizing Genesys Cloud, Amazon Lex V2, a number of AWS providers, and a customized reporting and analytics answer utilizing Amazon QuickSight.
This submit focuses on the acceleration of the Digital Assistant (VA) platform supply processes by way of 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 answer helps Principal® scale and preserve VA implementations with confidence and pace utilizing infrastructure as code (IaC), configuration as code (CaC,) and an automatic CI/CD strategy as a substitute of testing and deploying the Amazon Lex V2 bot on the AWS Administration Console.
Principal is a worldwide monetary firm with almost 20,000 staff obsessed 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 autumn 2024) plan, shield, make investments, and retire, whereas working to assist the communities the place it does enterprise.The enterprise digital assistant engineering group at Principal, in collaboration with AWS, used Amazon Lex V2 to implement a voice digital assistant to offer self-service and routing capabilities for contact heart prospects. The next engineering alternatives had been acknowledged and prioritized:
- Elimination of console-driven configuration, testing, and deployment of an Amazon Lex V2 bot
- Collaboration by way of structured model management and parallel growth workflows for a number of group members
- Acceleration of growth cycles with automated construct, take a look at, and deployment processes for Amazon Lex bot creation and optimization
- Enhanced high quality assurance controls by way of 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 growth efforts by 50% throughout all environments (growth, pilot, and manufacturing) by way of streamlined implementation and deployment processes. This answer additionally enhances deployment reliability by way of automated workflows, offering constant updates whereas minimizing errors throughout growth, pilot, and manufacturing environments, and maximizes growth 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 recordsdata and bot variations, making a extra agile and dependable growth course of.
Resolution overview
The answer makes use of the providers described in Principal Monetary Group will increase Voice Digital Assistant efficiency utilizing Genesys, Amazon Lex, and Amazon QuickSight. The next providers/APIs are additionally used as a part of this answer:
- AWS Step Features to orchestrate the deployment workflow
- The Take a look at Workbench APIs, that are invoked throughout the Step Features state machine as a sequence of duties
- AWS Lambda to course of knowledge to assist among 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 utility and the next AWS providers organized as completely different stacks:
- Bot stack:
- The Amazon Lex V2 CDK is used for outlining and deploying the bot infrastructure
- Lambda capabilities 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 methods endpoints
- Testing stack:
- Step Features orchestrates the testing workflow
- Lambda capabilities are used within the testing course of
- Take a look at recordsdata accommodates take a look at circumstances and eventualities in Take a look at Workbench format
- Simulated knowledge is used to simulate varied eventualities for testing with out connecting to downstream methods or APIs
- Knowledge stack:
- Analytics stack:
- Amazon S3 shops logs and processed knowledge
- Amazon Knowledge Firehose streams logs to Amazon S3
- Lambda orchestrates extract, remodel, and cargo (ETL) operations
- AWS Glue manages the Knowledge 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 adjustments to the bot stack and take a look at in parallel by deploying adjustments domestically or utilizing a GitHub workflow.
The method consists of the next steps:
- A developer clones the repository and creates a brand new department for adjustments.
- Developer A or B makes adjustments to the bot configuration or Lambda capabilities utilizing code.
- The developer creates a pull request.
- The developer deploys the Amazon Lex V2 CDK stack by way of 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 setting.
- The developer runs the Take a look at Workbench as a part of the CI/CD pipeline or from their native setting utilizing the automation scripts.
- Assessments outcomes are displayed in GitHub Actions and the terminal (if run domestically).
- The pipeline succeeds provided that outlined checks comparable to linting, unit testing, infrastructure testing and integration, and Take a look at Workbench useful testing go.
- In any case assessments and checks go, a brand new pre-release could be drafted to deploy to the staging setting. After staging deployment and testing (automated and UAT) is profitable, a brand new launch could be created for manufacturing deployment (after handbook overview and approval).
Amazon Lex Take a look at Workbench automation
The answer makes use of GitHub and AWS providers, comparable to Step Features state machines and Lambda capabilities, to orchestrate the whole Amazon Lex V2 Bot testing course of (as a substitute of utilizing the current handbook testing course of for Amazon Lex). The pipeline triggers the add of take a look at units, Lambda capabilities to work together with the Amazon Lex V2 bot and Take a look at Workbench, then one other Lambda perform to learn the assessments outcomes and supply leads to the pipeline.
To keep up constant, repeatable evaluations of your Amazon Lex V2 bots, it’s important to handle and arrange your take a look at datasets successfully. The next key practices assist preserve take a look at units up-to-date:
- Take a look at set recordsdata 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 regularly 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 immediately 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 recordsdata to an S3 bucket.
- The take a look at script invokes a Step Features state machine, utilizing a bot title and listing 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 key’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 underneath 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 perform 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 collect total 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 perform orchestrates the ultimate cleanup and reporting:
- DeleteTestSet cleans up take a look at units which might be now 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 handbook strategy of reviewing the take a look at end result recordsdata 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 providers utilizing code. Along with the reporting and analytics answer, this supplies a sturdy answer 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 in a position to lower testing and deployment time, enhance take a look at protection, streamline their growth workflows, and ship high quality conversational expertise to prospects. For a deeper dive into different related providers, consult with Evaluating Lex V2 bot efficiency with the Take a look at Workbench.
AWS and Amazon are usually not associates of any firm of the Principal Monetary Group.
This communication is meant to be instructional in nature and isn’t supposed 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 providers supplied by Principal Life. Principal Funds, Inc. is distributed by Principal Funds Distributor, Inc. Securities supplied by way of Principal Securities, Inc., member SIPC and/or impartial dealer/sellers. Referenced corporations 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 advanced enterprise-grade options, together with AWS Cloud implementations.
Caroline Lima-Lane is a Software program Engineer at Principal with an enormous background within the AWS Cloud house.