In the realm of modern communication, email threads often harbor a wealth of information, yet extracting key insights can be a time-consuming task. To address this challenge, we developed a project utilizing a state-of-the-art RoBERTa model for quickly answering questions within email threads. This blog post provides an in-depth look at how we leveraged AI to enhance the email communication experience, while also keeping track of some metrics along the way.
Utilizing the Power of RoBERTa🤖
Our project begins with the integration of a RoBERTa model fine-tuned with the squad-v2 dataset, a combination which results in a personal assistant-like experience. Due to these capabilities, this model then serves as a virtual assistant, capable of comprehending the intricacies of email content and responding intelligently to user queries.
Lambda Function Invocation: On-Demand Intelligence
Our model is brought to life through a Lambda function, triggered whenever a user initiates a question within an email thread. The Lambda function retrieves the latest version of the model from S3, performs the necessary computations, and generates a contextual response tailored to the user's query.
User Interaction: Streamlit UI on AWS ECS
Making this powerful Q&A capability accessible to users is a Streamlit web application hosted on Amazon Elastic Container Service (ECS). Users can effortlessly interact with the backend, posing questions about specific email threads and receiving immediate, AI-generated responses. The threads are accessed from the Gmail/Outlook APIs, allowing users to select the subject of the thread they need to query.
Measuring Toxicity and Sentiment
The Lambda function, focused on monitoring, is equipped with the capability to measure toxicity and sentiments within the email thread. This additional information allows us to assess the overall tone and potential issues within the conversation. We wrote more about this at this blog.
In conclusion, our project showcases the potential of Generative AI in transforming email interactivity. By integrating high-performing model, storing it securely in S3, and creating a user-friendly interface with Streamlit on AWS ECS, we've brought a new level of intelligence to email threads. The addition of sentiment and toxicity measurements ensures that the digital conversation remains respectful and constructive.
As the digital landscape continues to evolve, projects like ours pave the way for more sophisticated and user-centric communication tools. We hope this exploration of AI-driven Q&A within email threads inspires you to consider innovative approaches in your own projects, ultimately redefining the way we engage in digital conversations.