AI for Risk, Compliance & Audit
Proficient · M7 · lesson 7 of 26 · queued
Preview — browse every lesson free. Enroll to mark lessons complete, open partner links and save your progress. Login & enroll →
Chapter 2: AI-Supported Control Testing and Monitoring
📖
now learning

Chapter 2: AI-Supported Control Testing and Monitoring

15 min

Beyond Sampling: How AI Transforms Control Testing

For decades, control testing has been constrained by a practical limitation: you cannot test everything, so you sample. PCAOB AS 2315 and ISA 530 provide frameworks for selecting and evaluating samples, but every auditor knows the uncomfortable truth -- sampling means accepting the risk that your sample does not represent the population. A control could fail 4% of the time, and your sample of 25 might not catch a single failure.

AI changes this equation. Large language models and AI-powered analytics platforms can process entire populations of transactions, control evidence, and exception reports -- not just samples. When you use AI to analyze 100% of purchase orders against approval authority matrices, you are not sampling; you are performing a census. When you use Claude to review every access change log for segregation of duties conflicts, you eliminate sampling risk entirely for that procedure. But this shift creates new challenges: How do you evaluate the reliability of AI-performed testing? How do you document AI test results in a way that satisfies professional standards? And critically, where does AI-assisted testing end and human judgment begin? This chapter equips you to answer those questions with confidence.

Where AI Excels -- and Where It Does Not -- in Control Testing

AI is not equally effective across all control testing scenarios. Understanding its strengths and limitations prevents both underuse and overreliance.

AI excels at: Pattern matching across large datasets (identifying duplicate invoices, unusual payment amounts, transactions outside normal parameters). Text analysis of control documentation (reviewing policies, procedures, and control descriptions for completeness and consistency). Comparison testing (matching expected control attributes against actual evidence). Temporal analysis (identifying trends in control exceptions over time). Configuration review (analyzing system settings against security baselines).

AI struggles with: Evaluating the quality of human judgment in subjective controls (e.g., did management's estimate of credit losses reflect reasonable assumptions?). Testing physical controls (inventory counts, asset inspections). Assessing the tone at the top and control environment factors that require observation and professional skepticism. Understanding entity-specific context that is not captured in written documents. Detecting sophisticated fraud schemes designed to circumvent automated controls.

The practical implication: use AI for high-volume, rule-based, data-intensive testing procedures, and preserve human testing for judgment-dependent, observation-based, and context-sensitive controls. This division of labor maximizes the value of both AI and auditor expertise.

Using AI for Data Analysis in Control Testing

The most immediately actionable AI application in control testing is data analysis. Here are three techniques you can deploy this week.

Technique 1: Full-population transaction matching. Export your transaction data (purchase orders, journal entries, payroll records) and your control criteria (approval thresholds, authorized signers, account coding rules). Upload to Claude with the prompt: "Analyze this dataset against the following control criteria. For each record, indicate whether it meets all criteria. Summarize exceptions by category, frequency, and dollar value. Identify any patterns in the exceptions." For sensitive data, anonymize before uploading or use an enterprise AI deployment with appropriate data protections.

Technique 2: Three-way match verification. Provide the AI with purchase order, receiving report, and invoice data. Prompt: "Perform a three-way match on these datasets. Identify all instances where quantities, prices, or vendors do not match across all three documents. Rank mismatches by dollar value and flag any that exceed our $5,000 materiality threshold."

Technique 3: Journal entry testing. Upload a journal entry register and prompt: "Identify journal entries that meet any of the following fraud risk indicators: posted on weekends or holidays, posted by users who do not normally make entries, round dollar amounts exceeding $10,000, entries with unusual account combinations, entries posted and reversed within the same period." This replicates the journal entry testing required by PCAOB AS 2401 and ISA 240, but across the entire population rather than a sample.

Testing Automated Controls with AI Assistance

Automated controls -- system-enforced approval workflows, input validation rules, access restrictions -- are increasingly prevalent, and AI can significantly enhance how you test them. The key insight is that automated control testing often involves comparing configured settings against expected settings, which is a pattern-matching task AI handles well.

For IT General Controls (ITGCs), you can use AI to analyze system configuration exports against your control expectations. Export the access control list from your ERP system and prompt Claude: "Compare this access control list against the following segregation of duties matrix. Identify all users who hold conflicting access rights. For each conflict, specify the incompatible duties and the risk created." This procedure, which might take an auditor a full day to perform manually across hundreds of users, can be completed in minutes with AI assistance.

For application controls, AI can review system-generated exception reports and help you assess whether exceptions were appropriately investigated and resolved. Upload the exception log and the remediation records, and prompt: "Match each exception to its corresponding remediation action. Identify exceptions that remained open beyond the SLA, exceptions with no documented remediation, and any patterns in exception types that might indicate a systemic control weakness." Always verify the AI's findings against the source system -- the AI is performing the analysis, but you must confirm the results are accurate.

Maintaining Testing Rigor When AI Does the Heavy Lifting

The greatest risk of AI-assisted control testing is not that AI performs poorly -- it is that auditors relax their professional skepticism because AI makes the work feel more authoritative. When an AI tool presents a clean, formatted analysis showing zero exceptions, the temptation to accept that result without scrutiny is powerful. Resist it.

Rigor checkpoint 1: Validate the AI's understanding of the control. Before reviewing results, confirm that the AI correctly interpreted the control being tested. Ask it to describe the control objective, the population tested, the attributes evaluated, and the criteria for pass/fail. If any element is wrong, the entire test is unreliable.

Rigor checkpoint 2: Test the test. Introduce known exceptions into your dataset and verify that the AI identifies them. This is the equivalent of seeding test data -- if the AI misses a known exception, its clean results cannot be trusted.

Rigor checkpoint 3: Assess completeness of the population. AI can only test the data you provide. Verify that your data extraction captured the complete population. A common failure: testing all journal entries from the GL export but missing entries in a sub-ledger that posts independently.

Rigor checkpoint 4: Evaluate the significance of findings. When AI identifies exceptions, apply your professional judgment to assess whether they represent isolated errors, systemic control deficiencies, or potential fraud indicators. AI can flag the anomaly; only you can assess its significance in context.

From Periodic Testing to Continuous Monitoring

AI enables a fundamental shift from periodic control testing (annual or quarterly) to continuous monitoring -- and this shift is already reshaping how leading audit and compliance functions operate. The IIA's Three Lines Model envisions the second line (risk management and compliance) performing ongoing monitoring, but resource constraints have historically limited this to periodic reviews. AI removes the resource constraint.

Practical continuous monitoring applications include: Daily transaction screening using AI to analyze new transactions against control criteria and flag exceptions for same-day review. Weekly access review automation where AI compares current access rights against the approved access matrix and identifies new conflicts or unauthorized changes. Monthly policy compliance scanning where AI reviews new or modified documents (contracts, communications, procedures) against compliance requirements and flags potential violations.

To implement continuous monitoring with AI, you need three components: a reliable data feed from your source systems (API integration or scheduled exports), a defined set of monitoring rules mapped to your control objectives, and an escalation workflow that routes AI-identified exceptions to the appropriate reviewer. Tools like Microsoft Copilot integrated with Power Automate can orchestrate these workflows. The NIST AI RMF's MEASURE function applies here -- you need to track your continuous monitoring program's accuracy (false positive rate, false negative rate) and refine your monitoring rules based on performance data.

Documenting AI-Assisted Test Results for Professional Standards

AI-assisted control testing documentation must satisfy the same professional standards as traditional testing -- plus additional requirements to address the AI component. Here is a documentation framework that meets PCAOB AS 1215 and IIA Standard 2330 requirements.

Test Objective: State the control being tested and the assertion(s) addressed (existence, completeness, accuracy, authorization, etc.).

Population and Scope: Define the population tested. If AI enabled full-population testing, state this explicitly -- it strengthens your conclusion compared to sample-based testing.

AI Tool and Method: Identify the AI tool used, the specific analytical technique, and the prompt or instructions provided. Reference your prompt log.

Data Integrity Verification: Document how you confirmed the data provided to AI was complete and accurate. This is critical -- garbage in, garbage out applies to AI as much as any analytical tool.

Test Results: Present the AI's findings in structured format -- number of items tested, exceptions identified, exception rate, dollar value of exceptions.

Independent Verification: Describe how you validated the AI's results. At minimum, reperform the analysis on a subset of items (both exceptions and non-exceptions) and confirm the AI's conclusions match your manual review.

Conclusion: State your professional conclusion about the control's operating effectiveness, supported by the test results. The conclusion is always yours, never the AI's.

Real-World Scenarios: AI Control Testing in Practice

Scenario 1: SOX testing of revenue recognition controls. An external audit team uses AI to analyze the complete population of revenue transactions against ASC 606's five-step model criteria. The AI identifies 23 contracts where performance obligation allocation appears inconsistent with the company's policy. Manual review of these 23 contracts confirms 18 genuine exceptions, 3 false positives (the AI misunderstood a contract structure), and 2 immaterial items. Result: the team identifies a significant deficiency that sample-based testing of 40 items would likely have missed -- the exceptions were concentrated in a single business unit representing only 8% of total contracts.

Scenario 2: Internal audit of procurement controls. The internal audit team uses Claude to review 12 months of purchase orders against the delegation of authority matrix. AI processes 15,000 POs in 20 minutes and identifies 47 instances where approval authority was exceeded. The team validates a risk-based sample of 15 exceptions, confirms 14, and traces the root cause to a recent organizational restructuring that updated reporting lines but not the approval matrix in the procurement system.

Scenario 3: Compliance monitoring for anti-money laundering. A bank's compliance function uses AI to review customer due diligence files against CDD requirements. The AI flags 200 files with incomplete beneficial ownership information. Investigation reveals a systematic issue with the onboarding workflow for a specific account type, leading to a process correction that reduces future compliance gaps.

Try This Now

Select one control in your current audit or compliance portfolio and perform this AI-assisted testing exercise:

  1. Define the control. Write down: the control objective, the operating frequency, the expected control attributes (who performs it, what evidence is produced, what criteria are applied).
  2. Prepare the data. Export or compile the data needed to test this control. If you cannot use real data due to confidentiality, create a synthetic dataset with at least 100 records that includes 5-10 intentional exceptions of varying types.
  3. Construct your AI prompt. Using the techniques from this chapter, write a prompt that gives the AI context about the control, specifies the testing criteria, and requests structured output. Save the prompt before submitting it.
  4. Run the test. Submit the data and prompt to Claude or ChatGPT. Review the output.
  5. Validate the results. Manually reperform the test on at least 10 items (including at least 3 that AI flagged as exceptions and 3 that AI passed). Do your conclusions match the AI's?
  6. Document your findings using the documentation framework from this chapter. Include your prompt log, the AI output (V0), your validation results, and your professional conclusion.

This exercise demonstrates the full AI-assisted testing workflow and highlights both the efficiency gains and the validation requirements.

Key Takeaways

  • AI enables full-population testing, eliminating sampling risk for data-intensive control testing procedures -- but this power requires new validation disciplines.
  • Use AI for high-volume, rule-based, data-intensive testing; preserve human testing for judgment-dependent, observation-based, and context-sensitive controls.
  • Three immediately deployable techniques: full-population transaction matching, three-way match verification, and journal entry testing against fraud risk indicators.
  • Maintain testing rigor through four checkpoints: validate the AI's understanding of the control, seed known exceptions to test the test, verify population completeness, and apply professional judgment to assess finding significance.
  • AI enables continuous monitoring -- shifting from periodic testing to daily, weekly, or monthly automated screening of control performance.
  • Document AI-assisted test results with the same rigor as traditional testing, adding AI-specific elements: tool identification, prompt log, data integrity verification, and independent result validation.
  • The conclusion on control effectiveness is always the auditor's professional judgment -- AI provides evidence, not conclusions.