Finance, Tax, Audit and Contract Review
Where a wrong figure or a false citation has consequences, the design question is who can check the work and how.
In finance, tax, audit and law, an answer is only usable when someone can trace it to evidence and an accountable person approves it. Let ordinary code do arithmetic and matching, let the agent gather evidence and propose explanations, and keep posting, filing, signing and advising with qualified people. Published failures show that fluent text with invented sources can pass a busy reader.
What you will learn: two published cases about unchecked generated content, four illustrative designs for reconciliation, tax preparation, audit evidence and contract review, how to build an evidence trail, and how to check citations.
Prerequisites: Finance, Tax and Audit Agents, Legal and Compliance Agents and Human-in-the-Loop and Approval Gates.
The examples run in November 2026 with Python 3.13 and only the standard library. All ledger entries, contracts and clauses are invented. Search results about the published cases were checked on November 28, 2026. This page is general information, not accounting, tax, audit or legal advice.
Why these domains are different
Many business tasks tolerate a rough draft. These do not, for four reasons. Figures must agree exactly. Claims need support that another person can inspect. Rules change with dates and places. And a named person or firm carries responsibility for the result, whatever tool helped to produce it.
Published: a government report with fabricated references
Evidence: news reporting. It concerned generative AI used in drafting a consulting report, not an autonomous agent.
In October 2025, news organizations reported that Deloitte Australia had agreed to refund part of its fee for a report of about A$440,000 prepared for the Department of Employment and Workplace Relations. The report reviewed an IT system connected to automated penalties in the welfare program. The Register and Fortune described errors that included references to works that did not exist and a made-up quotation from a court judgment. A revised version disclosed that generative AI had been used. The department said the substance and recommendations had not changed.
Three points are worth taking away, none of which requires guessing about what happened inside the firm:
- A reference list that looks complete is not a verified reference list.
- Conclusions that survive correction do not repair lost confidence in the work.
- Disclosure of AI use is best agreed before delivery, not added afterward.
Published: Mata v. Avianca
Evidence: a United States federal court decision. General information only.
Lawyers filed material that cited court opinions which did not exist, including invented quotations, produced with ChatGPT. When the citations were questioned, they continued to stand by them for a time. On June 22, 2023, a judge in the Southern District of New York imposed a $5,000 sanction on the lawyers and their firm. The ABA Journal summarized the order, which also required letters to the client and to the judges falsely named as authors.
The finding turned on the lawyers' conduct, not on the mere use of a tool. For system builders, the point is that verification must be a step with an owner and a record. Asking the same model whether a citation is real is not verification.
A source can be invented, or it can be real and misquoted. Existence checks catch the first. Quotation and meaning checks are needed for the second, and meaning still needs a competent reader.
Finance reconciliation
A distribution company matches bank receipts to open invoices at month end. All names and amounts are invented.
Problem
Most lines match exactly. The rest carry fees, part payments, combined payments or wrong references, and staff spend the close hunting through messages for explanations.
Design
Matching rules in ordinary code handle exact and well-defined cases. For the remainder, the agent searches remittance messages and attachments, then proposes an explanation with links to the evidence. It cannot post journal entries.
Controls
| Control | How it works |
|---|---|
| Separation of duties | The preparer, whether person or agent, never approves |
| Limits | Items above a value or age threshold need a second reviewer |
| Immutable evidence | Inputs, rule version, proposal and decision are stored together |
| Duplicate protection | The same reference cannot be applied twice without review |
| Payment details | Changes to bank accounts are outside the agent's tools |
| Untrusted text | Instructions inside remittance notes are treated as content only |
Measures
Share matched by rules, share of agent proposals accepted unchanged, reversals found later, age of open items and close time. A high acceptance rate deserves suspicion if reviews take seconds, so the team inserts known wrong proposals in a training copy to check attention, with staff told that this happens.
Lessons
Many gains came from the rules and from cleaner references requested from customers. The agent helped most with the long tail, and proposals without linked evidence were rejected by design.
Tax preparation support
An accounting practice wants help assembling business tax work papers. All details are invented and no tax rule is stated here.
The agent collects documents from an approved client folder, extracts values with page references, lists what is missing and fills a work paper. Calculations run in a tested calculation engine whose rules are maintained and dated by qualified staff. The agent does not recall rates or thresholds from model memory.
| Item in the work paper | Must carry |
|---|---|
| Extracted value | Document, page, location and extraction check |
| Calculated value | Inputs, engine version and rule set date |
| Judgment | Question, options, who decided and why |
| Missing evidence | What is needed, who was asked and when |
| Approval | Named preparer and reviewer |
Anything requiring interpretation is raised as a question, not silently chosen. Client confidentiality limits where documents may be processed and what is retained; see PII Redaction and Data Leakage Prevention. Success means fewer review notes about missing support and less time assembling files, with no rise in later corrections.
Audit evidence gathering
An internal audit team tests whether purchases were approved by someone with authority. All details are invented.
The agent pulls the selected sample's orders, approvals and the authority list as it stood on each date, compares them in code and prepares an evidence pack. The auditor chooses the sample method, judges exceptions and writes conclusions.
Traceability has practical consequences. Screens change, so the pack stores the retrieved record, not just a link. Queries are saved so the population can be checked for completeness. If the agent could not obtain an item, the pack says so; a gap must never be filled with a plausible summary. Reviewers also need independence from the systems and people under test, which affects who may configure the agent.
Contract review
A legal team reviews incoming supplier agreements against its own playbook. All contracts and positions are invented.
The system splits the document by clause, retrieves the matching playbook position, extracts key terms and marks differences. Each finding quotes the clause and gives its number. A lawyer accepts, edits or rejects the finding and decides the negotiation position.
| Failure | How it is caught |
|---|---|
| Missed clause | Checklist reports every required topic as found or not found |
| Definition changes meaning elsewhere | Definitions retrieved with the clauses that use them |
| Amendment overrides the main text | Document set and order of precedence confirmed first |
| Poor scan | Low extraction confidence sends pages to a person |
| Invented or altered quotation | Exact text match against the file before display |
| Confidential matter mixing | Access limited by matter, enforced in retrieval |
The most useful evaluation set contains contracts where lawyers already agreed the findings, including unusual drafting. Report missed issues by severity, since one missed liability term matters more than several correct date extractions. See Multimodal, Vision, Video and Document Agents and Query Rewriting, Multi-Hop, SQL and Multimodal RAG.
Rules, proposals and approval
The first program matches invented bank lines to a ledger. Rules decide exact matches, one known fee becomes a proposal that needs confirmation, and anything else is an exception. Each record gets a short digest so that a later change can be noticed.
"""Rules match, the agent only proposes, and a second person approves."""
import hashlib
import json
LEDGER = {"INV-101": 1200.00, "INV-102": 845.50, "INV-103": 4300.00,
"INV-104": 99.99}
BANK = [("B1", "INV-101", 1200.00), ("B2", "INV-102", 830.50),
("B3", "INV-103", 4300.00), ("B4", "INV-999", 99.99),
("B5", "INV-103", 4300.00)]
KNOWN_FEE = 15.00
def classify(ref, amount, used):
if ref not in LEDGER:
return "exception", "reference not in ledger"
if ref in used:
return "exception", "possible duplicate payment"
gap = round(LEDGER[ref] - amount, 2)
if gap == 0:
return "matched", "exact amount"
if gap == KNOWN_FEE:
return "proposed", "difference equals bank fee; confirm on statement"
return "exception", f"unexplained difference {gap:.2f}"
def record(line_id, ref, amount, status, reason):
body = {"line": line_id, "ref": ref, "bank": amount,
"ledger": LEDGER.get(ref), "status": status, "reason": reason}
text = json.dumps(body, sort_keys=True)
body["digest"] = hashlib.sha256(text.encode()).hexdigest()[:10]
return body
def approve(item, preparer, approver):
if approver == preparer:
return "refused: preparer cannot approve"
if item["status"] == "exception":
return "refused: resolve the exception first"
return "approved"
used, items = set(), []
for line_id, ref, amount in BANK:
status, reason = classify(ref, amount, used)
used.add(ref)
items.append(record(line_id, ref, amount, status, reason))
for i in items:
print(f"{i['line']} {i['ref']} {i['status']:9} {i['digest']} {i['reason']}")
print()
for item, approver in [(items[1], "agent"), (items[1], "priya"),
(items[3], "priya")]:
print(f"{item['line']} prepared by agent, approver {approver}:",
approve(item, "agent", approver))
Output:
B1 INV-101 matched 3c417df30c exact amount
B2 INV-102 proposed 08f8a92c29 difference equals bank fee; confirm on statement
B3 INV-103 matched 18b38950e3 exact amount
B4 INV-999 exception 2f06970709 reference not in ledger
B5 INV-103 exception be43e883c5 possible duplicate payment
B2 prepared by agent, approver agent: refused: preparer cannot approve
B2 prepared by agent, approver priya: approved
B4 prepared by agent, approver priya: refused: resolve the exception first
The second payment against the same invoice is held as a possible duplicate, and the agent cannot approve its own work. The digest is only a teaching device: a real audit trail needs protected storage, access control and synchronized time, because anyone who can rewrite a record can also recompute its digest. See Human Approval, Thresholds and Secure Logging.
Check citations and quotations
The second program rejects a draft when a cited clause does not exist or the quoted words are not in it. The same shape applies to references, case citations and report footnotes, using a licensed or official database as the source.
"""Block a draft whose citations or quotations cannot be found in the sources."""
# A stand-in for a licensed research database. Every entry here is invented.
SOURCES = {
"Contract A, clause 9.2":
"Either party may terminate on ninety days written notice.",
"Contract A, clause 14.1":
"Liability is capped at the fees paid in the prior twelve months.",
}
DRAFT = [
("Contract A, clause 9.2", "ninety days written notice"),
("Contract A, clause 14.1", "fees paid in the prior twenty-four months"),
("Contract A, clause 22.7", "automatic renewal applies"),
]
def check(citation, quote):
text = SOURCES.get(citation)
if text is None:
return "NOT FOUND: citation does not exist"
if quote.lower() not in text.lower():
return "MISMATCH: quoted words are not in the source"
return "found: a reviewer still checks meaning"
results = [(c, check(c, q)) for c, q in DRAFT]
for citation, result in results:
print(f"{citation:24} {result}")
blocked = sum(not r.startswith("found") for _, r in results)
print()
print("release draft:", "no" if blocked else "to reviewer", f"({blocked} blocked)")
Output:
Contract A, clause 9.2 found: a reviewer still checks meaning
Contract A, clause 14.1 MISMATCH: quoted words are not in the source
Contract A, clause 22.7 NOT FOUND: citation does not exist
release draft: no (2 blocked)
A passing result only means the words appear. It does not show that the passage supports the argument, is still valid, applies in that place or is quoted fairly. Real text matching also has to handle line breaks, punctuation and page headers without becoming so loose that changed numbers slip through.
Design review so it works
| Weak review | Stronger review |
|---|---|
| One approve button for a long document | Each finding or entry decided separately |
| Fluent summary shown first | Source text shown beside the claim |
| No time allowed | Review time planned and measured |
| All items equal | Order by value, risk and uncertainty |
| Silent corrections | Reason codes that feed evaluation |
| Reviewer also benefits from speed | Independent sampling of approved work |
People tend to trust a system that has been right many times. Rotate reviewers, sample approved items again and watch whether rejection falls toward zero without a measured reason. See Progress, Approval, Undo and Handoff UX and LLM Judges, Human Review and Ratings.
Acceptance tests before real work
- Totals and subtotals agree with an independent calculation.
- Every displayed claim opens its source.
- A planted false reference is blocked.
- A real reference with altered words is blocked.
- A missing document is reported as missing.
- A user without access to a client or matter retrieves nothing from it.
- The preparer cannot approve, including through a second interface.
- An earlier period can be reconstructed with the rules of that date.
Obligations and records
Professional standards, financial reporting controls, privacy law, privilege and sector rules may all apply, and they differ by country and role. Involve the responsible professionals before a pilot, record the system in your inventory, and decide how long prompts, outputs and traces are kept. See Agent Inventory, Policy-as-Code and Release Gates, EU AI Act and US AI Policy and Safe Logging, Sampling and Retention.
Common mistakes
| Mistake | Consequence | Instead |
|---|---|---|
| Letting the model do arithmetic | Plausible wrong totals | Compute in tested code |
| Relying on model memory for rules | Outdated or wrong treatment | Maintained, dated rule sources |
| Accepting references unchecked | Fabricated support in delivered work | Verify existence, words and meaning |
| Storing only a summary | Nothing to audit | Keep source copies and rule versions |
| Agent with posting or filing rights | Hard-to-reverse errors | Propose only; a person acts |
| Counting drafting time saved alone | Review cost hidden | Measure time to approved result |
Checklist
- Accountable professional named for each output type
- Calculations separated from generated text
- Sources shown beside claims
- Citation and quotation checks block release
- Preparer and approver separated
- Access limited by client, entity or matter
- Evidence and rule versions retained as required
- Disclosure of AI use agreed with the recipient
Frequently asked questions
Can an agent file a return or post journals?
In these designs it cannot. It prepares and proposes, while authorized people approve and act through controlled systems.
Is retrieval enough to stop invented citations?
No. Retrieval lowers the risk, but you still need to check that each reference exists, the words match and the passage supports the claim.
Are the published cases about AI agents?
They concern generative AI used in professional writing. We include them because the verification lesson applies directly to agent output.
How do we show an auditor what the system did?
Keep inputs, source copies, rule and model versions, proposals, decisions and approvers in protected records that can be replayed by a person.
References
- The Register: Deloitte report refund (October 2025)
- Fortune: errors in the Australian government report (October 2025)
- Bloomberg Law: sanctions in Mata v. Avianca, No. 22-cv-1461 (June 2023)
- ABA Journal: the sanctions decision
- NIST AI Risk Management Framework
Where to go next
Finance, Tax and Audit Agents
Domain patterns for finance, tax and audit work.
Legal and Compliance Agents
Contract and compliance support with oversight.
Data, Software and Supply Chain
Cases where automated checks do much of the verifying.