Elevate buyer expertise via an clever e mail automation answer utilizing Amazon Bedrock


Organizations spend lots of assets, effort, and cash on working their buyer care operations to reply buyer questions and supply options. Your clients could ask questions via numerous channels, akin to e mail, chat, or telephone, and deploying a workforce to reply these queries might be useful resource intensive, time-consuming, and unproductive if the solutions to these questions are repetitive.

Though your group might need the info property for buyer queries and solutions, you should still battle to implement an automatic course of to answer to your clients. Challenges would possibly embrace unstructured information, totally different languages, and a lack of awareness in synthetic intelligence (AI) and machine studying (ML) applied sciences.

On this publish, we present you the right way to overcome such challenges by utilizing Amazon Bedrock to automate e mail responses to buyer queries. With our answer, you’ll be able to determine the intent of buyer emails and ship an automatic response if the intent matches your present information base or information sources. If the intent doesn’t have a match, the e-mail goes to the assist crew for a guide response.

Amazon Bedrock is a completely managed service that makes basis fashions (FMs) from main AI startups and Amazon obtainable via an API, so you’ll be able to select from a variety of FMs to seek out the mannequin that’s greatest suited in your use case. Amazon Bedrock presents a serverless expertise so you may get began rapidly, privately customise FMs with your individual information, and combine and deploy them into your functions utilizing AWS instruments with out having to handle infrastructure.

The next are some widespread buyer intents when contacting buyer care:

  • Transaction standing (for instance, standing of a cash switch)
  • Password reset
  • Promo code or low cost
  • Hours of operation
  • Discover an agent location
  • Report fraud
  • Unlock account
  • Shut account

Agents for Amazon Bedrock will help you carry out classification and entity detection on emails for these intents. For this answer, we present the right way to classify buyer emails for the primary three intents. It’s also possible to use Brokers for Amazon Bedrock to detect key info from emails, so you’ll be able to automate your enterprise processes with some actions. For instance, you should utilize Brokers for Amazon Bedrock to automate the reply to a buyer request with particular info associated to that question.

Furthermore, Brokers for Amazon Bedrock can function an clever conversational interface, facilitating seamless interactions with each inside crew members and exterior shoppers, effectively addressing inquiries and implementing desired actions. Presently, Brokers for Amazon Bedrock helps Anthropic Claude fashions and the Amazon Titan Textual content G1 – Premier mannequin on Amazon Bedrock.

Answer overview

To construct our buyer e mail response stream, we use the next companies:

Though we illustrate this use case utilizing WorkMail, you should utilize one other e mail software that permits integration with serverless capabilities or webhooks to perform comparable e mail automation workflows. Brokers for Amazon Bedrock lets you construct and configure autonomous brokers in your software. An agent helps your end-users full actions primarily based on group information and consumer enter. Brokers orchestrate interactions between FMs, information sources, software program functions, and consumer conversations. As well as, brokers robotically name APIs to take actions and invoke information bases to complement info for these actions. Builders can save weeks of improvement effort by integrating brokers to speed up the supply of generative AI functions. For this use case, we use the Anthropic Claude 3 Sonnet mannequin.

If you create your agent, you enter particulars to inform the agent what it ought to do and the way it ought to work together with customers. The directions exchange the $directions$ placeholder within the orchestration immediate template.

The next is an instance of directions we used for our use instances:

“You're a classification and entity recognition agent. 

Activity 1: Classify the given textual content into one of many following classes: "Switch Standing", "Password Reset", or "Promo Code". Return solely the class with out extra textual content.

Activity 2: If the categorized class is "Switch Standing", discover the 10-digit entity "money_transfer_id" (instance: "MTN1234567") within the textual content. Name the "GetTransferStatus" motion, passing the money_transfer_id as an argument, to retrieve the switch standing.

Activity 3: Write an e mail reply for the client primarily based on the obtained textual content, the categorized class, and the switch standing (if relevant). Embody the money_transfer_id within the reply if the class is "Switch Standing".

Activity 4: Use the e-mail signature "Finest regards, Clever Corp" on the finish of the e-mail reply.”

An motion group defines actions that the agent will help the consumer carry out. For instance, you would outline an motion group referred to as GetTransferStatus with an OpenAPI schema and Lambda operate hooked up to it. Brokers for Amazon Bedrock takes care of developing the API primarily based on the OpenAPI schema and fulfills actions utilizing the Lambda operate to get the standing from the DynamoDB money_transfer_status desk.

The next structure diagram highlights the end-to-end answer.

The answer workflow consists of the next steps:

  1. A buyer initiates the method by sending an e mail to the devoted buyer assist e mail deal with created inside WorkMail.
  2. Upon receiving the e-mail, WorkMail invokes a Lambda operate, setting the following workflow in movement.
  3. The Lambda operate seamlessly relays the e-mail content material to Brokers for Amazon Bedrock for additional processing.
  4. The agent employs the pure language processing capabilities of Anthropic Claude 3 Sonnet to know the e-mail’s content material classification primarily based on the predefined agent instruction configuration. If related entities are detected inside the e mail, akin to a cash switch ID, the agent invokes a Lambda operate to retrieve the corresponding cost standing.
  5. If the e-mail classification doesn’t pertain to a cash switch inquiry, the agent generates an acceptable e mail response (for instance, password reset directions) and calls a Lambda operate to facilitate the response supply.
  6. For inquiries associated to cash switch standing, the agent motion group Lambda operate queries the DynamoDB desk to fetch the related standing info primarily based on the offered switch ID and relays the response again to the agent.
  7. With the retrieved info, the agent crafts a tailor-made e mail response for the client and invokes a Lambda operate to provoke the supply course of.
  8. The Lambda operate makes use of Amazon SES to ship the e-mail response, offering the e-mail physique, topic, and buyer’s e mail deal with.
  9. Amazon SES delivers the e-mail message to the client’s inbox, offering seamless communication.
  10. In eventualities the place the agent can’t discern the client’s intent precisely, it escalates the difficulty by pushing the message to an SNS subject. This mechanism permits subscribed ticketing system to obtain the notification and create a assist ticket for additional investigation and determination.

Conditions

Consult with the README.md file within the GitHub repo to be sure you meet the stipulations to deploy this answer.

Deploy the answer

The answer is comprised of three AWS Cloud Deployment Kit (AWS CDK) stacks:

  • WorkmailOrgUserStack – Creates the WorkMail account with area, consumer, and inbox entry
  • BedrockAgentCreation – Creates the Amazon Bedrock agent, agent motion group, OpenAPI schema, S3 bucket, DynamoDB desk, and agent group Lambda operate for getting the switch standing from DynamoDB
  • EmailAutomationWorkflowStack – Creates the classification Lambda operate that interacts with the agent and integration Lambda operate, which is built-in with WorkMail

To deploy the answer, you additionally carry out some guide configurations utilizing the AWS Management Console.

For full directions, check with the README.md file within the GitHub repo.

Take a look at the answer

To check the answer, ship an e mail out of your private e mail to the assist e mail created as a part of the AWS CDK deployment (for this publish, we use assist@vgs-workmail-org.awsapps.com). We use the next three intents in our pattern information for customized classification coaching:

  • MONEYTRANSFER – The shopper desires to know the standing of a cash switch
  • PASSRESET – The shopper has a login, account locked, or password request
  • PROMOCODE – The shopper desires to find out about a reduction or promo code obtainable for a cash switch

The next screenshot exhibits a pattern buyer e mail requesting the standing of a cash switch.

The next screenshot exhibits the e-mail obtained in a WorkMail inbox.

The next screenshot exhibits a response from the agent relating to the client question.

If the client e mail isn’t categorized, the content material of the e-mail is forwarded to an SNS subject. The next screenshot exhibits an instance buyer e mail.

The next screenshot exhibits the agent response.

Whoever is subscribed to the subject receives the e-mail content material as a message. We subscribed to this SNS subject with the e-mail that we handed with the human_workflow_email parameter in the course of the deployment.

Clear up

To keep away from incurring ongoing prices, delete the assets you created as a part of this answer while you’re completed. For directions, check with the README.md file.

Conclusion

On this publish, you realized the right way to configure an clever e mail automation answer utilizing Brokers for Amazon Bedrock, WorkMail, Lambda, DynamoDB, Amazon SNS, and Amazon SES. This answer can present the next advantages:

  • Improved e mail response time
  • Improved buyer satisfaction
  • Value financial savings relating to time and assets
  • Skill to concentrate on key buyer difficulty

You’ll be able to broaden this answer to different areas in your enterprise and to different industries. Additionally, you should utilize this answer to construct a self-service chatbot by deploying the BedrockAgentCreation stack to reply buyer or inside consumer queries utilizing Brokers for Amazon Bedrock.

As subsequent steps, try Agents for Amazon Bedrock to begin utilizing its options. Observe Amazon Bedrock on the AWS Machine Learning Blog to maintain updated with new capabilities and use instances for Amazon Bedrock.


Concerning the Creator

Godwin Sahayaraj Vincent is an Enterprise Options Architect at AWS who’s captivated with Machine Studying and offering steering to clients to design, deploy and handle their AWS workloads and architectures. In his spare time, he likes to play cricket along with his buddies and tennis along with his three children.

Ramesh Kumar Venkatraman is a Senior Options Architect at AWS who’s captivated with Generative AI, Containers and Databases. He works with AWS clients to design, deploy and handle their AWS workloads and architectures. In his spare time, he likes to play along with his two children and follows cricket.

Leave a Reply

Your email address will not be published. Required fields are marked *