The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply. |
This topic covers how to create an AI skill to classify emails using machine learning (ML) models.
An email classification AI skill takes emails as inputs via the Classify Emails smart service, analyzes the emails, and returns predictions about an email's type.
Here's a high-level breakdown of how to create and use an email classification AI skill:
In the Build view, click NEW > AI Skill.
In the Classification section, select Emails.
Configure the following properties:
Property | Description |
---|---|
Name | Enter a name that follows the recommended naming standard. |
Description | (Optional) Enter a brief description of the AI skill. |
Email types are the categories of emails you want this skill to classify. For example, email types might be account inquiries or customer feedback. You'll define an email type for each category of email, and then provide training data that represent the emails you expect to classify in production.
To create an email type:
On the Configure Training page, click NEW EMAIL TYPE.
The model needs training data to learn about the patterns or traits the emails have in common. The model also uses some of these training emails to test its knowledge after training.
The model can only learn from the emails you provide, so be sure to build a comprehensive and diverse set of emails that represent what you expect to classify in your process.
Training emails must meet the following requirements:
You can add training data to a new or existing email type.
To add training emails to an existing email type:
After you've added training emails, you're ready to start training the model.
Keep in mind the following requirements when training this AI skill type:
If any of these guardrails are limiting, please reach out to your Appian contact.
You'll manually prompt the model to start training based on the training emails you provided. When you've created the relevant email types and provided training emails for each one, click TRAIN MODEL on the Configure Training page.
During training, the model analyzes a portion of your training emails to learn about the traits or patterns that could identify them as the email type. Model training is only based on subject and body of each email. All other email data and metadata is stripped or ignored, including HTML in the subject and body (if present).
After learning about your emails, the model uses the remaining portion of the training emails to test itself. The model training will display metrics to show how it performed.
Tip: Training can take a few minutes. You can close the Training Summary page and return later to view the results.
After the model is finished training and testing, you're shown a number of metrics measuring its performance. You'll use this information to determine if this model is ready to publish, or if you'd like to provide more emails for the model to continue training.
Some of these metrics might be more or less relevant based on your use case and the type of emails you expect to classify.
Learn more about evaluating model performance.
Before you integrate the skill into a process, you want to be confident the published model performs as you expect. You can test the model using a few sample files to verify it works as you expected directly within the AI skill object.
To test the model:
Click TEST MODEL.
Browse for and select the documents you want to add. You can add up to five files.
In the banner showing you the test status, click REFRESH to see when results are available.
Click START OVER to run another test with different files, or CLOSE to exit the results window.
If the model's training metrics don't yet meet your requirements, you can continue training to try to boost the model's performance. Each time you retrain, you're creating a new model. Provide the new model with additional training emails to help it learn more about the email type. Be sure your training emails represent the emails you expect to see in production.
Tip: Training a new model doesn't make the AI skill unavailable or otherwise impact a published model. The AI skill uses the existing published model until you publish a new one.
To continue training by creating a new model:
As you expand how you use machine learning models throughout your applications, you might wonder: when should I train a new model vs. creating an entirely new skill?
Keep in mind you can only publish one model for a skill. In practice, this means that a Classify Emails smart service will only be able to access one model for the skill the smart service is configured to use.
Also keep in mind that ML models are designed for a specific purpose. To help the model specialize and hone in on key traits in your email types, consider creating one at the lowest level possible for your process. That is, if a single step in a process requires you to classify inquiries or complaints, don't bother including a third email type for other notifications. Adding this extraneous information will only serve to distract the model, so it's best to exclude. Instead, create email types specific to the emails you expect to classify in your specific use case.
To help demonstrate these ideas, let's use the example of studying for a test. Imagine you're taking a driving exam to get your license. You'll study laws and general rules of the road, as well as practice identifying street signs. You may even test your knowledge by navigating a practice test that contains word problems and multiple choice questions. Your family is moving to a neighboring state around the same time you're planning to take the test.
With these two things in mind, you can begin to consider when to create a new AI skill instead of using an existing one. In short:
When the model's training metrics meet your requirements, you're ready to put it to use. Publish the model to make it available for use in your process, through the Classify Emails smart service.
You'll configure the Classify Emails smart service to use your AI skill. When the process reaches the smart service node, it uses the published model within the skill to analyze and classify emails.
Now you're ready to use your email elassification skill in a process.
Add the Classify Emails smart service and configure it to call your new skill.
Review the feature's compliance to ensure it aligns with your organization's security requirements.
Create an Email Classification AI Skill