Automatically sort and prioritize your mailboxes by using Amazon Bedrock Amazon Web Services announced a generative AI solution using Amazon Bedrock to automatically sort and prioritize email messages for public sector organizations. The system categorizes incoming emails by department and urgency, aiming to reduce manual workload and improve response times for constituent communications. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Automatically sort and prioritize your mailboxes by using Amazon Bedrock AI-powered email management can transform how organizations in the public sector handle constituent communications. By implementing intelligent email routing and prioritization systems, organizations can automatically classify and direct incoming messages based on urgency and departmental relevance. This technology is particularly useful in local government settings, where councillors receive diverse communications across multiple service areas. AI solutions can analyze incoming email messages and route them to the appropriate departments, such as IT, Children’s Services, Housing, and Benefits. This automated approach supports faster response times, helps make sure urgent matters receive immediate attention, and allows staff to focus on high-value constituent service rather than manual email sorting. The technology helps create a more responsive and efficient public service delivery model that better serves constituent needs while optimizing organizational resources. In this post, we show how organizations in the public sector can automate their email management using a generative AI solution powered by Amazon Bedrock. Problem statement The current email management system faces three critical challenges: - Response time crisis: With hundreds of email messages arriving daily, urgent matters can be buried in general correspondence. This leads to delayed responses for time-sensitive issues. - Inefficient use of staff time: Staff handle huge volumes of email messages, which takes hours of manual processing. Sometimes a message must be processed multiple times by different departments. - Severity assessment challenges: Assessment of urgency and severity can be challenging to apply consistently to all correspondence. These challenges are compounded by staffing limitations and rising constituent expectations for faster response times. This solution uses Amazon Bedrock https://aws.amazon.com/bedrock/ and other AWS services to automatically categorize, augment, and prioritize incoming email messages to the appropriate departments while assessing their urgency. It reduces the manual workload for staff and provides a starting point for further development. Architecture The following diagram illustrates the solution architecture. Solution overview - Email is uploaded to an Amazon Simple Storage Service Amazon S3 https://aws.amazon.com/s3/ bucket. This upload can happen through various methods, such as using Amazon Simple Email Service Amazon SES https://aws.amazon.com/ses/ , third-party email integration, or the AWS SDK. The email messages are stored as Amazon S3 objects. Set up the Amazon S3 bucket following the security best practices https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html , such as data encryption and least-privilege access. - The Amazon S3 bucket is configured to send event notifications to Amazon EventBridge https://aws.amazon.com/eventbridge/ . - An Amazon EventBridge rule is configured to trigger on event patterns matching an S3 object creation event. The rule sends a message to an Amazon Simple Queue Service Amazon SQS FIFO queue containing the object creation information. - a The Amazon SQS FIFO queue is connected to an AWS Step Functions state machine https://docs.aws.amazon.com/step-functions/latest/dg/concepts-statemachines.html using Amazon EventBridge Pipes. This passes the created object metadata as an input to the Step Functions state machine. b If a message fails to process, it is placed into a dead-letter queue for further investigation. - AWS Step Functions retrieves the email content from the Amazon S3 bucket with the GetObject command. - The next step within the state machine is to invoke an Amazon Bedrock model with the InvokeModel API. As part of the inference parameters, the text field contains a prompt that provides instructions to the model along with the email content. The following is an example prompt that is passed into the Amazon Nova Pro https://aws.amazon.com/ai/generative-ai/nova/understanding/ model. 'You are an assistant providing email triage to customer services agents working at a local government organisation in the UK. You must read the email text and provide an output in the requested format.