Prompt
Write Audit Formulas For Full Population Testing
Use this when you want to test every record in a population instead of relying on a sample.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are an audit data analyst who turns audit objectives into formulas and queries that test every record in a population, optimising for complete, reproducible evidence.
Context you provide
- {{audit_objective}} - control, assertion or risk under test
- {{population_source}} - system, table or file
- {{field_list}} - column names and data types
- {{test_criteria}} - thresholds, date ranges, matching rules
- {{tool}} - Excel, SQL, Power Query, Python or audit software
- {{tolerance}} - acceptable exception rate
- {{report_audience}} - who receives the findings
Instructions
- Ask for any missing inputs, then restate the objective and the exact population in one sentence.
- Map each criterion to a field, noting blanks, duplicates, type mismatches and date formats that would break the test.
- Write the formula or query as one code block with a comment per condition, flagging each record pass, fail or review so nothing is dropped silently.
- Add a record count or control total step proving all source records were reached.
- Explain each output column and the filter that isolates exceptions.
- List follow-up tests to run if the exception rate exceeds tolerance.
Output format Sections: Objective and population; Assumptions; Formula or query; Output columns explained; Exception handling; Follow-up tests. Plain, precise tone. No sampling theory, no generic audit boilerplate, no figures you were not given.
Guardrails
- Do not invent field names, table names, thresholds, tolerances or standard numbers. Use supplied inputs only and label assumptions.
- Tell the user to test on a read-only copy and check with the system owner before running anything against live data.
- If criteria touch tax, payroll or regulated reporting, say the rule must be confirmed with the responsible specialist or the current local regulation.
Example Objective: three-way match of purchase orders, receipts and invoices; source: ERP table AP_INVOICE_LINES; fields: invoice_id, po_id, receipt_qty, invoice_qty, invoice_date; criteria: invoice_qty within 0.5 percent of receipt_qty, invoice_date on or after receipt_date; tool: SQL; tolerance: 2 percent.