Thursday, May 8, 2025

Generative AI and Process Mining - A world of possibilities - Part 2

In my previous article, we explored how a Copilot agent, integrated with Power Automate and Azure OpenAI's large language models, can efficiently process both structured and unstructured event logs from diverse storage systems. This integration enables the generation of tabular data in CSV format, facilitating the creation of Process Mining data models. However, the automation did not extend to generating the process model itself. In this article, we delve into a new yet closely related challenge, as detailed below.

Problem Statement

Now that I have my event logs captured in CSV format, stored in Azure Data Lake Gen2 Container, I am ready to connect it to Microsoft's Power Automate Process Mining to create a process model out of it. (If you have not yet tried your hands creating process models from CSV stored in Azure Data Lake Gen2 accounts, please visit Microsoft documentation here.)

As part 2 of this series of articles, we shall explore ways to automate creation of the process model in a Power Platform environment under Power Automate Studio. 

Solution


Fig. 1: High Level Architecture Diagram

  1. The Orchestrator: The Power Automate (which is also named as "The Orchestrator" in my previous article) is just shown in Fig. 1 as a reference to the caller of the Azure Function (see below "Azure Function" step).
  2. Azure Function (Role - Data Modeler): In this part of the solution, the Azure Function is supposed to play one more critical role od Data Modeler by executing Power Platform CLI commands and calling Dataverse Web API to create four resources in Microsoft Dataverse, as follows:
    1. A Power Platform Solution.
    2. A connector that will connect to the Azure Data Lake Gen2 Storage Account.
    3. A connection reference for the connector created in step #1.
    4. Finally, a PM Inferred Task (or the Process Model).
  3. Power Automate Studio Process Mining: Finally the model is ready for: 
    1. Creating visuals in Microsoft Power BI dashboards, or 
    2. Linking to Microsoft Fabric Lakehouse using DirectLake (see "Useful Resources" section below), or 
    3. Power Automate's desktop client for Process Mining (a.k.a. Power Automate Process Mining). See "Useful Resources" section below to know more.

Business Outcomes

This makes the Copilot Agent an apt assistant to a process mining engineer for streamlining an end-end solution or a one-stop-shop for generating process maps, variants, loopholes, root cause analysis and key metrics, etc. from structured and unstructured event logs alike.

Conclusion

This short article is still an as a concept, something yet to be verified. Stay tuned to get more updates once this architecture is tested. The high level architecture will potentially be further broken down into more details in the upcoming articles. Consider following me on LinkedIn so you do not miss on the  latest updates on this blog series.

Useful Resources

How to bring Azure Data Lake Gen2 Storage Container as data source for process mining data model? 

Link Process Model to Microsoft Fabric Lakehouse using DirectLake - 

Process Mining Tutorial from Microsoft -

Disclaimer: The ideas and concepts presented in this blog post are based on personal opinions and are yet to be proven true. They are intended for informational purposes only and should not be considered as professional advice.




Sunday, May 4, 2025

Generative AI and Process Mining - A world of possibilities - Part 1

Generative Artificial Intelligence (GenAI) has rapidly become a transformative force in the technology sector, prompting major cloud service providers to make substantial investments in their infrastructure and GenAI capabilities. Companies like Amazon, Microsoft, Google, and Alibaba are allocating billions of dollars to enhance their GenAI offerings, aiming to meet the growing demand for AI-driven solutions. These investments include expanding data center capacities, developing specialized AI hardware, and acquiring pioneering AI firms. This strategic focus underscores the critical role of GenAI in shaping the future of cloud computing and the broader technological landscape.

Process mining has emerged as a pivotal tool for organizations across various industries seeking to enhance operational efficiency by identifying and addressing process delays, anomalies, and duplications. By analyzing event logs from information systems, businesses can gain accurate insights into their actual workflows, uncovering inefficiencies and opportunities for improvement. This data-driven approach enables the strategic implementation of automation, streamlining processes and boosting productivity. For example, in manufacturing, process mining can optimize production lines by pinpointing bottlenecks and facilitating better scheduling. In the financial sector, it accelerates loan processing and enhances fraud detection. By leveraging process mining, organizations can transform their operations, achieving greater transparency and effectiveness.

Infusing GenAI in process mining offers a transformative approach for various stakeholders—including end clients, consultants, architects, developers, and technology enthusiasts—to optimize business processes and harness the full potential of both technologies. Let us see how. 

Problem Statement

The other day, during a client workshop, my team was demonstrating how Microsoft's Process Mining capabilities can help streamlining process redundancies, fallacies, anomalies, loops, variants, delays, etc., thereby significantly enhancing the efficiency of the process lifecycle. Process mining software heavily depends on the event logs documented in a structured manner. CSV is the universally accepted format for almost every Process Mining tool, technology agnostic. However, in most occasions, these event log data are generally quite large in volume. 

One of the clients asked me a genuinely relevant question which was of immense significance, that I did not have a ready answer to. He said "Almost every process mining tool has similar capabilities that can help streamlining processes. The biggest challenge lies elsewhere. How do we accumulate the data and give them a structure in CSV format? This usually becomes a monumental task." I fumbled for a bit and responded with a submissive grin "This is something I will have to circle back to you. Upfront I can think of GenAI being a potential way to address. But I will do my research and come back."

Since then I had this thought swirling in my head, and finally I got an answer that this article makes an attempt to discuss.

Solution

The solution to the above problem statement is twofold, as illustrated below:
  • Prepare CSV from structured or unstructured event log data.
  • Prepare Process Mining Data Model (is discussed in the next article in this series).



Fig. 1 Architecture Diagram

The idea is to generate a CSV output from captured event logs, that could be in any format, stored in any storage. The below section explains the diagram in Fig. 1 (above):
  1. Event Loggers: Event logs can be generated by a wide range of applications like RPA, apps, manually by data entry operators, etc.
  2. Event Log Storage: Event logs can be captured in any format (both structured or unstructured, i.e. tabular or non-tabular) in any on-prem or cloud data storage.
  3. Application Service Layer: This are main components of the solution. 
    1. Copilot Studio Agent: An agent initiates an interactive conversation with the Process Mining Engineer. In course of the chat thread the agent captures key information like "Process Name", storage information (like SharePoint list, Dataverse table, etc.) where the event logs are stored. The agent also finally provides hyperlink to the output CSV for the user to download and verify the data generated by the agent.
    2. Power Automate (The orchestrator): Flows in Power Automate constitutes the backbone of this solution, that 
      1. Receives user input (see "Copilot Studio Agent" step above). 
      2. Reads event log data stored in the data storage. 
      3. Calls an Azure Function when it is the first time event log data processing in bulk (See "Azure Function" step below). Event data are passed as JSON.
      4. Appends newly created events in the output CSV file (See "Azure Function" step below).
    3. Azure Function: The Azure Function has two roles to play, as follows:
      1. CSV Author: An HTTP Triggered Flex Consumption Azure Function utilizes Azure OpenAI LLMs (as NLP) to give structures to the unstructured or semi-structured event log data read from their storage to CSV format. Finally the output CSV is stored in some storage container (can be any container like Azure BLOB Storage, SharePoint, Dataverse, etc.)
      2. Data Modeler (discussed in my next article)
  4. Security Layer and Responsible AI: The solution is conceived to be using Microsoft's cloud service stack. This makes all services and data secured by Microsoft Entra ID. Also Azure OpenAI and Copilot Studio complies to responsible AI principle.

Conclusion

The integration of Generative AI with process mining represents a significant leap forward in operational efficiency and data-driven decision-making. By automating the transformation of diverse event logs into structured formats, organizations can unlock deeper insights and streamline their workflows. This synergy not only addresses longstanding challenges in data preparation but also paves the way for more agile and responsive business processes.

Stay tuned for future updates where we'll delve deeper into real-world applications, share success stories, and explore advanced techniques in this evolving landscape. If you're passionate about the convergence of AI and process optimization, consider following me on LinkedIn. Your feedback and insights are invaluable—feel free to share your thoughts in the comments below.


What next?

Integration of GenAI and Process Mining is a wide area of discussion, and should take more than just a single article. This is the very first article of a series that will keep getting updated. You can visit my next article in this series here.


Generative AI and Process Mining - A world of possibilities - Part 2

In my previous article , we explored how a Copilot agent, integrated with Power Automate and Azure OpenAI's large language models, can e...