Sentiment Analysis Model v1.2

By Buwani Manuweera, Data Scientist | 03/04/2023

Table of Contents

1. Introduction
2. New Release v1.2: Tone Intensities
3. Overview
4. New Features
5. Fixed Issue
6. Future Work
7. Conclusion


When sending an email campaign, it is crucial to strike the right tone in order to maximize engagement with your subscribers. To assist campaign engineers with this task, Loxz has developed a Sentiment Analysis model. This tool analyzes the tone of the email text and provides predictive analytics on eight different tones. The sentiment analysis model can be run within the text editor for convenience or in the preview environment prior to deployment.

These tones include but are not limited to:

  • Joyful
  • Confident
  • Respectful
  • Urgent
  • Friendly
  • Optimistic
  • Analytical
  • Casual

By running Loxz's Sentiment Analysis model, campaign engineers can better understand the emotional impact of their emails and tailor their messaging to their target audience. The previous version of the model has been successful in providing these insights and helping to improve engagement rates.

New Release v1.2: Tone Intensities

The latest version of the Sentiment Analysis v1.12, model now allows users to input their respective industry and campaign type. In addition to analyzing tone, the model also evaluates the intensity of each tone and suggests specific changes that can improve engagement rates. This enhanced feature is achieved through the use of BERT model for tone intensity analysis and Random Forest Regression for predictions.

To provide a better user experience, we have added more interactive options that allow users to easily input data and receive clear and concise outputs. We have also included the option to generate modified text through an LLM with the preferred tone intensities, providing campaign engineers with more flexibility to tailor their messaging to their audience. With advanced prompt engineering embedded in the user experience, campaign engineers will be able to easily strike the right tone for maximum engagement. These features allow campaign engineers to fully maximize the current version of our Sentiment Analysis Model.

Figure 1. The model interface with input dropdowns and tone intensity sliders


In our latest version of the Sentiment Analysis model, we have made significant improvements to enhance the user experience and provide more convenient features.

One of our key additions is the ability for campaign engineers to adjust the tone intensities and see how those adjustments can impact engagement rates. We also provide Loxz recommended tone intensities to help engineers achieve the best possible outcomes. Each campaign and or email type needs a different tone to ultimately be effective. A webinar email might need to strike a more urgent tone than a promotional email. Same can be said for Industry type.

Generative AI and Prompt Engineering

To further improve efficiency, we have added a prompt engineering layer to the model, making it simpler for campaign engineers to input data and receive accurate outputs in realtime.

Finally, we have added a new feature that generates modified text with the desired tone intensities. This provides campaign engineers with a more hands-on approach to tailoring their messaging to their target audience.
We are confident that these features will provide a much better user experience and help campaign engineers make informed decisions when creating their email campaigns.

New Features

We added several new features to our model for a better representation of both inputs and outputs.

Tone Intensities Sliders

We added eight new slider widgets corresponding to each tone used in the model. The slider values are set to the corresponding values of tones of the email text provided. But the user can adjust them to increase or decrease the tones and get an interactive experience while understanding how the engagement rates dynamically change based on the tone intensities.

Figure 1 shows the interface for the inputs with tone intensity sliders added.

Tone Intensities Chart

Based on the values of the intensity sliders in Figure 1, we provide a graphical representation of the tone intensities for the user to get a clear picture of the effect of the tone changes. Along with the graph, it provides the change in the engagement rate caused by the intensity changes whether it is an increase or decrease.

Figure 2. Graphical representation of the tone intensities of the current email Accuracy Score is maintained until the model is retrained.
Figure 3. Graphical representation of the tone intensities to get the Loxz recommendation Accuracy score is maintained until model is retrained with new data

Initial Predicted Output

We added changes to the representation of the target variable. In this example it is the conversion rate selected by the campaign engineer. This differs from our previous version as the current version shows the numbers of the predicted value and the confidence interval of the prediction in a clear format. Both are presented in numbers without graphs so the campaign engineer knows what prediction to expect for the engagement rate prior to deployment.

Figure 3 shows the updated representation of the predictions. The campaign engineer has the ability to update tones herself to get the desired predicted value and a desired confidence interval. After making her changes, and running the model, she will see the predicted value of her target variable increase.

Figure 4. Predicted engagement rate and the confidence interval

Loxz Recommendation Input

We provide the user with the option to utilize the Loxz recommended tone intensities to get the optimal engagement rate for the target variable selected. This creates efficiencies when building the campaign. Regarding the two preceding charts, you see that the recommended output, yields a higher conversion rate asking for a more analytical tone to the email to achieve a higher engagement rate. This changes dynamically depending on the inputs. Type of Email Campaign, Industry, and Target Variable.

By checking a box within the workflow, the campaign engineer can use the interactive sliders to adjust the tone as described above which maximize the desired target variable with a single click.

Once they select the option, the model will display the Loxz recommendation. Figure 4 below shows the Loxz recommendation checkbox widget added in our latest version of the sentiment analysis model. This interactive feature will display predicted outputs immediately after the model is run.

Figure 5. Loxz Recommendation checkbox option

Loxz Recommendation Output

If the campaign engineer chooses to select the option to get the Loxz recommendation for the optimal output (as shown in Figure 3), the model will show the optimal engagement rate and a graphical representation of the tone intensities that will yield the optimal output.

Figure 4 shows the graphical representation of tone intensities and the engagement rate recommended by Loxz.

Text Generation and Prompt Engineering

Lastly, in order to provide a better user experience, we give the user the option to generate a rewritten text of the email with suggested tones. Currently, the user can specify what tone intensities they need to increase or decrease and the model will generate the output based on the request. The campaign engineer can choose to include that text in their campaign email or not. This feature is added so the campaign engineer has the option to get an idea of what tone changes to be made to achieve a better engagement rate. They can use either part or all of the text that has been generated by our model.

Figure 5 shows the user input field and the model output for the given text.

Fixed Issue

The main issue we intended to fix is the overall user experience. We changed the model so the user can understand the recommendations and apply changes efficiently. Therefore, we removed any complex graphical representations and replaced them with more user-friendly formats without losing any information.

Future Work

As for our future versions, we will improve on the text generation feature to further enhance the output where the model can consider the Loxz recommendation or the user’s selection of the intensities to generate new text automatically. Also, the text generation will be made into a more interactive feature so the user has more options to input and provide further requests or information.

We also intend to add more engagement rates useful for email campaigns. The campaign engineer will have more options to select from for the type of engagement rate.

Regionalize Tones

Additionally, we’re also developing a specific tone for the following world regions as well.

  • Africa
  • Americas
  • Asia
  • Europe
  • Oceania

By selecting a region like Asia, the email would be optimized for the Asian region with the proper tone intensities. For example, Asian region subscribers might engage with more respectful tones and the American region might want a more urgent tone to maximize the target variable metric chosen. Really all depends on the campaign engineers inputs. In the future we will potentially layer in another input for language. Suffice to say, that the model will generate text with the proper tone intensities for each region of the world.


In the latest release, the Sentiment Analysis model v1.12 is designed to help campaign engineers predict and optimize the tone intensities of their emails to achieve the best possible engagement rates. The model evaluates eight different tones generated by the BERT model and provides recommendations based on its analysis.

In our latest version, we have added several features to improve the user experience. Interactive sliders allow users to easily adjust tone intensities, and graphical representations help visualize the impact of those adjustments on engagement rates. Additionally, users can opt to receive Loxz’s recommended tone intensities for optimal engagement.

We have also included a new text generation feature that generates text with the requested tone intensities. While this feature is still being fine-tuned for future versions, we are confident it will provide a more refined output for email campaigns.

Looking ahead, we plan to add more inputs to the model so that campaign engineers have even more options for selecting and inputting data. Our ultimate goal is to provide campaign engineers with a user-friendly model that helps them optimize their email campaigns for the best possible engagement rates.