Itequia

Custom models creation and semi-automatic learning with AI Builder

AI Builder dashboard showing a list of prebuilt and custom models for tasks like document processing, sentiment analysis, and object detection.

Within the creation of automated processes in the Microsoft 365 environment, we find tools like Power Automate and AI Builder. These tools help us in the creation of automated processes. In this article, we will discover how we can use a new action within AI Builder. This action allows us to automatically train our custom models using previous results.

INTRODUCTION TO CUSTOM MODELS

Within the Power Platform tool’s website, in the menu on the left side, we can navigate to the AI Center option. At the bottom, we can see the custom models we have created or that have been shared with us.

List of recently created AI models with details such as name, owner, permissions, status, and last training date.

CREATION OF CUSTOM MODELS

Let’s look at the steps to follow to create a custom model. We will start with an example of a taxi invoice model that I have created.

On the first page, we can choose the type of document we are going to handle. We will opt for “Fixed template documents.”

Interface for selecting document types to process, including templates, general documents, and invoices, with a sample form from the School of Fine Art.

The second screen will allow us to select the fields, assigning them a name and a type. In this case, we will try to extract the time, the amount, and the number of kilometers.

Field selection interface for document processing, allowing users to define text, number, date, checkbox, table, and signature fields.

The third section allows us to create collections to upload test documents for training. Let’s focus on a special source given to us, the “Feedback Loop.” At this moment, we have 0 items available.

Document collection interface showing a group named 'Colección 1' with five uploaded documents for model training.

Finally, the last page allows us to mark the different fields and associate them with the ones we have created.

Close-up of a taxi receipt used for training, displaying fields like license number, start and end time, distance, service charge, and total amount.

DATA EXTRACTION USING THE CUSTOM MODEL

In our Power Automate flows, we can use our custom models to extract information from documents. In our example case, we can extract information from taxi invoices using the “Extract information from documents” action. We will mark the use of our taxi invoice model, the type of document, and the content of the document.

AI Builder interface for extracting data from JPEG-format taxi invoices using a custom model.

CONFIDENCE IN VALUES RETURNED BY AI BUILDER

For each of the values returned, AI Builder will give us a confidence score from 0 to 100% indicating how certain it is that the data is correct. This allows us to trust and automate the process by applying a minimum threshold for this confidence. In our case, we have set a value of 85%. That is, if the confidence exceeds 85%, we will trust the data and continue with the automatic process. If not, we will leave it for human processing.

Extracted data preview showing a time field with a confidence score of 0.995.
Conditional workflow in Power Automate based on AI confidence score, triggering different actions depending on the result.

AUTOMATIC TRAINING IMPROVEMENT

As we have seen in the model training section, we cannot fully automate the training of these models based on results extracted from the use of our model in our flows. However, Power Automate now offers a new action that adds value to training our models. This action is called “Save file to AI Builder feedback loop”.

In this action, we will send the file to the section I previously named as “Feedback Loop” in the editing of our model. This point is interesting if we combine it with the confidence topic mentioned earlier. When the extraction results with our model are positive, we will send them to this section. Thus, in a simple way, a person can retrain the model again only with files that are giving positive results.

AI Builder configuration window for saving a file in the feedback loop, showing selected model 'taxi invoices' and source fields like body and title.

If we want to continue improving the performance of our model, we must keep retraining it. And what better way to do this than with real cases that have been processed. Therefore, it is important that the person responsible for maintaining the model retrains it periodically with these files sent directly from the flows. When entering the model list, it will be marked in this way.

List of AI models including 'taxi invoices' and a document processing model, with details such as owner, status, and last training date.

Once we enter the editing mode and go to the section to add new documents to the collections, we will see the following:

Interface for managing document collections in AI Builder, showing a notification about new feedback loop documents and an existing collection named 'Colección 1'.

And if we click on the collection to add a new document, we will see that we already have N items. N will be the number of documents successfully processed by our model.

Data source selection screen in AI Builder with options like My Device, Feedback Loop, SharePoint, and Azure Blob Storage.

CONCLUSIon

Although we still cannot perform fully automatic training within our AI Builder models, we have made great progress. We can improve the efficiency of our training and automatically send files to our models. This avoids uploading low-quality files that reduce the performance of our models.

Let’s see if in the future the only action we are missing to fully automate this step appears. This action would save us the last step of going to the model editing mode, adding, training, and publishing the new version of the model.

Would you like to improve the automation of your processes with Power Automate and AI Builder? Start today and discover how these tools can transform your workflow! Contact us.

Adrian Cano Esteban – Architecture Team – Lead Developer at Itequia
Custom models creation and semi-automatic learning | Itequia AI Web