Pipeline to:
- mine DECLARE constraints from event logs,
- generate KPI proposals with an LLM,
- generate PPINot code,
- execute PPIs on the log,
- produce reports and experiment artifacts.
src/declareppipilot/: core library (pipeline.py,models.py,llm.py, prompts/schemas)tests/: runnable integration scripts for the pipelineexperiments/: RQ experiment scripts (rq1...rq5)data/logs/: input logs (e.g.DomesticDeclarations.xes)outputs/: generated artifactsrequirements.txt: Python dependencies
pip install -r requirements.txtDepending on provider, configure credentials:
- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - LM Studio:
LMSTUDIO_BASE_URLandLMSTUDIO_MODEL(optional key env)
Run from project root.
python tests/test_full_pipeline.pyThe script auto-detects available providers and writes outputs into outputs/.
python tests/test_declareppipilot.pyuvicorn webapp.main:app --reloadThen open:
http://127.0.0.1:8000/
Dashboard features:
- upload
.xeslog - set provider/model (and optional API key)
- optional time grouping via quantity + unit (internally mapped to
xWE,xME,xYE) - optional
min_support - KPI dashboard grouped by business goal with AI-generated readable PPI text and technical details on demand
If running scripts outside this repo root, set PYTHONPATH:
export PYTHONPATH=srcMain API entry points:
run_full_pipeline(...)mine_declare_model_and_constraints_df(...)generate_kpis_from_declare_table(...)generate_ppinot_from_kpi_set(...)execute_ppinot_kpis(...)build_kpi_execution_report(...)
RQ scripts and usage are documented in:
They support multiple providers (openai, anthropic, lmstudio) and save timestamped outputs under outputs/experiments/....
run_full_pipelinenow includes automatic generation of human-readable PPI definitions fromkpi_metric_str.- Generated code execution includes safety checks before
exec.