IFC AutoTest — AI-Powered Internal Financial Controls Testing Engine
AI & Auditing

IFC AutoTest — AI-Powered Internal Financial Controls Testing Engine

Author : CA. Prabhava P Hegde

Watch on Youtube

1. Overview

IFC AutoTest is a Python Flask-based, AI-powered audit management platform that digitises the entire Internal Financial Controls (IFC) engagement — from Risk Control Matrix generation to final report — in a single integrated workflow running on a Windows laptop.


3 MinRCM from narrative📊ICAI SIA 5Compliant sampling🤖AI + HumanClassification control📄One ClickConsolidated WP & Report


Under Section 143(3)(i) of the Companies Act 2013, every statutory auditor of a listed company must report on the adequacy and operating effectiveness of Internal Financial Controls. For a company with 8–10 processes, this typically involves 3–4 weeks of manual effort across disconnected Excel files, Word documents, and email threads.


IFC AutoTest eliminates these bottlenecks. It is grounded entirely in Indian standards — ICAI Guidance Note on IFC (September 2015), COSO 2013 Internal Control Framework, and ICAI SIA 5 for sampling — and requires no cloud infrastructure, no database, and no setup beyond a double-click.


2. Problem Statement

Every CA auditing IFC faces the same manual bottlenecks:


  1. RCM Building: Hours spent translating process narratives into Risk Control Matrices with risks, controls, assertions, and test procedures
  2. Sampling: Sample sizes computed manually or hardcoded — often not compliant with ICAI SIA 5 frequency tables
  3. Test Execution: Results recorded in disconnected Excel files with no linkage between sample, exception, and observation
  4. Observation Drafting: 5C observations written from scratch for each exception, with no automatic pull from the RCM
  5. Communications: Observations emailed as Word attachments, management responses collected manually, no structured tracking
  6. Working Papers: Assembled manually from multiple files — no consolidated, engagement-level working paper
  7. Final Report: Built from scratch in Word for each engagement


IFC AutoTest eliminates all of these bottlenecks in a single integrated platform, with AI handling generation and drafting, and the auditor retaining full control over judgment and classification.


3. Technology Stack


LayerTechnologyPurpose
Backend FrameworkPython FlaskLightweight, auditor-maintainable
AI — GenerationAnthropic Claude Sonnet APIRCM, Gap Analysis, Observations, Engagement Summary
AI — ClassificationAnthropic Claude Haiku APIMW/SD/CD suggestion, control assists — fast + cheap
AI StreamingServer-Sent Events (SSE)Real-time streaming of AI responses to browser
RAG EngineTF-IDF + Cosine Similarity (scikit-learn)Grounded on ICAI GN, COSO 2013, Companies Act
Data StoreJSON flat filesZero database dependency — portable, copy-and-run
Local AnalyticsDuckDBTally transaction snapshots (15-min TTL cache)
Word Generationpython-docxWorking papers and final report — landscape, formatted
Excel GenerationopenpyxlRCM download, WPs, sampling, action tracker
PDF ExportBrowser print (CSS @media print)Landscape, no server-side PDF library needed
FlowchartsMermaid.jsAuto-generated process flowcharts from RCM
Markdown Rendermarked.jsRAG chatbot and AI responses — no raw symbols
Tally IntegrationHTTP XML API (port 9000)Live population pull for sampling
EmailPython smtplib + SMTPDocument requests, observations, client communications
Public URLsngrok (auto-start)Token-authenticated response forms for clients
DeploymentWindows BAT fileDouble-click to start — no server, no cloud




4. Platform Modules — Complete Overview

IFC AutoTest comprises 12 integrated modules covering the full lifecycle of an IFC engagement:


#ModuleKey Features
0Engagement SetupCompany creation, period (From/To), engagement reference, auditor name. Period shown permanently in header.
1IFC Programme (RCM)AI RCM generation from narrative. Excel import. Inline editor with version history. Process flowchart (Mermaid). Document checklist with receipt tracking and email.
2SamplingICAI SIA 5 compliant — frequency + risk level table. Multi-population architecture: different controls linked to different populations. Register upload with column mapping. Seed-based, reproducible. Swap with full log.
3Gap AnalysisAI gap identification from walkthrough notes. History saved per run. Send to client with token-based response form. Include-in-report toggle per gap. AI disclaimer.
4Test of Design (TOD)Walkthrough per control. PASS/FAIL/NA. TOD FAIL creates observation pre-filled from RCM. AI suggests classification — auditor must confirm.
5Test of Effectiveness (TOE)Multi-population execution matrix. Grouped by population block. Deviation rates auto-computed. Exception creates pre-filled observation. Progress counter shows cells-tested / total-cells.
6Audit ObservationsThree tabs: Gap / TOD / TOE observations. KC/NKC + assertions auto-populated from RCM. Classification AI-suggested, amber label until auditor confirms. Batch upload supported.
7CommunicationsMulti-select processes and batches. Email with three sections (Gap / TOD / TOE). Token-authenticated response form — no login for client. Auto-populates management comments.
8Action TrackerAuto-created from non-Pass observations. Status lifecycle: Open → In Progress → Implemented → Verified. Overdue auto-flagged. Comments thread. Excel export.
9Final Report7-section structured editor. Cover page, Read-Through, Summary Table, Recommendations, Gap Obs, Failed Controls, RCM+TOD+TOE per process. Word (landscape) + PDF export.
10Engagement SummaryProcess-wise health scores. Expandable observations. Gap summary. Action tracker status. Token-based client share. Email with top-3 observations inline.
11RAG ChatbotIndexed on ICAI GN, COSO 2013, Companies Act s.134/143, SA 300/315/320/330. TF-IDF + cosine similarity. Control ID hyperlinks in responses. Required-doc status check.


5. End-to-End Workflow

The platform follows the exact sequence of an IFC engagement as mandated by ICAI:


01EngagementSetup02RCMGeneration03DocumentChecklist04Sampling(ICAI SIA 5)05Test ofDesign06Test ofEffectiveness


07AuditObservations08Communications& Responses09ActionTracker10FinalReport11EngagementSummary12RAGChatbot




6. Key Module Deep Dives

6.1 IFC Programme — AI-Powered RCM Generation

Paste a plain-language process narrative. Claude Sonnet generates a complete, ICAI-compliant Risk Control Matrix in under 3 minutes — streaming in real time.


Output FieldGenerated Content
Sub ProcessAuto-grouped from narrative — e.g. Invoice Processing, Payment Authorisation, Reconciliation
Risk ID + DescriptionUnique risk per sub-process with Fraud Risk flag and Risk Level (H/M/L)
Control ID + DescriptionDetailed control description with named process owner and threshold amounts
KC / NKCKey Control classification with yellow highlight on KC rows
AssertionsCO / EO / AV / CT / RO / PD — mapped per control
Frequency + NatureDaily/Weekly/Monthly/etc. + Manual/Automated/IT-Dependent
TOD Steps + DocumentsSpecific walkthrough procedures and documents to inspect
TOE Steps + DocumentsSample execution procedures and evidence documents


6.2 Sampling — ICAI SIA 5 Compliance

Sample sizes are derived from a hard-coded ICAI SIA 5 frequency table — never AI-guessed. The basis is always displayed to the auditor.


Control FrequencyHigher RiskModerate RiskLower Risk
Annual211
Quarterly322
Monthly532
Weekly15105
Daily302015
As and when1053


Example display: "30 items — Daily frequency, Higher risk — ICAI SIA 5"


Multi-Population Architecture (Key Innovation)

Different controls within the same process test different populations. IFC AutoTest supports control-level sampling assignment:

  1. Purchase Register (500 rows) → assigned to transactional controls (daily/weekly frequency)
  2. Vendor Master → assigned to onboarding/event controls (as and when frequency)
  3. Reconciliation Workings → assigned to periodic controls (monthly frequency)

The execution matrix automatically groups controls by their assigned population — the only IFC tool that correctly models this real-world audit reality.



6.3 AI Classification — Human in the Loop

IFC AutoTest uses a strict Human-in-the-Loop approach for deficiency classification:


CodeClassificationDefinition (ICAI IFC Guidance Note)
MWMaterial WeaknessReasonable possibility that a material misstatement will not be prevented or detected on a timely basis.
SDSignificant DeficiencyDeficiency or combination of deficiencies that is less severe than a material weakness but merits attention.
CDControl DeficiencyDesign or operating deficiency that does not meet the threshold of SD or MW.
PassControl is designed adequately and operating effectively. No deficiency noted.



6.4 Final Report — 7-Section Structured Output

The Final Report module assembles all engagement data into a submission-ready document. No AI is used in report generation — it is pure data assembly from the engagement record.


§SectionContent
1Cover PageFirm/Auditor Name, Report Title (REVIEW OF INTERNAL FINANCIAL CONTROLS OVER FINANCIAL REPORTING), Period, Company Name
2Read Through DocumentStatic ICAI-standard explanatory tables: Contents of RCM, Contents of Test of Design — same in every report
3Summary TableOne row per process: Sub Processes | Risks | Controls | KCs | Recommendations | Failures | Untested
4RecommendationsManually added by auditor: Process, Sub Process, Risk, Control, Risk Level, Recommendation Text
5Gap ObservationsAuto-populated from gaps toggled 'Include in Final Report' in Gap Analysis module
6Failed/Untested ControlsAll TOD FAILs and untested controls — remarks required before generation; writes back to source records
7RCM + TOD + TOEPer process: Full RCM (Part A) → TOD results (Part B) → TOE results aggregated (Part C). New page per process.


Output: Landscape Word (.docx) with 1.5cm margins, 8pt font in RCM tables, navy headers, page break per process, Prepared By / Approved By in footer. PDF via browser print (landscape).


7. Key Design Principles


1ICAI Standards as Hard CodeSample sizes from a hard-coded ICAI SIA 5 table — not AI estimation. Basis always shown: "30 items — Daily, Higher Risk — ICAI SIA 5".
2AI Suggests, Auditor ConfirmsClassification (MW/SD/CD) is AI-suggested but blocked from saving until the auditor explicitly confirms. Amber label visible until confirmed. No AI output accepted without human sign-off.
3Zero AI Dependency for Core LogicSampling, deviation rate, KC escalation rules, progress tracking — all pure Python. AI used only where reasoning and drafting add value.
4Runs Without Internet (except API calls)No database, no cloud storage, no external dependencies beyond the Claude API. Portable — copy folder, double-click BAT, run.
5Multi-Population Sampling ArchitectureDifferent controls test different populations. Control-level population assignment — the only IFC tool that correctly models real-world audit reality.


8. Platform Architecture


IFC AutoTest — ArchitectureSingle Flask app (app.py)├── 22 Python modules in src/├── JSON flat-file data store (no database dependency)├── Claude API via SSE streaming (Sonnet + Haiku)├── python-docx + openpyxl for document generation├── DuckDB for Tally transaction snapshots├── TF-IDF RAG engine over ICAI reference documents├── ngrok integration for public token-based email links└── Windows BAT launcher — double-click to start


9. Conclusion

IFC AutoTest is not a generic AI tool applied to auditing. It is an audit workflow built ground-up for IFC engagements under Indian standards — ICAI Guidance Note, COSO 2013, Companies Act 2013, ICAI SIA 5. Every design decision reflects the real-world workflow of a CA firm conducting an IFC engagement.


The platform demonstrates that AI in professional accounting is most powerful not when it replaces auditor judgment — but when it eliminates the documentation burden so the auditor can focus entirely on judgment.