Power Platform: Retrain the Invoice Processing AI Model

In today’s fast-paced business environment, efficiency and accuracy in processing invoices are crucial. Leveraging AI technology can significantly streamline this process, reducing manual effort and minimizing errors. Power Platform’s AI Builder offers a powerful tool for automating invoice processing.

This article will walk you through the steps to retrain your invoice processing AI model, ensuring it adapts to various invoice formats and improves its accuracy over time. Whether you’re new to AI Builder or looking to enhance your existing model, this step-by-step approach will help you harness the full potential of AI in your invoicing workflow.

AI Builder

Steps of Solution to Retrain the Invoice Processing AI Model

  1. Access AI Builder: Sign into Power Platform and navigate to AI Builder from the left-hand menu.
  2. Select Your Model: Go to the “Models” section and select the existing invoice processing model you want to retrain.
    Models
  3. Prepare New Training Data: Collect new invoices that include the variations and languages you want the model to learn. Ensure the data is clean, well-labeled, and representative of the types of invoices you expect to process.
  4. Upload Training Data: In AI Builder, upload the new training data. You can do this by selecting “Add data” and choosing the source of your new invoices (e.g., SharePoint, OneDrive, or local files).
    Training Data
  5. Define Fields: Specify the fields you want the model to extract, such as invoice number, date, amount, vendor name, etc. This helps the model understand what to look for in the invoices.
  6. Retrain the Model: Use the new data to retrain the model. AI Builder will process the documents and update its learning to recognize the specified fields across different languages. This step may take some time depending on the amount of data and complexity.
  7. Test the Model: After retraining, test the model with new invoices to ensure it accurately extracts the required information. Use a set of test invoices that were not part of the training data to validate the model’s performance.
  8. Deploy the Model: Once satisfied with the model’s performance, deploy it within your Power Platform environment. You can use it in Power Apps or Power Automate to automate invoice processing.
  9. Automate Retraining (Optional): To automate the retraining process, create a Power Automate flow that periodically uploads new training data and retrains the model. This ensures your model stays up to date with minimal manual intervention. (Refer to the below section for Retraining Power Automate Flow Implementation)
  10. Monitor and Improve: Continuously monitor the model’s performance. If you notice any decline in accuracy, retrain the model with new data to keep it up to date. Use feedback from users to make further improvements.

Power Automate Flow: Automated retraining of Invoice Processing AI Model

  1. Trigger the Flow
    • Trigger: Manually trigger a flow or use a scheduled trigger.
    • Input: Add a file input to upload the invoice.
  2. Extract Invoice Information
    • Action: Use AI Builder’s Extract information from invoice action.
    • Input: Use the file uploaded in the trigger.
  3. Check Confidence Scores
    • Condition: Add a condition to check if the confidence score of the extracted data is below a certain threshold (e.g., 0.8).
    • If Yes: Proceed to retrain the model.
    • If No: End the flow or proceed with further processing.
  4. Retrain the Model
    • Action: Collect new labeled data if available.
    • Action: Use AI Builder to retrain the model with the new data.
    • Action: Update the model in your flow.
  5. Save and Test
    • Action: Save the flow.
    • Action: Test the flow to ensure it works as expected.

Example Flow Diagram

Here’s a simplified diagram of the flow.

Flow Diagram

By following these steps, you can effectively retrain and maintain your AI invoice processing model in Power Platform.