Skip to main content

Command Palette

Search for a command to run...

A spreadsheet total is not an audit: validate AI-generated analysis with an eight-row CSV

Updated
•4 min read•View as Markdown
A
AIXiamo is an independent third-party AI subscription service for Chinese-speaking users. We publish practical guides on ChatGPT Plus, Pro, Codex, payment options, order lookup, and privacy. Not OpenAI or an authorized reseller.

A correct-looking total is not enough to validate an AI-generated spreadsheet analysis. First define which records belong in the calculation, preserve unresolved data, and recompute independently. The useful output is a subtotal plus its evidence and limitations, not just a polished chart.

This walkthrough uses eight entirely synthetic records. No customer information, payment records, or model benchmark is involved. I ran the companion Python verifier locally; I did not test or rank any ChatGPT model.

Start with a small, inspectable fixture

record_id,status,amount_cny
A01,paid,120.00
A02,paid,80.50
A02,paid,80.50
A03,refunded,99.00
A04,unpaid,60.00
A05,paid,
A06,paid,"1,200.00"
A07,paid,12O.00

The last amount contains the letter O, not zero. A05 has no amount. A02 occurs twice, identically. The quoted thousands separator is valid CSV, not another column.

Before asking for a total, fix the rules: CNY only; exact statuses paid, refunded, and unpaid; refunded means fully refunded; include valid paid records only. Identical records with one ID count once. If any raw field differs between records with one ID, quarantine every version rather than choosing the first or newest. Missing or invalid amounts stay unresolved, never zero.

These are the fixture's teaching rules, not universal accounting rules. Partial refunds, multiple currencies, taxes, and real transaction reconciliation require additional definitions.

Ask for evidence before interpretation

Use this prompt with the CSV:

Analyze this synthetic CSV under the rules below.
Require exactly these ordered headers: record_id,status,amount_cny.
Include only valid paid records. Treat refunded as fully refunded.
Count identical duplicate records once. If the same ID has any raw
field difference, quarantine all versions. Do not infer missing
amounts or replace the letter O with zero. Return included IDs,
excluded IDs with reasons, duplicate IDs, anomalies, the confirmed
paid subtotal, and an incomplete flag. Describe the calculation
method. Do not describe an incomplete subtotal as the final total.

If the model offers code, inspect and run it in an appropriate local environment. Its explanation and its code are separate things to verify. Use synthetic or suitably redacted data; do not upload credentials or unnecessary personal information.

Recompute without the model

The Chinese companion guide includes the downloadable orders.csv and validate_orders.py. With both files in one directory:

python3 validate_orders.py orders.csv

The locally verified result is:

input_rows: 8
exact_duplicate_rows: 1
confirmed_paid_records: 3
confirmed_excluded_records: 2
unresolved_records: 2
confirmed_paid_total: "1400.50"
incomplete: true

A01 + A02 + A06 = 120.00 + 80.50 + 1200.00 = 1400.50. A03 and A04 are excluded by the stated status rules. A05 and A07 remain unresolved. This is a confirmed subtotal, not proof that every record has been reconciled.

What the verifier protects

Use a CSV parser, not split(','). Python's csv documentation explains quoted-field handling and opening files with newline=''. The verifier uses csv.DictReader with strict=True, then separately checks the exact header order and row field count. Strict CSV parsing alone does not validate your schema.

Group records by ID before calculating. The example compares raw tuples, so even 80.5 versus 80.50 is a conflict under these deliberately strict rules. Decide any normalization policy explicitly; do not silently introduce it during deduplication.

Validate amount strings before removing thousands separators, then construct Decimal from the validated string. Do not convert through float. The Decimal documentation explains decimal representation and arithmetic; it does not make an invalid business rule correct. This example also allocates enough addition precision for large accepted amounts.

Finally, compare the included IDs and anomalies, not only the total. Two wrong selections can produce the same sum. A model answer is useful when another person can reproduce its calculation and see what remains unknown.

By AIXiamo. AI assisted the writing; the synthetic verifier output was checked locally. This is an educational validation example, not a production accounting system or a claim that a paid subscription guarantees accuracy.