Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Getting Started with AI Builder

Save for later
  • 9 min read
  • 23 Oct 2023

article-image

Dive deeper into the world of AI innovation and stay ahead of the AI curve! Subscribe to our AI_Distilled newsletter for the latest insights. Don't miss out – sign up today!

Introduction  

AI is transforming the way businesses operate, enabling them to improve efficiency, reduce costs, and enhance customer satisfaction. However, building and deploying AI solutions can be challenging, even at times for pro developers due to the inherent complexity of traditional tools. That’s where Microsoft AI Builder comes in. 

AI Builder is a low-code AI platform that empowers pro developers to infuse AI into business workflows without writing a single line of code. AI Builder is integrated with Microsoft Power Platform, a suite of tools that allows users to build apps, automate processes, and analyze data. With AI Builder, users can leverage pre-built or custom AI models to enhance their Power Apps and Power Automate solutions. 

One of the most powerful features of AI Builder is the prediction model, which allows users to create AI models that can predict outcomes based on historical data. The prediction model can be used to predict the following outcomes,  

Binary outcome, choice between one value. An example would be booking status, canceled/redeemed.  

Multiple outcomes, a choice between multiple yet fixed outcomes. An example would be the Stage of Delivery, early/on-time/delayed/escalated.  

Numeric outcomes, a number value. An example would be revenue per customer. 

In this blog post, we will show you how to create and use a prediction model with AI Builder using our business data. We will focus on Numeric outcomes and use the example mentioned above, we will attempt to predict the possible revenue we can generate from customers in a lifetime. Let’s get started! 

Getting Data Ready 

The process of building a model begins with data. We will not cover the AI builder prerequisites in the chapter but you can easily find them at Microsoft learn

The data in focus is sample data of customer profiles from the retailer system. The data include basic profile details such as (education, marital status, customer since, kids at home, teens at home), interaction data (participation in the campaign), and transaction summary (purchases both online and offline, product categories) 

 The data needs to be either imported in Dataverse or already existing. In this case, we will import the file “Customer_profile_sample.xls”. To import the data, the user should perform the following actions.  

1. Open http://make.powerapps.com  and log in to your power platform environment.  

2. Select the right environment, and recommend performing these actions in a development environment.  

3. From the left menu pan select table getting-started-with-ai-builder-img-0

4. Now select the option upload from excel. This will start a data import process. 

getting-started-with-ai-builder-img-1 

Figure 1 Upload data in dataverse from excel file. 

5. Upload the Excel file mentioned above “Customer_profile_sample.xls.” The system will read the file content and give a summary of the data in the file. Note if your environment has the copilot feature on, you will see a GPT in action where it will not only get the details of the file but also choose the table name and add descriptions to columns as well.  

getting-started-with-ai-builder-img-2 

Figure 2 Copilot in action with file Summary 

6. Verify the details, make sure the table is selected as “Customer Profile” and the Primary column is “ID.” Once verified, click Create and let the system upload the data into this new table.  

 The system will move you to the table view screen.  

getting-started-with-ai-builder-img-3 

Figure 3 Table View Screen 

 

7. In this screen, lets click on Columns under the Schema section. This will take us to the column list. here we need to scroll down and find a column called “Revenue.” Right-click the column and select edit.  

getting-started-with-ai-builder-img-4 

Figure 4 Updating column information. 

 8. Let's check the feature searchable getting-started-with-ai-builder-img-5 and save the changes.  

 9. We will move back all the way to the table list, by clicking on Table in the left navigation. Here we will select our “Customer Profile” table and choose Publish from the top menu. This will apply to the change made in step 8. We will wait till we see a green bar with the message “Publish completed.”   

This concludes our first part of getting the sample data imported. 

Creating a Model 

Now that we have our data ready and available in dataverse, let's start building our model. We will follow the next set of actions to deliver the model with this low code / no code tool. 

1. The first step is to open AI Builder. To open AI Builder Studio, let go to http://make.powerapps.com

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime

2. From the left navigation, click on AI Models getting-started-with-ai-builder-img-6. This will open the AI model studio.  

3. Select getting-started-with-ai-builder-img-7from the top navigation bar. 

There are many OOB models for various business use cases that developers can choose but this time we will select a prediction model from the options.  

getting-started-with-ai-builder-img-8 

Figure 5 Prediction Model Icon 

4. The next pop-up screen will provide details about the prediction model feature and how it can used. Select getting-started-with-ai-builder-img-9 to begin the model creation process. The model creation process is a step journey that we will explain one by one.  

5. The first action is to select the historical outcome. Here we need to select the table we created in the above section “Customer Profile” and the column (Label) we want the model to predict, in this case, “revenue.” 

getting-started-with-ai-builder-img-10 

Figure 6 Step one - Historical Outcome Selection 

6. The next step is the critical step in any classification model. it is called the feature selection. In this step, we will select the columns to make sure we provide enough information to our AI model so it can assess the impact and influence of these features and train itself. The table has now 33 columns (27 we imported from the sample file and 5 added as part of the dataverse process). We will select 27 columns again as the most important feature for this model. The ones we will not select are.  

  • Created On: it is a date column created by dataverse to track the record creation date. Not relevant in predicting revenue.  
  • ID: it is a numerical sequential number, again we can decide with confidence that it is not going to be relevant in predicting our label “revenue.” 
  • Record Created On: Dataverse added column.  
  • Revenue (base): a base currency value.  
  • UTC Conversion Time zone: Dataverse added column. 

Before moving to next step make sure that you can see 27 columns selected. 

getting-started-with-ai-builder-img-11 

Figure 7 Selecting Features / Columns 

7. The next step is to choose the training data with business logic. If you would have noticed, our original imported data contains some rows where the revenue field is empty. Such data would not be helpful to train the model. Hence, we would like a model to train on rows that have revenue information available. We can do so by selecting “Filter the Data” and then adding the condition row as shown in the below figure. 

getting-started-with-ai-builder-img-12 

Figure 8 Selecting the right dataset. 

8. Finally, we are our last step of verification, here will perform one last action before training the model, that is to give this model proper name. let's click on an icongetting-started-with-ai-builder-img-13 to change the name of the model. We shall name the model “Prediction – Revenue.” 

getting-started-with-ai-builder-img-14 

Figure 9 Renaming the Model 

9. Let’s click on getting-started-with-ai-builder-img-15and begin model training.  

Evaluation of model 

The ultimate step of any model creation is the assessment of the model. Once our model is ready and trained, the system will generate model performance details. These details can be accessed by clicking on the model from AI Studio. Let's evaluate and read into our model.  

getting-started-with-ai-builder-img-16 

Figure 10 Model Performance Summary 

  • Performance

AI builder grade models based on model R-squared (goodness of fit). An R-squared value of 88% for a model means that 88% of the variation in revenue can be explained by the model’s inputs. The remaining 12% could be due to other factors not included in the model. For a set of information provided, it is a good start and, in some cases, an acceptable outcome as well.  

  • Most Influential data 

The model also explains the most influential feature to our outcome “revenue.” In this case, Monthly Wine purchase (MntWines) is the highest weighted and suggests the highest association with revenue an organization can make from a customer. These weights can trigger a lot of business ideation and improve business KPIs further.  

  • Warnings

In the detail section, you can also view the warnings the system has generated. In this case, it has identified a few columns that we intentionally selected in our earlier steps as having no association with revenue. This information can be used to further fine-tune and remove unnecessary features from our training and feature selection that were explained earlier.  

getting-started-with-ai-builder-img-17 

Figure 11 Warning Tab in Details 

Conclusion

This marks the completion of our model preparation. Once we are satisfied with the model performance, we can choose to Publish this model. The model then can be used either through Power Apps or Power Automate to predict the revenue and reflect in dataverse. This feature of AI Builder opens the door to so many possibilities and the ability to deliver it in a short duration of time makes it extremely useful. Keep experimenting and keep learning.  

Author Bio

Mohammad Adeel Khan is a Senior Technical Specialist at Microsoft. A seasoned professional with over 19 years of experience with various technologies and digital transformation projects. At work , he engages with enterprise customers across geographies and helps them accelerate digital transformation using Microsoft Business Applications , Data, and AI solutions. In his spare time, he collaborates with like-minded and helps solve business problems for Nonprofit organizations using technology.  

Adeel is also known for his unique approach to learning and development. During the COVID-19 lockdown, he introduced his 10-year-old twins to Microsoft Learn. The twins not only developed their first Microsoft Power Platform app—an expense tracker—but also became one of the youngest twins to earn the Microsoft Power Platform certification.