Skip to main content
Back

Fraunhofer's PMAx Lets Business Users Query Sensitive Process Logs Without Leaking Data

PMAx splits process mining into two LLM agents that write and interpret local Python code, keeping raw event logs off external APIs.

Pro

  • PMAx is a two-agent framework that turns natural language questions into local process mining scripts and reports.
  • An Engineer agent writes Python against a whitelisted PM4Py API; an Analyst agent interprets the resulting artifacts.
  • Only log metadata (columns, types, samples) is sent to the LLM, keeping raw event data on the user's machine.
  • Static verification and a self-correction loop catch bad code before and after execution.
  • A strict output schema forces the Analyst to ground every claim in real computed artifacts.
  • Open-sourced by Fraunhofer FIT and RWTH Aachen; demoed on the BPI Challenge 2017 loan log.

Process mining, the discipline of reconstructing how organizations actually work by mining event logs, has a usability problem. To pull real insights out of a loan application log or a supply chain trace, you traditionally need to know a query language like Celonis PQL or wrangle a Python library like PM4Py. A team from Fraunhofer FIT and RWTH Aachen wants to fix that with PMAx, an agentic framework that lets a business user type a plain English question and get back a rigorous, data-grounded report without ever shipping the underlying log to an external API.

Why you can't just point GPT at an event log

The obvious approach, dumping a raw event log into an LLM prompt, breaks in two directions. LLMs may hallucinate metrics or fabricate algorithmic outcomes when asked to directly compute throughput times or identify process variants, which is unacceptable for anyone making operational decisions from the output. And real-world event logs are massive and typically contain highly sensitive organizational data, so transmitting raw information to external APIs risks exceeding context windows and violates corporate data governance policies.

The alternative, letting the LLM freely write and execute code against your data, has its own failure mode: unverified generated scripts are a security liability. PMAx's contribution is an orchestration pattern that threads this needle.

PMAx architecture diagram showing Engineer Node, Static Verification Layer, Local Execution, and Analyst Node

Two agents, one shared memory

PMAx follows a divide-and-conquer design with two specialized LLM agents. An Engineer agent, grounded with process mining domain knowledge and library APIs, synthesizes executable code to create artifacts like process models, summary tables, and statistical charts. An Analyst agent then interprets these artifacts to compile reports that combine textual insights with visual evidence.

Crucially, the two agents never see the same thing. By isolating the conversation histories with each node, the framework keeps the Analyst from being influenced by code technicalities that could exhaust the context window or lead to reasoning errors. A shared memory state acts as a filtered pipe between them.

What actually goes to the LLM is not the log itself. The framework extracts only lightweight structural metadata to provide the AI with context, and the raw event data never leaves the user's local environment since only a static snapshot of columns with their types is provided.

How a query flows through the system

The pipeline, once you upload a log and ask a question, works like this:

  1. Schema extraction produces an abstraction of the log (column names, data types, attribute samples).
  2. The Engineer Node receives the query plus this metadata and a whitelisted API of PM4Py, Pandas, NumPy, Matplotlib, Plotly, and Seaborn calls.
  3. Generated Python is passed through a static verification layer that checks library compliance and blocks arbitrary I/O.
  4. The script executes locally, in-memory. Any runtime exception triggers a self-correction loop where the captured traceback guides iterative refinement until successful execution or a maximum iteration threshold is reached.
  5. The Analyst Node receives artifacts (dataframes, saved figures, model summaries) and produces the final report.

The Engineer's toolbox is deliberately narrow. It exposes categories like filtering (filter_time_range, filter_pandas_query), abstraction (get_dfg_summary, get_variant_summary), conformance checking with alignment and token-based replay, and persistence helpers. Built-in file I/O is disabled, forcing every output through the API's save functions.

PMAx chatbot interface showing the Engineer agent generating pandas code for throughput time analysis

Anti-hallucination guardrails on both ends

The Analyst has its own reliability tricks. To stay within context limits, it uses an adaptive persistence protocol: small dataframes are serialized as Markdown, while larger ones are summarized via statistics, and raw data sources are transmitted instead of high-overhead images for visualization interpretation. Multi-turn conversations only ship new artifacts per iteration.

To prevent the Analyst from making up numbers that were not actually computed, a strict output schema (a list of typed dictionaries of text or artifact) enforces deterministic artifact referencing, and structural non-conformance or invalid references trigger an automated error-handling cycle that forces the agent to reconcile its report with the empirical evidence stored in the shared state.

The loan application demo

The team validated PMAx on the BPI Challenge 2017 dataset, a real-world loan application log from a Dutch financial institution, and asked five business questions covering typical workflow discovery, throughput distribution, waiting time bottlenecks, the effect of information requests on offer acceptance, and single- vs. multiple-offer success rates.

Running through GPT-5, the Engineer Node successfully synthesized executable Python code in all scenarios, which was manually verified for technical correctness, and the Analyst Node's reports, while occasionally verbose, provided accurate data-grounded insights. The generated artifacts are published in a separate evaluation repository.

Where it fits and where it doesn't

PMAx is useful when you have a flat event log (XES or CSV with case IDs, activities, and timestamps) and want conversational access to standard process mining tasks: discovery, conformance checking, variant analysis, bottleneck detection. It plugs into ProMoAI, the group's open-source tool suite, so you bring your own LLM API key and run everything else locally.

The current limits are honest ones. This is a tool demonstration paper, not a quantitative benchmark, so there's no accuracy number to compare against Celonis or SAP Signavio copilots. The Engineer is confined to a curated PM4Py API surface, so exotic analyses outside that whitelist require extending the toolbox. And the authors note that reports can be verbose. Future work targets Object-Centric Process Mining, translating user questions into relational or graph-based queries to handle more complex organizational processes, plus moving beyond linear workflows toward autonomous inter-agent dialogue.