Create AI Model Using AI Builder To Extract Data From Document In Power Platform

Introduction

 
AI Builder is a component of the Microsoft Power Platform which adds artificial intelligence to applications, workflow, chatbot and data analytics. This article will describe the simple steps to build a model and train it using AI builder which can be used to automate processes intelligently. AI builder helps to add intelligence in workflows and automate business processes using power apps and power automate. In this article we will learn how build a model and train it for further use in a power platform.
 
Here, I will show how to extract the data from the form and train the model accordingly. We will use form processing to extract data from the document. Form Processing identifies the format or structure of the provided sample documents and extracts text from the matching form. This extracted data can be saved into our database, SharePoint list, and/or library property and loaded in power apps form for further use. We will use invoices as sample document to train and test the model for demonstration purpose sin this article.
 

Steps

 
Power Apps Studio or Microsoft Flow website provides navigation pane to access AI Builder. Go to AI builder from Power Apps Studio or Power Automate/Flow Website.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
We can get different types of AI builder in power apps studio or Microsoft flow site, such as Category Classification, Entity Extraction, Form Processing, Object Detection, Prediction and many more. In our case, we will use form processing as we are going to extract the data from invoice document. Form Processing is like Optical Character Recognition, so we need this for our scenario. It is recommended to use standard documents (same format of documents) for training and testing the model to get proper accuracy.
 
Secondly, select and click on Form Processing. Give the name of your AI model and click on create. For my case, I am giving the name as Demo AI Model. 
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Then, click on create as depicted above which automatically brings you to the below screen. 
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Now, it’s time to choose information or fields which we are going to extract using this model. I am going to show an exmaple of extracting data from invoice document. Thus, I am adding fields: Invoice Number, Invoice Date, Invoice Amount, Invoice From and Invoice For as extracting field.
 
Add necessary fields and click on Next.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Subsequently, we need to add sample training documents which should have same format of those that we are going to extract data from.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
For learning and test purposes we can get a sample document from the get sample documents option beside Add documents as illustrated in the above picture. For training purposes, at least we have to upload a minimum of five documents.
 
Click on add documents and upload documents from the appropriate location.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Upload the documents and click on Close after upload completion. Now, click on analyze, it analyzes documents and reads information from documents.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Analyzing may take few minutes.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
After analyzing we have to tag documents, select appropriate area and tag with the correct field that we have added earlier for instance, tag Invoice from the appropriate text area in the document and do the same for all five fields: Invoice For, Invoice Date, Invoice Number and Invoice Amount.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 Create AI Model using AI Builder to Extract Data from Document in Power Platform
Repeat this for all uploaded documents and click on Next after tagging all uploaded documents. 
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Then, click on Training. It trains the model. This may take few seconds to train the model.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
Now, you can go to details of Model by clicking on Model. You can publish and do a quick test of the document.
 
Create AI Model using AI Builder to Extract Data from Document in Power Platform
 
To test the Model, click on Quick Test and upload test documents. It will show the results of your test, you can hover and see the test output. After testing your model Click on Publish to publish it. Then you can use it in your flow or application.
 

Conclusion

 
This article has described simple steps to train and build models using AI Builder in Power Platform which adds intelligence to automate business process, applications and flow. These days intelligence has become the most crucial thing in every application, processes and flow. Hence, after creating this model we can use this AI model in our power automate, flow, chatbot, business intelligence and power apps to add intelligence in business processes, flow and applications.