Prediction Models
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks and see fewer ads — read each lesson on a single page with Pro
Mastering Prediction Models in AI Builder
Introduction: Why Prediction Models Matter
In the modern enterprise landscape, the ability to foresee outcomes based on historical data is no longer a luxury; it is a fundamental requirement for operational efficiency. Prediction models within AI Builder allow organizations to transform raw historical records into actionable intelligence without requiring deep expertise in data science or complex programming. By analyzing past patterns, these models can estimate future values, categorize incoming requests, or flag potential risks before they materialize.
When we talk about "managing environments" in the context of AI Builder, we are referring to the structured lifecycle of these models—from initial data preparation and training to deployment and continuous monitoring. A prediction model is only as good as the data it is fed and the environment in which it resides. If you configure these models correctly, you enable your organization to automate decision-making processes that previously required hours of manual review by human analysts.
This lesson explores the technical architecture of prediction models, the nuances of data selection, the iterative process of model training, and the practical strategies for maintaining these models over time. Whether you are aiming to predict customer churn, estimate delivery times, or categorize support tickets, the principles covered here will serve as your blueprint for success.
Understanding Prediction Model Types
AI Builder offers several distinct types of prediction models, each designed to solve specific business problems. Choosing the correct model type is the most critical decision in the configuration process because it dictates how the system interprets your historical data.
Binary Classification
Binary classification is used when you need to predict one of two possible outcomes. This is the most common form of predictive modeling in business environments. Examples include:
- Customer Churn: Will a customer cancel their subscription next month? (Yes/No)
- Lead Conversion: Will this sales lead result in a closed deal? (Yes/No)
- Fraud Detection: Is this transaction fraudulent? (True/False)
Multiclass Classification
Multiclass classification extends the binary concept by allowing for more than two possible outcomes. This is essential when you have categories that are not mutually exclusive but represent distinct buckets. Examples include:
- Support Ticket Routing: Should this ticket be sent to the "Billing," "Technical Support," or "Shipping" department?
- Sentiment Analysis: Is the customer feedback "Positive," "Neutral," or "Negative"?
- Product Categorization: Does this item belong in "Electronics," "Home Goods," or "Apparel"?
Regression Models
Regression models are used to predict a numerical value rather than a category. Instead of a "Yes/No" or a "Label," the system outputs a number representing a quantity, a duration, or a currency amount. Examples include:
- Revenue Forecasting: What will be the total revenue for this account next quarter?
- Delivery Estimation: How many days will it take for this shipment to arrive?
- Inventory Planning: How many units of this item will be ordered in the next week?
Callout: Classification vs. Regression The primary distinction between these two approaches lies in the output. If you are asking "What type?" or "Which category?", you need a classification model. If you are asking "How much?" or "How many?", you need a regression model. Choosing incorrectly will lead to "data mismatch" errors during the training phase.
Configuring the Environment: Data Preparation
Before you even open the AI Builder interface, you must ensure your data is ready. Prediction models are "data hungry" and require clean, structured information to function effectively. If your environment contains "dirty" data—incomplete records, inconsistent naming conventions, or duplicate entries—the model will struggle to find meaningful patterns, leading to poor predictive performance.
Data Quality Requirements
To get started, your data should ideally reside in a structured format, such as a Dataverse table, a SQL database, or a well-structured Excel/CSV file. The key requirements are:
- Sufficient History: You generally need at least 50 to 100 records for each outcome to see any result, though thousands are preferred for accuracy.
- Predictive Features: Your data must contain the variables (columns) that influence the outcome. If you are predicting sales, you need columns for price, region, and previous purchase history.
- Outcome Column: Your historical data must contain the "answer" (the label or value) for every record so the model can learn from it.
Data Cleaning Checklist
Before you begin the configuration wizard, perform these steps:
- Remove Incomplete Records: If a record is missing the outcome value, it is useless for training. Delete or exclude it from the dataset.
- Standardize Formats: Ensure that dates are in a consistent format and that categorical values (like "US," "USA," "United States") are normalized into a single value.
- Identify Noise: Remove columns that provide no predictive value, such as internal IDs, timestamps that don't influence outcomes, or free-text fields that haven't been processed.
Note: AI Builder automatically handles some data cleaning, such as ignoring columns with too many missing values. However, relying on the system to clean your data is a bad practice. You should always perform your own data validation to ensure the model's logic is sound.
Step-by-Step: Building Your First Prediction Model
Once your environment is prepared, you can begin the configuration. Follow these steps to build and train your model.
Step 1: Select the Prediction Type
Navigate to the AI Builder dashboard in your environment. Select "Prediction" as the model type. You will be prompted to choose between binary classification, multiclass classification, or regression. Select the one that matches your business requirement.
Step 2: Select the Data Table
Point the builder toward the table that contains your historical data. If you are using Dataverse, this is straightforward. If you are using external data, ensure your connection is properly configured within the environment's data connectors.
Step 3: Choose the Prediction Column
This is the most important step. You must select the column that contains the historical outcome you want to predict. For example, if you are predicting churn, select the IsChurned column.
Step 4: Map Your Features
AI Builder will present you with a list of all columns in your table. Review these and toggle off any columns that should not be used in the prediction.
- Warning: Be careful with "look-ahead bias." If you include a column that contains information that wouldn't be available at the time of the prediction (e.g., a "DateResolved" field when you are trying to predict the outcome of a ticket currently in progress), the model will be artificially accurate during training but useless in real-world scenarios.
Step 5: Train the Model
After finalizing your settings, click "Train." This process can take anywhere from a few minutes to several hours, depending on the size of your dataset. You can safely close the window and return later; the environment will notify you when the training is complete.
Evaluating Performance: Understanding Model Metrics
Once training is complete, you will be presented with a performance score. It is vital to understand what these numbers actually mean.
For Classification Models
- Accuracy: The percentage of predictions that were correct.
- Precision: Of all the times the model predicted "Yes," how many were actually "Yes"? This is important if you want to avoid false alarms.
- Recall: Of all the actual "Yes" cases, how many did the model correctly identify? This is important if you want to ensure you don't miss any instances.
For Regression Models
- Mean Absolute Error (MAE): The average difference between the predicted value and the actual value. A lower MAE indicates a more accurate model.
- Coefficient of Determination (R-Squared): This measures how well the model explains the variance in the data. A value closer to 1 indicates a better fit.
Tip: If your model has an accuracy of 99%, be suspicious. This is often a sign of "data leakage," where you have accidentally included the outcome column or a direct proxy for the outcome in your training features. Always verify your feature selection if the results seem "too good to be true."
Implementing the Model in Power Automate
After training and publishing your model, you need a way to consume its predictions. The most common way to do this is via Power Automate.
Example: Automating Lead Scoring
Imagine you want to score incoming sales leads as they are created in your CRM. You can create a flow that triggers whenever a new row is added to your leads table.
- Trigger: "When a row is added" (Dataverse).
- Action: "Predict" (AI Builder).
- Configuration: Select your published prediction model. Pass the lead's attributes (budget, industry, region) into the model's input fields.
- Action: "Update a row" (Dataverse). Take the output from the AI Builder action (the predicted probability) and save it back to the lead record in a custom column called
LeadScore.
Code Snippet: Handling Output
When using the AI Builder "Predict" action, the output is typically a JSON object. You may need to parse this if you are performing complex logic.
{
"prediction": "Yes",
"probability": 0.87,
"explanation": [
{
"feature": "Industry",
"impact": "High"
},
{
"feature": "Budget",
"impact": "Medium"
}
]
}
In your flow, you can use the probability field to trigger conditional logic:
- If
probability> 0.8, assign to "High Priority" team. - If
probability< 0.3, send an automated follow-up email.
Best Practices for Model Lifecycle Management
Maintaining prediction models is an ongoing task. A model that performs well today may degrade in accuracy six months from now as customer behavior or market conditions change.
1. Continuous Monitoring
Do not "set and forget" your models. Create a dashboard to track the performance of your predictions against the actual outcomes over time. If you see the error rate (MAE) creeping up or the accuracy dropping, it is time to retrain.
2. Retraining Schedules
Set a recurring schedule to retrain your models with the latest data. Most businesses benefit from a quarterly retraining cadence, but for high-velocity environments, you might consider monthly updates. Always keep a version history of your models so you can roll back if a new training run performs worse than the previous one.
3. Feature Engineering
As your business evolves, the factors that influence your outcomes will change. If you launch a new marketing campaign, add that as a feature in your dataset. The more relevant your features, the more accurate your predictions will be.
4. Handling Imbalanced Data
If you have 95% "No" and 5% "Yes" in your training data, your model will be biased toward predicting "No" because that is the path of least resistance. Use techniques like oversampling the minority class or filtering your training data to ensure a more balanced representation.
Callout: The Danger of Bias AI models can inadvertently learn biases present in your historical data. If your historical hiring data reflects past prejudices, the model will learn to replicate those patterns. Regularly audit your models to ensure they are not using sensitive attributes (like gender, race, or age) that could lead to discriminatory outcomes.
Common Pitfalls and How to Avoid Them
Even experienced professionals encounter roadblocks when configuring prediction models. Here are the most common mistakes and strategies to avoid them.
Pitfall 1: Insufficient Data Diversity
If your training data only contains records from one specific region or one specific time of year, the model will fail when applied to other contexts.
- Solution: Ensure your training dataset covers a wide range of scenarios, time periods, and customer segments. If your data is seasonal, ensure at least one full year of data is included.
Pitfall 2: Overfitting
Overfitting occurs when a model learns the "noise" in the training data rather than the actual patterns. This makes the model perform perfectly on training data but poorly on new, real-world data.
- Solution: AI Builder has built-in mechanisms to prevent this, but keep your feature set focused. Avoid including columns with high cardinality (like unique customer IDs) that don't offer predictive value.
Pitfall 3: Ignoring Model Explanations
AI Builder provides "explanation" features that show which variables contributed most to a specific prediction. Many users ignore this, but it is the best tool for debugging.
- Solution: If a prediction seems wrong, look at the explanation. If the model is basing its decision on an irrelevant feature, you know exactly which column to remove from your training set.
Pitfall 4: Misinterpreting Probabilities
A probability of 0.7 does not mean 70% certainty. It represents the likelihood of the outcome based on the patterns found.
- Solution: Treat these values as relative scores rather than absolute certainties. Use them to rank leads or prioritize tasks rather than making binary "all or nothing" decisions.
Quick Reference: Model Configuration Table
| Feature | Binary Classification | Multiclass Classification | Regression |
|---|---|---|---|
| Output Type | Yes/No (Boolean) | Category (Label) | Numerical (Currency/Quantity) |
| Best For | Churn, Fraud, Conversion | Routing, Sentiment, Tags | Forecasting, Estimation |
| Primary Metric | Precision/Recall | Accuracy | MAE/R-Squared |
| Input Data | Labeled History | Labeled History | Historical Numeric Values |
Advanced Strategies: Human-in-the-Loop
One of the most effective ways to manage AI environments is to implement a "Human-in-the-Loop" (HITL) process. Instead of letting the AI make final decisions, use the prediction to assist the human decision-maker.
For example, in a loan approval process, the model might predict a "High Risk" for a specific application. Instead of automatically denying the loan, the system flags it for a manual review by a loan officer. The officer can see the AI's prediction and the "reasons" provided by the model (e.g., "Insufficient credit history"). This combination of machine speed and human judgment is significantly more effective than either approach alone.
Designing for HITL:
- Confidence Thresholds: Use the probability output to set thresholds. Anything above 0.9 is "Auto-Approved." Anything between 0.6 and 0.9 goes to "Manual Review." Anything below 0.6 is "Auto-Denied."
- Feedback Loops: Allow the human reviewer to mark if the AI's prediction was correct or incorrect. This feedback can be stored back into your database and used as a "ground truth" dataset for future retraining, making your model smarter over time.
Troubleshooting Checklist
When your model is not performing as expected, run through this checklist before attempting to rebuild from scratch:
- Check Data Volume: Do you have enough records? If you only have 50 rows, the model cannot learn complex patterns.
- Verify Feature Relevance: Are you including variables that have no logical connection to the outcome?
- Check for Data Leakage: Is there a column in your training data that gives the answer away?
- Review Class Balance: Is one outcome significantly more frequent than the others?
- Inspect Outliers: Are there extreme values in your training data that are skewing the results?
- Check for Missing Values: Does your dataset have too many null fields that are being interpreted incorrectly?
Key Takeaways
As you conclude this lesson on configuring AI Builder prediction models, keep these fundamental principles in mind:
- Start with the Business Problem: Never build a model for the sake of technology. Clearly define the outcome you want to predict (Yes/No, Category, or Quantity) before selecting the model type.
- Data Quality is Everything: Your model is a reflection of your data. Invest the majority of your time in cleaning, structuring, and preparing your datasets.
- Avoid Look-Ahead Bias: Ensure that the features you use for training are only those that would be available at the moment of prediction. Using future information will result in a model that fails in production.
- Use Explanations for Trust: Use the "explanation" features in AI Builder to understand why your model is making certain decisions. This builds trust with stakeholders and helps you identify flaws.
- Iterate and Retrain: A model is a living asset. Establish a rhythm for performance monitoring and periodic retraining to account for changing business conditions.
- Human-in-the-Loop is Key: AI works best as a tool to augment human decision-making, not to replace it entirely. Design your flows to incorporate human oversight for high-stakes decisions.
- Monitor for Bias: Regularly inspect your models to ensure they are not perpetuating historical biases or using sensitive information unfairly.
By following these guidelines, you will move beyond simple experimentation and start creating stable, high-performing AI environments that provide real, measurable value to your organization. Remember that the goal is not to have the most complex model, but the one that best solves the problem at hand while remaining easy to maintain and understand.
Continue the course
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons