Metadata-Version: 2.2
Name: sax4bpm
Version: 0.2.1
Summary: Open source Python library for deriving explanations about business processes based on process,causal and XAI perspectives
Home-page: https://github.com/IBM/sax4bpm
Author: Inna Skarbovsky
Author-email: inna@il.ibm.com
License: GPL 3.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohappyeyeballs==2.3.7
Requires-Dist: aiohttp==3.10.4
Requires-Dist: aiolimiter==1.1.0
Requires-Dist: aiosignal==1.3.1
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anyio==4.4.0
Requires-Dist: asgiref==3.8.1
Requires-Dist: async-timeout==4.0.3
Requires-Dist: attrs==24.2.0
Requires-Dist: backoff==2.2.1
Requires-Dist: bcrypt==4.2.0
Requires-Dist: build==1.2.1
Requires-Dist: cachetools==5.4.0
Requires-Dist: certifi==2024.7.4
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: chroma-hnswlib==0.7.6
Requires-Dist: chromadb==0.4.22
Requires-Dist: click==8.1.7
Requires-Dist: coloredlogs==15.0.1
Requires-Dist: contourpy==1.2.1
Requires-Dist: cvxopt==1.3.2
Requires-Dist: cycler==0.12.1
Requires-Dist: dataclasses-json==0.6.7
Requires-Dist: Deprecated==1.2.14
Requires-Dist: deprecation==2.1.0
Requires-Dist: distro==1.9.0
Requires-Dist: exceptiongroup==1.2.2
Requires-Dist: fastapi==0.112.1
Requires-Dist: filelock==3.15.4
Requires-Dist: flatbuffers==24.3.25
Requires-Dist: fonttools==4.53.1
Requires-Dist: frozenlist==1.4.1
Requires-Dist: fsspec==2024.6.1
Requires-Dist: google-auth==2.33.0
Requires-Dist: googleapis-common-protos==1.63.2
Requires-Dist: graphviz==0.20.3
Requires-Dist: grpcio==1.65.5
Requires-Dist: h11==0.14.0
Requires-Dist: httpcore==1.0.5
Requires-Dist: httptools==0.6.1
Requires-Dist: httpx==0.27.0
Requires-Dist: httpx-sse==0.4.0
Requires-Dist: huggingface-hub==0.24.5
Requires-Dist: humanfriendly==10.0
Requires-Dist: ibm-generative-ai==3.0.0
Requires-Dist: idna==3.7
Requires-Dist: importlib_metadata==8.0.0
Requires-Dist: importlib_resources==6.4.3
Requires-Dist: intervaltree==3.1.0
Requires-Dist: jiter==0.5.0
Requires-Dist: joblib==1.4.2
Requires-Dist: jsonpatch==1.33
Requires-Dist: jsonpointer==3.0.0
Requires-Dist: kiwisolver==1.4.5
Requires-Dist: kubernetes==30.1.0
Requires-Dist: langchain==0.2.14
Requires-Dist: langchain-community==0.2.12
Requires-Dist: langchain-core==0.2.33
Requires-Dist: langchain-openai==0.1.22
Requires-Dist: langchain-text-splitters==0.2.2
Requires-Dist: langsmith==0.1.99
Requires-Dist: lingam==1.9.0
Requires-Dist: lxml==5.3.0
Requires-Dist: markdown-it-py==3.0.0
Requires-Dist: marshmallow==3.21.3
Requires-Dist: matplotlib==3.9.2
Requires-Dist: mdurl==0.1.2
Requires-Dist: mmh3==4.1.0
Requires-Dist: monotonic==1.6
Requires-Dist: mpmath==1.3.0
Requires-Dist: multidict==6.0.5
Requires-Dist: mypy-extensions==1.0.0
Requires-Dist: networkx==3.2.1
Requires-Dist: numdifftools==0.9.41
Requires-Dist: numpy==1.26.4
Requires-Dist: oauthlib==3.2.2
Requires-Dist: onnxruntime==1.19.0
Requires-Dist: openai==1.41.0
Requires-Dist: opentelemetry-api==1.26.0
Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.26.0
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.26.0
Requires-Dist: opentelemetry-instrumentation==0.47b0
Requires-Dist: opentelemetry-instrumentation-asgi==0.47b0
Requires-Dist: opentelemetry-instrumentation-fastapi==0.47b0
Requires-Dist: opentelemetry-proto==1.26.0
Requires-Dist: opentelemetry-sdk==1.26.0
Requires-Dist: opentelemetry-semantic-conventions==0.47b0
Requires-Dist: opentelemetry-util-http==0.47b0
Requires-Dist: orjson==3.10.7
Requires-Dist: overrides==7.7.0
Requires-Dist: packaging==24.1
Requires-Dist: pandas==2.2.2
Requires-Dist: patsy==0.5.6
Requires-Dist: pillow==10.4.0
Requires-Dist: pm4py==2.7.11.12
Requires-Dist: posthog==3.5.0
Requires-Dist: progressbar2==4.4.2
Requires-Dist: protobuf==4.25.4
Requires-Dist: psy==0.0.1
Requires-Dist: pyasn1==0.6.0
Requires-Dist: pyasn1_modules==0.4.0
Requires-Dist: pydantic==2.8.2
Requires-Dist: pydantic_core==2.20.1
Requires-Dist: pydotplus==2.0.2
Requires-Dist: pygam==0.9.1
Requires-Dist: Pygments==2.18.0
Requires-Dist: pyparsing==3.1.2
Requires-Dist: pypdf==4.3.1
Requires-Dist: PyPika==0.48.9
Requires-Dist: pyproject_hooks==1.1.0
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: python-dotenv==1.0.1
Requires-Dist: python-utils==3.8.2
Requires-Dist: pytz==2024.1
Requires-Dist: PyYAML==6.0.2
Requires-Dist: regex==2024.7.24
Requires-Dist: requests==2.32.3
Requires-Dist: requests-oauthlib==2.0.0
Requires-Dist: rich==13.7.1
Requires-Dist: rsa==4.9
Requires-Dist: scikit-learn==1.5.1
Requires-Dist: scipy==1.11.4
Requires-Dist: semopy==2.3.11
Requires-Dist: shellingham==1.5.4
Requires-Dist: six==1.16.0
Requires-Dist: sniffio==1.3.1
Requires-Dist: sortedcontainers==2.4.0
Requires-Dist: SQLAlchemy==2.0.32
Requires-Dist: starlette==0.38.2
Requires-Dist: statsmodels==0.14.2
Requires-Dist: sympy==1.13.2
Requires-Dist: tenacity==8.5.0
Requires-Dist: threadpoolctl==3.5.0
Requires-Dist: tiktoken==0.7.0
Requires-Dist: tokenizers==0.20.0
Requires-Dist: tomli==2.0.1
Requires-Dist: tqdm==4.66.5
Requires-Dist: typer==0.12.4
Requires-Dist: typing-inspect==0.9.0
Requires-Dist: typing_extensions==4.12.2
Requires-Dist: tzdata==2024.1
Requires-Dist: urllib3==2.2.2
Requires-Dist: uvicorn==0.30.6
Requires-Dist: uvloop==0.20.0; sys_platform != "win32"
Requires-Dist: watchfiles==0.23.0
Requires-Dist: websocket-client==1.8.0
Requires-Dist: websockets==12.0
Requires-Dist: wrapt==1.16.0
Requires-Dist: yarl==1.9.4
Requires-Dist: zipp==3.20.0
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# SAX4BPM


<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/sax4bpm_logo6_w.png?raw=true" alt="SAX4BPM-banner" width="600"/>
</div>

**This is a designated Python library that aims to provide an easy and intuitive way of deriving explanations about business processes, considering multiple perspectives. Concretely, three major knowledge ingredients—a process model, a causal process model, and XAI attribute ranking—are derived and subsequently synthesized by an LLM for the construction of process and context-aware explanations, namely Situation-aware Explanations (SAX explanations). The repository contains the source code which can be cloned, or the library can be installed as a Python package using `pip install sax4bpm`.**


<p align="center">
<img src="https://img.shields.io/badge/sax4bpm-v0.2.1-green" />
</p>

<!--🎥 Demo: Here you can see a demo UI with demonstration of the library capabilities [here](https://www.youtube.com/watch?v=EKXFqHtW3Xw&t=6s). In this demo, we use dataset from AutoTwin EU Croma partner to demonstrate library functionality -->

🏁 Getting started: [https://ibm.github.io/sax4bpm/installation.html](https://ibm.github.io/sax4bpm/installation.html)

🛠️ Tutorials: [https://ibm.github.io/sax4bpm/tutorials.html](https://ibm.github.io/sax4bpm/tutorials.html)

📦 Python Package: [https://pypi.org/project/sax4bpm/](https://pypi.org/project/sax4bpm/)

## Documentation

🗃️  The full documentation for this repository can be found at [GitHub Pages](https://ibm.github.io/sax4bpm/index).

## Introduction
The library provides three layers of business process analysis- process mining, causal discovery, XAI analysis, and LLM-powered blending of the analysis outcomes into human-readable process explanations functionality. 

We also provide a simple Streamlit UI for experimentation and discovery of the provided library functionalities.

The library allows importing process event logs in standard formats (MXML, XES, CSV) and invoking the discovery functionality of the desired layer. 
<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/import.png?raw=true" alt="Importing event log" width="600"/>
</div>


For the process perspective, we utilize the open-source PM4PY library allowing the user to invoke process mining algorithms and create a process-model representation out of the process event logs. 
<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/process.png?raw=true" alt="Process discovery" width="600"/>
</div>


We can explore the existing variants in the process model, and choose a particular variant for further analysis.
<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/process_variant.png?raw=true" alt="Process variants" width="600"/>
</div>


After choosing the appropriate variant we can perform causal discovery to infer the causal dependency model for the particular variant and compare it with the process model to discover discrepancies.
<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/causal.png?raw=true" alt="Causal discovery" width="600"/>
</div>


Finally, we can blend the discovery results using LLM-powered analysis of the different process knowledge layers, and receive answers to user queries based on this analysis.
<div align="center">
  <img src="https://github.com/IBM/sax4bpm/blob/main/images/blend.png?raw=true" alt="Knowledge blend" width="600"/>
</div>


## Related Papers

### Causal Business Processes
- F. Fournier, L. Limonad, I. Skarbovsky, Y. David, [The WHY in Business Processes: Discovery of Causal Execution Dependencies](https://arxiv.org/abs/2310.14975), arXix:2310.14975, 2024.

### Leveraging LLMs to explain Business Processes
- D. Fahland, F. Fournier, L. Limonad, I. Skarbovsky, A. J. E. Swevels, [How well can large language models explain business processes?](https://arxiv.org/abs/2401.12846), arXiv:2401.12846, 2024.
