ai-center
latest
false
AI Center
Automation CloudAutomation SuiteStandalone
Last updated Oct 10, 2024

Email AI

AI Solution Templates > Email AI

Note:

The Email AI Template is currently in public preview.

UiPath is committed to stability and quality of our products, but preview features are always subject to change based on feedback that we receive from our customers. Using preview features is not recommended for production deployments.

The Email AI Template solution is still supported for existing users, but for more complex use cases the Communications Mining solution is highly recommended. For more information on Communications Mining check the official documentation.

Overview

To learn more Email AI, check this video.

Benefits

This template provides a recipe to build your own Email AI Solution. The template helps achieve the following goals:

  1. Detect intent to organize and route emails to different department.
  2. Discover high value and urgent emails based on business needs and sentiment.
  3. Extract entities to execute data entry and escalation workflows.
  4. Show the impact of AI enhanced automation on Insights Dashboard.

Template contents

To achieve the above four goals, this template bundles the following in one single zip file, called EmailAI.zip, which can be downloaded from here:
  • Machine Learning (ML) Models (available in UiPath® AI Center)
  • Sample Datasets (inside the classification_data and ner_data folders)
  • Sample Workflows (inside the SMA_SmartMailAutomation and NER_Validation_Station folders)
  • Standard Analytics
  • Human in the loop and continuous learning of ML models
  • Configuration file (Config.xlsx)

Machine learning models

Sample datasets

Sample dataset are used to quickly test the models and create additional datasets specific to your use case.

The Email AI template bundle contains two sample datasets:

  • Sample Tagged Email Dataset for Multilingual Text Classification model (Email_Classification_data.csv) - this sample is used to classify emails between the following classes:
    • Transaction issues
    • Loan issues
    • Misinformation or clarification issues
  • Sample Tagged Email Dataset for Custom NER model (Email_NER_data.txt) - the following entities are labeled:
    • ID
    • PER
    • ORG
    • AMOUNT

Sample workflows

Sample workflows are used to run the models in pre-built workflows to see the power of AI, curate additional dataset, and customize the workflows if needed.

Sample business scenario workflow

The first thing that the automation does is to read all emails in a folder and clean the data. The workflow is configured to read emails from CSV or a folder in Outlook but can be extended to be triggered on new incoming emails. After reading new messages, the automation predicts the intent, entities, sentiment, and maps the email to question in the knowledge bank (supplied in the faq_data folder to workflow). Low confidence predictions go to Action Center, and then to AI Center Dataset.

Depending on the prediction, there are three possible scenarios:

Loan Issue: Data entry to CSV file and prioritize emails with loan higher than $10,000

Transaction Issue: Data entry to CSV file and prioritize emails with transaction value higher than $10,000

Misinformation or Clarification Issue: Extract the response from knowledge base for the mapped question

This execution workflow is also responsible for creating logs that can be consumed by the Insights dashboard queries.

After the prediction is done, a sample response for responding to incoming emails is created. The sample response can also be configured in the Config.xlsx file.

Standard analytics

In case of the demo provided, the information in the Insights demo looks similar to the screenshot below:



The Insights dashboards for Email AI is comprised of the following widgets:

Widget nameWidget typeDescription
Number of Emails ProcessedInputDisplays a cumulative total of all emails processed to date.
Automation DistributionPie ChartPercentage of automation used, distributed by:
  • Automated
  • Corrected by Human
  • Handed over to Human
Distribution of IntentsPie ChartPercentage of intents used, distributed by:
  • Transaction Issue
  • Request for Information
  • Loan Issue
  • Corrected by Human
  • Handed over to Human
Distribution of EntitiesPie ChartPercentage of entities used, distributed by:
  • Date
  • Person
  • Amount
  • ID
  • Organization
  • Corrected by Human
  • Handed over to Human
Distribution of SentimentsPie ChartPercentage of sentiments used, distributed by:
  • Handed over to Human
  • Corrected by Human
  • Negative
  • Neutral
  • Positive
  • Very Negative
  • Very Positive
Distribution of FAQ QuestionsPie ChartUsage percentage of each FAQ question received.

Human in the loop and continuous learning

The sample business scenario workflow provided pushes the low confidence data to Action Center for human validation and then to AI Center. For the Custom NER model, the NER_Validation_Station workflow is provided that can be used to validate custom entities and then push the data to AI Center.

Configuring Email AI

 Description
Step 1: Train and deploy ML Skills The following ML Skills need to be trained and deployed:
Step 2: Make all ML Skills public and copy the URL and API key Copy the URL and API keys of the deployed ML Skills.
Step 3: Use the SMA_SmartAutomationMail workflow and configure environment variables The workflow is ready to run with the necessary configurations provided.
Step 4: Go to the Insights dashboard and run the queries Configure the following queries in the Insights dashboard:
  • To be added soon.
  • To be added soon.
  • To be added soon.
Step 5: Configure human in the loop for NER After running the execution workflow, the low confidence data from Custom NER model is collected in the training_data sub folder in the NER_Validation_Station folder. Run the workflow in there to validate the data and change if needed. Now this data can be manually uploaded to AI Center or you can configure validation station to upload the data to the AI Center Dataset folder.
Step 6: Extend Email AI to your needs Now that we have seen how Email AI can automate your inbox, it is time to look into common inboxes of your company and extend this solution template to a solution.

Step 1: Train and deploy ML Skills

  1. Train the Text Classification Dataset model and deploy as ML Skill.
  2. Train the NER Dataset model and deploy as ML Skill.
  3. Deploy the Semantic Similarity Model as ML Skill.
  4. Deploy the Sentiment Analysis Model as ML Skill.

Step 2: Make all ML Skills public and copy the URL and API Key

For more information on how to make ML Skills public and generate a URL and API key, see Managing ML Skills.

Step 3: Configure the Email AI Demo

  1. Configure the API URL and keys for the ML Skills and Dataset folder in the ML Config sheet of the Config.xlsx.
  2. Configure the following parameters:
    1. UnreadLocalMailFolder to the folder demo_emails.
    2. OrchestratorFolderPath to a folder in your Orchestrator.
    3. FAQDataPath to a the folder faq_data.
  3. In the workflow, set the ConfigFilePath argument to the Config.xlsx file provided.
  4. Run the workflow, go to Action Center when the workflow pauses to validate the data.

Step 4. Go to the Insights Dashboard and run the Queries

This information will be added soon. For the moment, skip this step.

Step 5: Configure Human in Loop

  1. Open the workflow from the NER_Validation_Station folder.
  2. From Package Manager, add the UiPathTeam.CustomNER.Activities.1.0.0.nupkg dependency found inside the NER_Validation_Station folder.
  3. Set the config environment variable to the file path of the Config.xlsx file provided in the outer folder.
  4. Validate the data and edit it if necessary.
  5. The data will be written back to AI Center folder configured in Config.xlsx.

Step 6: Extend Email AI to your needs

The Email AI solution template can be configured according to your project's needs. To do this, you can change the configuration parameters in the Config.xlsx file.

When training with your own data, be sure to configure at least the following configuration parameters:

  1. Classifications
  2. NamedEntities
  3. SemanticSimilarityOnlyIfType
  4. UrgencyEntityType
    Finally, to extend NER_Validation_Station to new workflows, update the taxonomy.json file in the DocumentProcessing sub folder under the NER_Validation_Station folder.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.