CA India Logo

V MANMOHAN

Back to AIxFinance Usecases
Local-First Audit Lab & Proof-of-Concept

AI Audit Lab — Demonstrating AI-Assisted Purchase Vouching

An experimental workspace demonstrating how orchestrated AI automation supports audit workflows, audit evidence management, and purchase vouching in a structured, traceable, and resume-aware manner.

The SKILL.md Framework: To elevate the AI Audit Lab from basic prompt-chaining into a fully autonomous system, the project adopts the SKILL.md open standard to govern its agentic workflows. Acting as a strict standard operating procedure (SOP) for the AI, this structured framework provides three critical architectural upgrades: it preserves precious LLM context windows by dynamically loading heavy audit instructions only when a specific task is triggered; it enforces rigid deterministic boundaries by routing document extraction (OCR) to the LLM while restricting zero-margin-of-error financial recalculations entirely to Python; and it enables stateful, resumable audits by instructing the agent to independently track its progress through local JSON configurations.

Workflow Video Demonstration

Watch the end-to-end vouching sequence operating inside a local-first workspace.

AI Audit Lab Architecture

AI Audit Lab Infographic

Core Objectives

Bridging audit logic with LLM capability, ensuring professional skepticism remains strictly in control of the human auditor.

1

Structuring Audit Workflows

Formally defining sequential audit skills so that operations follow a rigorous audit protocol.

2

Organizing Evidence

Systematically storing client files, vouchers, and generated ledgers in isolated, auditable workspaces.

3

Reducing Repetitive Effort

Automating mechanical matching, mathematical verification, and OCR field extractions.

4

Improving Audit Traceability

Maintaining tamper-evident logs and direct audit trails from ledgers back to raw source files.

5

Supporting Vouching Procedures

Cross-matching Ledger vs. Invoices vs. Purchase Orders vs. Goods Receipt Notes (GRNs).

6

Generating Audit Workpapers

Compiling verified outcomes, discrepancies, and audit exceptions into formatted, review-ready Excel workpapers.

Workspace Organization

Workspace Directory Architecture

Each audit client is structured automatically into an isolated folder ecosystem, matching professional engagement management standards.

  • Strict Separation: Isolates client evidence, ledgers, and sampling models to prevent cross-contamination.
  • Resume-Aware Tracking: Holds execution markers in workflow_state.json to enable stop-and-resume workflows.
  • Safety First: Features a recycle-bin configuration (99_Recycle_Bin) preventing permanent loss of audit evidence.
Workspace structure
Clients/
└── FY_2025_26/
    └── MM_Enterprises_Ltd_2026/
        ├── 01_Trial_Balance/           # Raw Trial Balance uploads
        ├── 02_Ledgers/                 # Standardized sub-ledgers
        ├── 03_Supporting_Documents/    # Invoices, POs, GRNs, E-Way bills
        ├── 04_Sampled_Items/           # Generated statistical samples
        ├── 05_Workpapers/              # Completed vouching spreadsheets
        ├── 06_Final_Report/            # Drafted audit summaries
        ├── 99_Recycle_Bin/             # Safe delete preservation layer
        ├── workflow_state.json         # State preservation for execution
        ├── audit_config.json           # Materiality limits & parameters
        └── audit_log.json              # Activity audit trail

Technology Stack

Development EnvironmentVS Code, GitHub Copilot (Agent Mode)
Processing LayerPython, pandas, openpyxl (Deterministic matching)
Storage / WorkspaceLocal folders (OneDrive-synced for collaboration)
AI / Inference LayerOpenAI-compatible APIs, NVIDIA NIM APIs, Local LLMs (Llama-3/Mistral)
Document HandlingPDF text extraction engines, OCR-ready architecture, structured Excel parsing

Modular Skill-Based Architecture

Under the hood, the lab runs on modular audit skills defined inside .github/skills/. Each skill manages a distinct stage of the auditing process:

audit-workflow-orchestrator/workspace-management/materiality-configuration/trail-balance-upload-summary/sub-ledger-upload-review/trail-balance-ledger-reconciliation/document-processing/purchase-vouching/audit-sampling/workpaper-generation/

8-Prompt Demonstration Flow

The purchase vouching demonstration runs systematically through eight prompt gates, each invoking a dedicated audit skill.

Demonstration video: Executing the 8-prompt workflow.

Step 1: Create New Client

Active Gate
User Prompt Input
vmanm>create a new client "MM Enterprises Ltd 2026"
Orchestrated AI Action
  • Creates the audit workspace for the client
  • Initializes audit_config.json
  • Generates the structured folder structure
  • Initializes workflow tracking through workflow_state.json
Primary Outputworkflow_state.json, audit_config.json, Workspace directories
Generated

Vouching Verification Matrix

Assertions verified during the automatic vouching sequence (Prompt 8) against Ledger data.

Audit CheckVerification DescriptionAssertion Verified
Invoice MatchCross-references sub-ledger parameters (date, amount, vendor name) against values extracted via OCR from the physical Purchase Invoice.Occurrence & Accuracy
PO MatchCross-checks invoice details against the approved Purchase Order (PO) to confirm authorized transaction quantities and rates.Measurement & Authorization
GRN MatchMatches invoice line items with the Goods Receipt Note (GRN) to ensure items were physically received before paying.Occurrence & Existence
GST ValidationRe-calculates Tax values (CGST, SGST, IGST) against the taxable base to ensure ledger accuracy matches statutory rules.Accuracy & Valuation
Vendor ValidationMatches vendor names, GSTINs, and bank accounts between the master vendor list and physical invoices to prevent ghost vendor payouts.Completeness & Existence

Design Philosophy & Hybrid Architecture

Combining deterministic calculations with LLM intelligence to build an audit-traceable solution.

Deterministic Processing (Python)

Core math, financial aggregations, and exact dataset reconciliation are handled directly by Python (pandas, openpyxl). Because financial statements tolerate zero margin of error, the system relies on exact calculations rather than LLM inference.

  • Trial Balance math validations (Dr = Cr)
  • Threshold filter applications for materiality
  • Calculations of statutory GST tax tolerances

AI-Assisted Processing (LLMs)

Unstructured language parsing, document classification, OCR verification, anomaly interpretation, and workpaper narrative generation are delegated to LLMs.

  • OCR document classification (Invoice vs. GRN vs. PO)
  • Interpretation of audit exceptions & writing remarks
  • Generating human-readable executive summaries
Future Vision & Scope

The Path to True Agentic AI

Transitioning from structured prompt orchestrations to autonomous AI agents that act with safety boundaries.

1Self-Planning & Executing

Autonomously mapping client data, establishing material scope, and identifying relevant vouching tasks without step-by-step prompts.

2Error Correction Loops

Independently analyzing reconciliation issues, tracing OCR misreads, and fixing data formats before human review escalation.

3Dynamic Scope Adjust

Automatically expanding statistical sample sets or increasing verification assertions when audit risk indicators spike.

Repository Architecture

File / Folder Structure
Description & Role
vouch-ai-audit-lab/
Main Audit Lab project directory
├──.github/
Swarm prompts & agent instructions configuration
│ ├──instructions/
Agent role manuals and rules configuration
│ │ └──Vouch AI.instructions.md
System prompt triggers & agent behaviour boundaries
│ └──skills/
Orchestrator prompt templates (8-prompt skills)
├──OneDrive/
OneDrive-synced active evidence storage
│ └──Clients/
Subfolders grouped by active audit engagement
│ └──2026/
Fiscal year 2025-26 folder
│ └──MM_Enterprises_Ltd/
Execution workspace for MM Enterprises Ltd
│ ├──01_Trial_Balance/
Uploaded raw Trial Balance excel sheet (TB.xlsx)
│ ├──02_Ledgers/
Standardized purchase ledger registers
│ ├──03_Sampled_Items/
Generated sample sets based on performance materiality
│ ├──03_Supporting_Documents/
Extracted raw invoice, PO, and GRN PDF files
│ ├──05_Workpapers/
Output workpapers (Purchase_Reconciliation.xlsx)
│ ├──99_Recycle_Bin/
Recycle bin preservation layer for security
│ ├──audit_log.json
Execution log track and transaction records
│ ├──client_config.json
Client specific materiality configuration parameters
│ └──workflow_state.json
Execution checkpoint track to enable resume
├──workspace_manager.py
Core script for checking paths, folders, & state
└──.env.example
Configuration template for path boundaries and API credentials

Share this Article