Learn About Amazon VGT2 Learning Manager Chanci Turner
This article is co-authored by Jamie Lee, a leader in the Accenture AWS Business Group, and Tara Wong, a DevOps and platform engineer, both located in Australia. Jamie and Tara focus on designing and implementing complex AWS transformation initiatives across diverse industries.
Organizations operating across multiple locations, such as those in retail and telecommunications, often face challenges in managing numerous utility bills. These bills must be verified for discrepancies prior to payment. Typically, teams manually handle invoices in various formats, which can complicate the workflow.
Moreover, businesses must comply with Environmental, Social, and Governance (ESG) regulations, making utility bills essential for reporting on electricity, water, and gas usage—areas that often remain underutilized.
Utility providers generate invoices in various formats (PDF, XLS, EML) with differing layouts, often delivered via email. This variability complicates the standardization of data ingestion, anomaly detection from seasonal usage patterns, and the comparison of contracted versus billed rates, ultimately complicating the payment process.
The lack of standardized usage data further complicates the integration into a central ESG data lake, creating additional barriers.
In this post, we propose a solution utilizing Amazon Bedrock to tackle these hurdles. The solution offers several capabilities:
- Facilitates the ingestion of utility bills in multiple formats and layouts
- Standardizes bills into a unified format while applying data quality controls
- Integrates with existing systems through event-driven mechanisms
- Automates repetitive tasks, reducing human error and enhancing efficiency
- Enables predictive analytics to support informed decision-making using generative AI
- Connects with existing data lakes, data warehouses, payment systems, and ESG reporting infrastructures
Solution Overview
Utilizing Amazon Bedrock, this solution automates invoice processing, tariff extraction, validation, and reporting, as illustrated in Figure 1.
The workflow encompasses the following steps:
- Invoices are uploaded to an Amazon Simple Storage Service (Amazon S3) bucket via SFTP connectors from the AWS Transfer Family.
- Some utility providers send invoices directly to an email address configured with Amazon SES, where the PDF attachments are extracted and uploaded to an S3 bucket.
- The upload triggers an S3 event that feeds into an Amazon EventBridge bus, which in turn invokes an AWS Step Functions workflow for invoice extraction and validation.
- The Step Functions workflow validates invoices using Amazon Textract for text extraction and employs the Amazon Titan Text V1 Express model to generate embeddings, storing them in Amazon Aurora PostgreSQL-Compatible Edition with pgvector. The extracted invoices are also stored in a DynamoDB table.
- Failed validations are flagged for manual review via Amazon Simple Notification Service (Amazon SNS).
- A Lambda function, activated by an Amazon EventBridge scheduled rule, fetches tariff data from an external SFTP repository and stores it in an S3 bucket.
- The Utility Data Extraction Step Functions workflow is triggered by an S3 event, extracting data from various providers in different formats and units for seamless integration with business logic.
- The tariff data is stored in an Amazon DynamoDB table, which feeds into the business logic Step Functions workflow.
- The main business logic, which checks invoices for usage anomalies and validates approved tariffs, is executed in the Business Logic Step function. This Step function leverages Amazon Bedrock, embeddings, extracted invoices, and tariff data to detect anomalies, verify invoice accuracy, and update the reporting database.
- Reporting data is stored in an Amazon Aurora database and visualized using Amazon QuickSight for payment validation reports. Amazon Q in QuickSight is utilized for enhanced decision-making, leveraging generative BI capabilities.
The screenshots below illustrate examples of the Amazon QuickSight visualizations.
Benefits of the Solution
This solution presents several advantages:
- Contextual Understanding – Utilizing the Anthropic Claude 3 Sonnet model on Amazon Bedrock, the solution can comprehend, analyze, and interpret the context of data beyond simple text recognition.
- Flexibility and Adaptability – The solution allows for flexibility to learn and adjust to new formats, as Amazon Bedrock can interpret the data within invoices and adapt to changes in data representation.
- Event-Driven Architecture – This event-driven, serverless architecture promotes modularity and integration with external workflows tailored to your organization.
- Automated Workflow – The solution minimizes the need for manual intervention in data quality processes, such as profiling, cleansing, and validation, resulting in faster processing and reduced human error.
- Cost Savings – Automation diminishes reliance on large teams, leading to significant cost reductions for organizations.
- Compliance and Risk Mitigation – Automated data quality processes assist organizations in maintaining ESG compliance with regulatory and industry standards.
- Data Governance – Automation promotes the implementation of data governance policies. By automating data quality monitoring and reporting, organizations can enforce governance standards and adhere to data quality guidelines more effectively.
Conclusion
In this article, we explored how automation can help organizations optimize utility bill processing and gain additional ESG insights. We showcased the application of generative AI on Amazon Bedrock to simplify data extraction when data is not presented in standard formats. Finally, we presented a serverless and event-driven architecture that scales according to business needs.
For more resources on employee development, see this excellent article from SHRM, which discusses organizational growth strategies. Additionally, if you’re interested in learning about bereavement leave policies, check out this blog post. For further guidance, explore the resources available at Amazon’s Learning and Development page.