Processing Pipeline
A 7-step orchestrated pipeline that takes a raw PDF invoice and produces a structured HTML audit report with findings and evidence.
Input
Extract
Rates
Issues
Report
Key Features
Labor Rate Validation
Compares billed man-hours and hourly rates against contract terms and historical MRO shop data. Flags variances above configurable thresholds (default: 20%).
Part Markup Analysis
Validates part prices against approved price lists and quotation matching. Detects excessive markup on materials, consumables, and rotable components.
TAT Compliance
Verifies turn-around time against SLA commitments in MRO contracts. Identifies AOG breaches, priority service violations, and consequential delay claims.
Contract Matching
Matches invoice line items against approved quotations (JSON format). Detects scope creep, unapproved work orders, and billing for non-contracted services.
Sample Audit Findings
Example findings from a typical A-Check invoice audit. The HTML report includes full evidence chain and recommended actions.
| Line Item | Billed | Contract / Ref | Variance | Status |
|---|---|---|---|---|
| A-Check Labor (32h @ €180/h) | € 5,760 | € 4,800 (€150/h) | +20% | OVERCHARGE |
| Hydraulic Pump Overhaul | € 12,400 | € 12,000 (QUO-2026-001) | +3.3% | REVIEW |
| Engine Oil SAE 5W-30 (20L) | € 480 | € 480 (approved list) | 0% | APPROVED |
| AOG Part TAT (actual: 52h) | Extra charges claimed | 24h SLA (contract p.8) | +28h breach | SLA BREACH |
| Brake Disc P/N 2550460-3 | € 3,200 | € 2,800 (approved price) | +14.3% | REVIEW |
Module Structure
Modular Python architecture with dedicated validators for each audit dimension. Each module can be configured independently via threshold settings.
Commands
# Generate a sample invoice for testing
$ python scripts/generate_sample_invoice.py
# Run full invoice audit with quotation matching
$ python agent.py data/invoice_INV-2026-001234.pdf \
-q data/quotations/QUO-2026-0001.json
# Audit with custom thresholds
$ python agent.py invoice.pdf --mh-threshold 15 --price-threshold 10
# Output is saved to: output/audit_reports/audit_INV-2026-001234.html