A TDS exception scan for the tax audit, with AI: what it catches, and the traps it must not fall into
TDS clauses of Form 3CD rarely go wrong on large items. They go wrong on the small ones: a labour contractor with fourteen bills under ₹30,000, a legal retainer deducted under the wrong section, a vendor master that says "Individual" for a private limited company. Finding those means going through every row of the expense ledger, which is exactly the kind of mechanical scan an AI tool can do well, as long as you set it up properly.
This article shows how to run that scan with Claude Code, an AI tool that writes and runs scripts on your own laptop, and, more importantly, how to stop it from failing quietly.
Law as checked on 31 October 2026: FY 2025-26 under the Income-tax Act, 1961, after the Finance Act, 2025. Check every threshold, rate and due date against current law before you use it on a client.
The biggest risk: thresholds from memory
Ask any AI model for the TDS threshold on professional fees, and it answers confidently. The question is which year's figure it gives you.
The Finance Act, 2025 moved several limits for FY 2025-26. Section 194J professional fees went from ₹30,000 to ₹50,000, section 194H commission from ₹15,000 to ₹20,000, and section 194-I rent from ₹2,40,000 a year to ₹50,000 a month. A model that learnt the old figures will use them without telling you.
So the first rule is: don't let the AI decide the rules. Keep a rules sheet in Excel (section, nature of payment, threshold, single or aggregate, rate by payee type, ledger heads it applies to) and tell the script to read every limit from that sheet. Change a limit in the sheet, re-run, and the result moves. Now the rules are yours, documented, and reviewable.
The setup
Three files in a clean working folder: the expense ledger, the vendor master (with PAN, payee type and any lower-deduction certificates), and your rules sheet. Nothing else. The AI can read anything in the folder you start it in, so don't start it in a folder that contains other clients' files or your own answer notes.
Then ask in steps: first the structure (sheet names, headers, a few rows), then the scan, then the self-check. Ask for output sheets: Summary, Party aggregates, Exceptions, Late deposits, and possible 40(a)(ia) items.
What a good scan finds
On a 555-row practice ledger with ten planted problems, these are the kinds of exceptions it should produce:
| Problem | Finding |
|---|---|
| Labour contractor (a firm): 14 bills, none above ₹30,000, total ₹2,88,700, no TDS | 194C aggregate crossed: 2% on all of it |
| Legal retainer, TDS under 194C at 2% | Belongs under 194J at 10% |
| Vendor without PAN, TDS at 1% | Section 206AA: 20% |
| Office rent ₹65,000 a month, no TDS | 194-I: each month above ₹50,000, 10% |
| Master says "Individual", but the PAN's 4th character is C | Company rate 2%; correct the master |
| 0.5% deducted, no certificate on file | 2% unless a section 197 certificate is produced |
| November TDS deposited on 19 December | Due 7 December; interest at 1.5% a month or part |
That last column is a draft. Whether each item is an exception still depends on documents the ledger doesn't hold.
Traps a good scan must not flag
This is where most automated checks fail. A good scan leaves these alone:
- A transporter with a section 194C(6) declaration, a PAN and no more than ten goods carriages: no TDS is correct.
- A lower rate backed by a valid certificate.
- Payments under the FY 2025-26 limits that would have been exceptions under the old ones (fees of ₹42,000, commission of ₹18,000, rent of ₹45,000 a month). A scan running on remembered thresholds flags these.
- March TDS paid on 28 April, which is on time, because March tax is due by 30 April.
If your scan flags any of these, the rules are wrong. Fix the sheet or the prompt, not the output.
Check it: totals first, then three by hand
- Ledger total. SUM the amount column yourself. The Summary sheet must show the same figure and row count.
- Heads add back. TDS heads plus non-TDS heads must equal the ledger.
- TDS ties. On a real client, tie TDS deducted to the TDS returns and the TDS payable ledger.
- Re-perform three exceptions by hand: one rent, one aggregate, one late deposit. Use a filter and a calculator. If your figure and the output disagree, the output is wrong until shown otherwise.
From the exception list to Form 3CD
The scan gives you workings, not the report. The party aggregates and exceptions support clause 34(a) (deductible, deducted at the specified rate, at a lower rate, not deducted). The late-deposit sheet supports clause 34(c) (interest under section 201(1A)) once tied to the CPC-TDS figures. The possible 40(a)(ia) list is the starting point for clause 21(b).
It is a list of candidates, not disallowances. Before you report one, check whether the tax was deducted and paid before the section 139(1) due date, and whether the payee has filed a return including the income (Form 26A). Whether a short deduction, or a deduction under the wrong section, attracts 40(a)(ia) has divided courts. That call is yours, not the tool's.
Try it on practice data first
I've built a free practice set for this exercise: a made-up 555-row expense ledger, vendor master and rules sheet, with ten planted problems, six traps that must not be flagged, an answer key, and a test script that grades your output. Download it, with 100+ prompts for CA work, at topmate.io/chandan_gupta31 (the "AI for CAs: Bonus Pack").
Chandan Gupta, CA, CIA, is the author of AI for CAs: A practical guide to Claude Code for tax, audit, advisory and compliance work. Chapter 15 of the book walks through this scan end to end, including the working-paper note. topmate.io/chandan_gupta31
Independent publication; not affiliated with or endorsed by Anthropic. Not professional advice.
This guide is a short version of Chapter 15 of AI for CAs, which walks through it end to end on practice files.