* Services
  [Product Development
  Focus on the core idea and market fit while we masterfully handle user-focused product design.
  Learn more
  [Engineering
  Leverage cutting-edge technology to address customer challenges with expert guidance.
  [AI consulting
  Embrace the future of AI-driven innovation and thrive in a rapidly evolving digital landscape.
  [Growth Marketing
  Engage targeted audiences and meet business goals through strategic marketing solutions.
* + 
  + 
  Areas of expertise
  Get in touch
  + Phone: 646-781-8591
  + Email:
    sales@dizzain.com
# Automating Mail Processing for a Workers’ Compensation Law Firm
Reduced manual labor
80%
Letters processed daily
300+
Accuracy
98%
By
Pavel Tolstyko
September 5, 2024
4
min read
Author
!
Developer
As a developer, I love solving challenges and building solutions that make a difference. Keeping up with the latest tech trends helps me to merge creativity with technical skills to deliver great products.
Main tools
Bubble.io
AWS ESC
AWS CodeBuild
AWS ECR
AWS EventBridge
PyTorch
Scikit-learn
 Pandas
MLflow
Apache Airflow
Gemini
Content
* Business Challenge
* Our Solution
* Business Benefits
* Technical Implementation
* Conclusion
## Introduction
Our project aimed to improve the mail processing system for a law firm specializing in Workers’ Compensation cases. By implementing cutting-edge automation solutions, we significantly reduced manual labor, increased efficiency, and minimized errors in document handling.
## Business Challenge
The law firm was struggling with an overwhelming volume of daily physical mail, which required extensive manual processing. This labor-intensive process included:
* Scanning hundreds of letters
* Manually classifying and tagging documents
* Renaming files for easy identification
* Forwarding documents to appropriate attorneys
This process was time-consuming, prone to errors, and resource-intensive, impacting the firm’s operational efficiency and client service quality.
The manual mail processing system
## Our Solution
We developed a comprehensive automation system that leverages machine learning and artificial intelligence to streamline the entire mail processing workflow. Key components of our solution include:
* Text Recognition (OCR)
* Automated document classification
* Intelligent file naming
* Information extraction using Large Language Models (LLMs)
* Automated routing to attorneys
Comprehensive automation system
## Business Benefits
Our automation solution delivered significant improvements:
1. Reduced manual labor by 80%
2. Automated processing of 300+ letters per day
3. 98% accuracy in document classification and information extraction
4. Enhanced attorney productivity by ensuring faster and more accurate document delivery
5. Reduced operational costs associated with mail processing
## Technical Implementation
Our solution incorporates several advanced technologies:
1. **Text Extraction/OCR** for converting image versions of the scanned documents into text for further analysis
2. **Machine Learning Models** for document classification and file naming pattern recognition
3. **Large Language Models (LLMs)** for information extraction and template population
4. **AWS Services** for data storage, processing, and API interactions
5.  for creating a user-friendly monitoring dashboard
## Text Extraction (OCR)
The initial step in our process involves extracting text from scanned documents. The law firm uploads batches of scanned documents as PNG images to SharePoint. We implemented Tesseract, an open-source OCR engine, to convert these images into machine-readable text. To improve accuracy, especially for lower-quality scans, we applied noise reduction techniques before running the OCR process. This crucial step ensures that all subsequent text-based operations have high-quality input data.
## Information Extraction
We utilized a Large Language Model to recognize and extract essential information from documents, including:
* Document date
* Letter date
* Claimant’s name
* Employer’s name
## Document Classification
We developed a neural network-based classification model trained on thousands of pre-classified documents from the client’s Meruscase system. This model accurately tags incoming documents, eliminating the need for manual classification.
How we solved the Document Classification Problem:
1. Data Collection: We extracted thousands of pre-classified files from the client’s Meruscase system to create our training dataset.
2. Data Analysis and Preprocessing: We addressed issues such as duplicates, class imbalance, and outliers. Key preprocessing steps included lemmatization and categorical feature encoding.
3. Model Selection and Training: After experimenting with various algorithms, we chose a Fully Connected Neural Network (FCNN) due to its ability to handle complex nonlinear relationships in large datasets. The network uses ReLU activation for the first layer and sigmoid for the second layer.
4. Evaluation and Tuning: We assessed the model using metrics such as accuracy, recall, precision, and F1 score. Multiple experiments were conducted to optimize hyperparameters and improve performance.
5. Deployment and Monitoring: The model was integrated into the client’s system with continuous monitoring to track real-time performance and allow for ongoing improvements.
Network-based classification model
## File Naming Automation
The principle of creating a file name pattern definition model is similar to that of a tag classification model. The key difference lies in the number of possible outcomes: while we had 25 tag options, the number of file naming patterns is much larger, exceeding a thousand. To address this challenge, there are two primary approaches:
* Increase the dataset with training data by thousands of times
* Reduce the number of patterns to 100-200
We chose the second approach and collaborated with the client team to reduce the number of unique patterns.
## Process Automation
The entire workflow is automated and scheduled to run daily. We created a monitoring dashboard using Bubble.io, with data stored in an AWS MySQL database. Scripts run on AWS ECS, and services interact through a custom API.
Process Automation
## Process Monitoring and Dashboard
To ensure seamless operation and provide real-time insights, we developed a comprehensive monitoring dashboard using Bubble.io, a powerful no-code platform. This custom dashboard allows the law firm’s staff to monitor the status of each batch and individual file as it moves through the automated workflow.
## Conclusion
By implementing this advanced automation solution, we have significantly enhanced the law firm’s document processing capabilities.
The system not only reduces manual labor and operational costs but also improves accuracy and speed in handling critical legal documents. As we continue to refine and expand the system’s capabilities, we anticipate even greater efficiencies and performance improvements in the future.
**Transform Your Business with AI Automation**
See how AI can enhance efficiency and reduce manual tasks. Let’s explore how automation can work for you.
 to start the conversation.
You might also like
No-code Platforms: Exploring Bubble.io for Simplifying Common Development Tasks
In this article, we describe how we used a no-code platform Bubble.io for a client's project.
Transforming Legal Operations with AI Automation
Learn how to transform and streamline your legal operations with the power of AI automation.
Streamlining software testing with Cypress automation tool and ChatGPT
Diving deep into the shift from manual to automated testing using Cypress.
Ready to start a project?
© 2006-2025 Dizzain Inc. All Rights Reserved
1250 Borregas Avenue,
Sunnyvale, CA 94089
646-781-8591
sales@dizzain.com
# Featured Projects
900+ completed successful digital projects and counting. We are passionate about making our clients prosperous through beautiful digital experiences.
Featured
Product Development
Digital Marketing
WordPress
Mobile
E-Commerce
#### SeriousFun
New SeriousFun website honors 100 years of Paul Newman
#### Nike Sports Camps
2.3x sales growth for a leading youth sports camps operator.
#### Skai.io
Website development and conversion optimization for a leading AdTech business.
#### BJ’s Home Improvement
A winning digital marketing campaign strategy for a leading national retail chain.
#### SeriousFun Children’s Network
A non-profit’s first step into digital lead generation: our 2.4x lead increase story.
#### Prellis Biologics
Branding and Headless Website Development for Biotech Company.
#### Creators Legal
A custom document management platform for a legal tech startup.
#### Obu Nutrition
WooCommerce Design Excellence: E-commerce Evolution at Obu Nutrition.
#### Sports Camps Canada
A slam dunk PPC strategy: boosting ROAS by 43.3% and transactions by 221%
#### Mergers & Acquisitions
Seamless Digital Transformation for a Dealmaker Platform.
#### Create Comfort
Digital transition: From brick-and-mortar to automated e-commerce.
#### SocialFlow
Mobile application for a social media campaign management company.
#### Korban Studio
E-commerce website and system integration for an interior design studio.
#### Modus Endeavor
Web based tool for optimizing decision making across enterprise organizations.
#### The Vacationer
WordPress website development for The Vacationer, a travel blog and a news portal.
#### RedSteel
WordPress website development for RedSteel, a real estate management company.
#### Apis Capital Advisors
WordPress website for a hedge fund.
#### TestSharing
Mobile application development for a crowdfunding platform.
#### Todd Shelton
E-commerce website and digital marketing services for a men’s clothing brand.
#### Ainstags
Mobile application for optimizing social media tags.
#### Dealroom
Web based research platform for technology startup ecosystem in Europe.
#### KNS Contracting
WordPress website and local SEO for a commercial general contractor.
#### Westwood One Sports
WordPress website for a leading sports radio network.
#### Best Black Friday
Best of Black Friday and Cyber Monday shopping deals on the web.
Sunnyvale + New York Web Design Company