Intelligent Document Processing with AWS AI/ML - Sonali Sahu - E-Book

Intelligent Document Processing with AWS AI/ML E-Book

Sonali Sahu

0,0
29,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

With the volume of data growing exponentially in this digital era, it has become paramount for professionals to process this data in an accelerated and cost-effective manner to get value out of it. Data that organizations receive is usually in raw document format, and being able to process these documents is critical to meeting growing business needs.
This book is a comprehensive guide to helping you get to grips with AI/ML fundamentals and their application in document processing use cases. You’ll begin by understanding the challenges faced in legacy document processing and discover how you can build end-to-end document processing pipelines with AWS AI services. As you advance, you'll get hands-on experience with popular Python libraries to process and extract insights from documents. This book starts with the basics, taking you through real industry use cases for document processing to deliver value-based care in the healthcare industry and accelerate loan application processing in the financial industry. Throughout the chapters, you'll find out how to apply your skillset to solve practical problems.
By the end of this AWS book, you’ll have mastered the fundamentals of document processing with machine learning through practical implementation.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 209

Veröffentlichungsjahr: 2022

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Intelligent Document Processing with AWS AI/ML

A comprehensive guide to building IDP pipelines with applications across industries

Sonali Sahu

BIRMINGHAM—MUMBAI

Intelligent Document Processing with AWS AI/ML

Copyright © 2022 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s) nor Packt Publishing or its dealers and distributors will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Publishing Product Manager: Dhruv Jagdish Kataria

Content Development Editor: Priyanka Soam

Technical Editor: Sweety Pagaria

Copy Editor: Safis Editing

Project Coordinator: Farheen Fathima

Proofreader: Safis Editing

Indexer: Rekha Nair

Production Designer: Joshua Misquitta

Marketing Coordinator: Shifa Ansari

First published: October 2022

Production reference: 1300922

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80181-056-2

www.packt.com

For my parents, for always loving and believing in me.

For all the women who can do whatever they want, when they want – or will one day.

Contributors

About the authors

Sonali Sahu is a leading Intelligent Document Processing Artificial Intelligence (AI) and Machine Learning (ML) solutions architect on the team at Amazon Web Services. She is a passionate technophile and enjoys working with customers to solve complex problems using innovation. Her core area of focus is AI and ML. She has both breadth and depth of experience working with technology, with industry expertise in healthcare and insurance. She has significant architecture and management experience in delivering large-scale programs across various industries and platforms.

About the reviewer

Winnie Tung has over 30 years of experience solving some of the world’s most difficult technical problems in the financial services industry. She is currently modernizing the AI/ML platform at JPMC. Before that, she worked in AWS Professional Services, specializing in developing AI/ML solutions for the real world. She helps customers to operationalize and manage AI/ML solutions at scale.

Table of Contents

Preface

Part 1: Accurate Extraction of Documents and Categorization

1

Intelligent Document Processing with AWS AI and ML

Understanding common document processing use cases across industries

Understanding the AWS ML and AI stack

Introducing Intelligent Document Processing pipeline

Data capture

Document classification

Document extraction

Document enrichment

Document post-processing (review and verification)

Consumption

Summary

References

2

Document Capture and Categorization

Technical requirements

Signing up for an AWS account

Understanding data capture with Amazon S3

Data store

Data sources

Sensitive document processing

Understanding document classification with the Amazon Comprehend custom classifier

Training a Comprehend custom classification model

Understanding document categorization with computer vision

Summary

3

Accurate Document Extraction with Amazon Textract

Technical requirements

Understanding the challenges in legacy document extraction

Using Amazon Textract for the accurate extraction of different types of documents

Introducing Amazon Textract

Using Amazon Textract for the accurate extraction of specialized documents

Accurate extraction of ID document (driver’s license)

ID document (US passport) accurate extraction

Receipt document accurate extraction

Invoice document accurate extraction

Summary

4

Accurate Extraction with Amazon Comprehend

Technical requirements

Using Amazon Comprehend for accurate data extraction

Understanding document extraction – the IDP extraction stage with Amazon Comprehend

Understanding custom entities extraction with Amazon Comprehend

Training an Amazon Comprehend custom entity recognizer

Checking the performance of a trained model

Inference result from the Amazon Comprehend custom entity recognizer

Summary

Part 2: Enrichment of Data and Post-Processing of Data

5

Document Enrichment in Intelligent Document Processing

Technical requirements

Understanding document enrichment

Learning to use Amazon Comprehend Medical for accurate extraction of medical entities

Amazon Comprehend Medical

Learning to use Amazon Comprehend Medical for medical ontology

Summary

6

Review and Verification of Intelligent Document Processing

Technical requirements

Learning post-processing for a completeness check

Post-processing sensitive data

Learning about the document review process with human-in-the-loop

Summary

References

7

Accurate Extraction, and Health Insights with Amazon HealthLake

Technical requirements

Introducing Fast Healthcare Interoperability Resources (FHIR)

Using Amazon HealthLake as a health data store

FHIR operations with Amazon HealthLake

READ operation

HealthLake PUT request

Handling documents with an FHIR data store

Summary

References

Part 3: Intelligent Document Processing in Industry Use Cases

8

IDP Healthcare Industry Use Cases

Technical requirements

Understanding IDP with healthcare prior authorization

An introduction to the healthcare prior authorization process

Automate prior authorization form filling using Amazon HealthLake

Learning IDP for pharmacy receipt automation

Understanding healthcare claims processing and risk adjustment with IDP

Summary

9

Intelligent Document Processing – Insurance Industry

Technical requirements

Automating the benefits enrollment process with IDP

Understanding insurance claims processing extraction with IDP

The data capture and document classification stages of the IDP pipeline

Document extraction stage of the IDP pipeline

Understanding insurance claims processing document enrichment and review and verification

Claims processing for an invalid claims form

Summary

10

Intelligent Document Processing – Mortgage Processing

Technical requirements

Automating mortgage processing data capture and data categorization with IDP

Automating mortgage processing data capture and data categorization with IDP

Understanding mortgage processing extraction and enrichment with IDP

Extraction with Comprehend

Document enrichment for mortgage application processing

Understanding the mortgage processing review and verification stage of the IDP pipeline

Understanding financial services use cases for document processing

Summary

References:

Index

Other Books You May Enjoy

Part 1: Accurate Extraction of Documents and Categorization

In the first part, we will start with a brief introduction to Intelligent Document Processing (IDP) with AWS AI and ML, and then you will learn about accurate custom classification in the IDP pipeline. Next, you will learn about accurate data capture and data extraction in the IDP pipeline. Finally, the focus will be on Amazon Comprehend entities and the custom entities feature to leverage during the enrichment stage of the IDP pipeline.

This section comprises the following chapters:

Chapter 1, Intelligent Document Processing with AWS AI and MLChapter 2, Document Capture and CategorizationChapter 3, Accurate Document Extraction with Amazon TextractChapter 4, Accurate Extraction with Amazon Comprehend

1

Intelligent Document Processing with AWS AI and ML

It was a Wednesday evening – I was busy collecting all my receipts and filling out my insurance claim document. I wanted my health insurance to provide reimbursement for the COVID-19 test kits that I had purchased. The next day, I went to the post office to send the documents through postal mail to my insurance provider. This made me think how we are still working with physical documents in the 21st century. With my approximate math, this month alone, we will use 650 million documents per month, considering that 2% of the entire US population buys a test kit and applies for reimbursement using a paper-based application. This is a ton of documents in this instance. In addition to physical copies, we may have tons of documents that might just be scanned documents – we are looking at manual processing for these documents too. Can we do any better in the 21st century to automate the processing of these documents?

Besides this particular instance, we use documents for many other use cases across industries, such as claims processing in the insurance industry, loan, and mortgage documents in the financial industry, and legal and contract documents. If you have bought a house or refinanced a house, you will already be aware of the number of documents that you need to use for loan processing. IDC predicts worldwide data to exceed 175 zettabytes by 2025. The volume of data is huge. On top of the volume of data, we are talking about data of different formats and unstructured – some are forms, as with insurance claims, and some can be dense text, as with legal contractual documents. The volume and varying formats of documents make manual processing time-consuming, error-prone, and expensive. According to IDC, there is a 23% growth in data every year. The immense scale and format of documents make it a challenge to process them. Moreover, the legacy or traditional document extraction technologies can work well for pristine documents, but when document quality varies, the performance of those early-generation systems frequently does not meet customer needs. Manual document extraction carried out by a human workforce introduces variability into the process since people make mistakes and double-checking all work is not cost-effective. The most important of these factors is the ability to get the key information from the documents into your decision-making systems to make high-quality decisions more quickly and based on accurate information. Hence, we are all looking for efficient, less time-consuming, cost-effective ways to process our documents for better insights.

In this introductory chapter, we will be establishing the basic context to familiarize you with some of the underlying concepts of document processing, the challenges in document processing, and how AWS Artificial Intelligence (AI)/Machine Learning (ML) services can help solve these problems.

We will be covering the following topics in this chapter:

Understanding common document processing use cases across industriesUnderstanding the AWS ML and AI stackIntroducing Intelligent Document Processing pipeline

Understanding common document processing use cases across industries

We started with a simple claims processing use case in the healthcare industry. But document processing challenges occur across multiple use cases and industries. For example, with a single patient generating nearly 80 megabytes of data each year in imaging and Electronic Medical Record (EMR) data, according to 2017 estimates, RBC Capital Markets projects that by 2025, the compound annual growth rate of data for healthcare will reach 36%. When a patient visits a physician, an immense amount of data is generated. Equally, when you speak with customers, they say they have petabytes of data in their archive, which is sitting there in a drive or tape drive without being processed further for legal or regulatory reasons, and most of it is unstructured data. For example, some healthcare providers in the US store medical history records for at least 7 years as per the regulation. If we can analyze a patient’s historical data, we can build a predictive model for any chronic disease. This data is a gold mine, but because of the lack of an efficient, cost-effective mechanism for document processing, it sits there unused. Most of this data is currently stored as archived data and retired after the 7-year period is over. Can we use this data to derive insights for better healthcare outcomes?

Similarly, in the financial industry, there is a need for document processing – for example, when processing mortgage documents. Anyone who has bought a new home or refinanced their home must know the number of documents and different document types that we deal with for mortgage processing. McKinsey’s report emphasizes that mortgage providers should get things right the first time to reduce any delay in processing. To address the timely verification of these documents, we need to empower loan officers with the right tools, automation, and insights. The immense volume and format of documents and the need to derive insights from them require automation with the right indexing, categorization, and extraction, with human reviews as needed to detect anomalies and get the mortgage documents right the first time for timely processing.

It is not only the healthcare or financial industries that require document processing but also industries across verticals and use cases such as legal documents and contracts, insurance, ID handling, and enrollments with the use of advanced technologies such as AI and ML, wants to automate document processing with advanced AI and ML technologies. Intelligent Document Processing uses AI-powered automation and ML to classify, extract, transform, and enrich our documents for consumption. Before discussing advanced technologies and solutions, it is always good to start with the basics. So, let’s first set the foundation of AI and ML.

Understanding the AWS ML and AI stack

Just five decades ago, ML was still a thing of science fiction. But today, it is proven to be an integral part of our everyday lives. It helps us drive our cars, recommends personalized shopping experiences, and helps us utilize voice-enabled technologies such as Alexa. The early days of AI and ML began with simple calculators or chessboard games but by the 20th century, this has evolved into diagnosing cancer and more. The initial theory of ML was in research and labs and now it has moved from labs to real lives applications across industries. This is a change in the adoption of AI and ML.

Figure 1.1 – AI and ML

What is AI? AI is a wide range of computer science branches related to building smart machines. And ML is a subset or application of AI, as shown in Figure 1.1. The goal of ML is to let the machine learn automatically without any programming or human assistance. We want the machine to learn from its own experience and provide results. You gather data and the model learns and corrects itself based on this data. One of the famous historical achievements of AI or ML is Alan Turing’s paper and the subsequent development of the Turing Test in the 1950s. This established the fundamental goal and vision for AI. This focused on one main thing – can machines learn like humans? After 2 years, Arthur Samuels, another pioneer in the computer science and gaming industry, wrote the very first computer learning program for playing the game checkers. It was programmed to learn from the moves that allowed it to win and then program itself to play the game. With some of the recent AI and ML accomplishments, in the year 2015, AWS launched its own ML platform to make its models and ML infrastructure more accessible.

Now, we see AI and ML in our everyday usage. If you have used any e-commerce or online media or entertainment platforms, you must be familiar with receiving personalized recommendations or using conversational chatbots and virtual assistance with AI services. These personalized recommendations and experiences drive user engagement. Similarly, any helpdesk calls at contact centers can be automated with AI, driven to reduce the burden on human beings with reduced costs. Moreover, AI can be used in automatic document processing for accurate extraction and analysis and to instantly derive insights from it, as in loan processing or claims processing.

Now, we see a wide presence of ML and AI in our everyday usage and industries are busy building newer models to learn better and more quickly to give accurate predictions and accelerate business value. But the main question is – can we share the experience and knowledge that we learned when building models? Can a builder re-use an already trained model for its own business without spending time and effort to train another model? So, can we share our experience and knowledge and ML models for any builder to use and focus on their business needs?

The answer is yes, and for that reason, AWS has divided its ML stack into three broad categories. Let’s discuss the three individual AI/ML stacks in detail and their core goals in solving user requirements in the following figure:

Figure 1.2 – The ML framework and infrastructure at the bottom of the AWS stack

At the bottom of the AWS AI or ML stack, we see services and features targeted at expert ML practitioners who have the expertise and are comfortable working with ML frameworks, algorithms, and deploying their ML infrastructure. Some of the AWS ML frameworks and infrastructure are shown in Figure 1.2. AWS offers users their framework of choice, thus supporting ML frameworks such as PyTorch, Apache MxNet, and TensorFlow to run optimally on the AWS platform. The bottom layer also stacks CPU and GPU