Skip to content

MartinMans/audit_standardizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUDIT STANDARDIZER — AI-Assisted Procurement Audit Tool

Phase 3 (POC Complete)

Overview

Audit Standardizer is a local, AI-assisted prototype designed to make procurement audits faster, more consistent, and easier to test.

The tool standardizes heterogeneous audit Excel files into a minimal Standard Data Model (SDM v1) using human-confirmed AI mappings, then runs repeatable audit checks on the standardized data.

This project is intentionally a Proof of Concept (POC):

  • Focused on validating workflow, control, and audit logic
  • Not intended as a production system
  • No model training, no cloud storage, no client data retention

What the Tool Does

Core Capabilities

  • Ingests heterogeneous Excel audit files (POs, invoices, GRNs, vendors, PRs)

  • Allows users to label each sheet by audit role

  • Generates a structured Microsoft Copilot prompt using:

    • column headers
    • sample rows
  • Requires manual confirmation of Copilot’s JSON mapping

  • Produces standardized Excel copies (headers only, data preserved)

  • Runs multiple procurement audit checks

  • Outputs:

    • individual exception reports
    • a consolidated audit summary
  • Can be used via:

    • Jupyter Notebook (engine-first, audit-friendly)
    • Streamlit UI (interactive demo)

All execution is local.


Standard Data Model (SDM v1)

SDM v1 is header-level only and exists solely to provide a common vocabulary for audit checks.

Entities

purchase_requisitions

  • pr_number (required)
  • pr_date (required)
  • department (optional)
  • requester (optional)

purchase_orders

  • po_number (required)
  • po_date (required)
  • vendor_id (required)
  • po_total_amount (required)
  • pr_number (optional)
  • currency (optional)

goods_received_notes

  • grn_number (required)
  • po_number (required)
  • grn_date (required)
  • received_total_amount (optional)

invoices

  • invoice_number (required)
  • po_number (required)
  • invoice_date (required)
  • invoice_total_amount (required)
  • vendor_id (optional)

vendors

  • vendor_id (required)
  • vendor_name (required)
  • bank_account (required)
  • bank_name (optional)
  • swift (optional)

SDM v1 does not enforce business correctness. It enables reuse of audit logic across audits.


Audit Checks Implemented

Check Purpose Required Data
Invoice Before PO Flags invoices issued before PO approval PO, Invoice
3-Way Match PO ↔ GRN ↔ Invoice consistency PO, GRN, Invoice
Procurement Cycle Time PR → GRN lead time analysis PR (optional), PO, GRN
Vendor Bank Anomaly Review Detects shared / multiple bank accounts Vendor Master
Splitting of Purchases Detects threshold circumvention PO, Vendor

All thresholds (amounts, days, windows) are manual audit parameters, not queried from data.


Project Phases (GitHub History)

Phase 1 — Engine MVP (CLI)

  • CLI-based workflow
  • Initial SDM v0
  • Single audit check (Invoice Before PO)
  • Purpose: validate feasibility

Phase 2 — CLI + First UI

  • Streamlit UI added
  • Human-in-the-loop Copilot mapping
  • End-to-end demo readiness

Phase 3 Part 1 — Audit Expansion

  • SDM upgraded to SDM v1
  • Multiple PO-related audit checks added
  • Old CLI engine removed
  • Jupyter Notebook introduced for controlled execution

Phase 3 Part 1B — UI Upgrade

  • UI updated to support SDM v1
  • Persistent check results
  • Summary + packaged exception reports
  • Improved parameter handling

Phase 3 Part 2 — Finalization (Current)

  • UI refinements
  • Data consistency fixes
  • Documentation update
  • Packaging and handover readiness

How to Run

Setup

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Option A — Jupyter Notebook (Recommended for Audit Use)

  • Open the provided notebook

  • Follow step-by-step execution:

    • load audit folder
    • generate Copilot prompts
    • paste mappings
    • standardize data
    • run checks
  • Produces summary + exception outputs

Option B — Streamlit UI (Demo / Interactive)

streamlit run app.py

Design Principles

  • Human-in-the-loop by design
  • No black-box automation
  • Local execution only
  • Audit-friendly reproducibility
  • Checks written once, reused everywhere

This tool is meant to assist auditors, not replace judgment.


About

Proof-of-concept tool for standardizing procurement audit data using a unified data model and running automated audit checks via a Streamlit interface.

Topics

Resources

Stars

Watchers

Forks

Contributors