Using AI to triage tax engine logs
A language model can read a request, a response and a rule export faster than a person and point to where they disagree. It cannot tell you what the tax treatment should be. This is how we use it on support tickets, and where we stop trusting it.
By Herb Park, Clarent Technologies
Where the time goes on a tax ticket
Most tax engine tickets follow the same path: get the request and response, find the line that is wrong, work out which rules fired and why, and decide whether the cause is data, configuration or the integration. The slow part is reading. A single invoice can produce a request and response several thousand lines long, and a rule export for one company can run to hundreds of rules. That reading is what a language model does well.
- Ticket arrives
- Get request and response: From the engine or integration log
- Find the wrong line: Payloads can run to thousands of lines
- Work out which rules fired: A rule export can hold hundreds of rules
- Decide the cause: Data, configuration or integration
- Fix and re-run
What to give the model
| Input | Why it helps |
|---|---|
| The failing request and response | The facts of what was sent and what came back. Without these it can only guess. |
| A similar call that worked | A good/bad pair turns "what is wrong?" into "what is different?", which is a much easier question. |
| The rule trace or audit detail for the line | Shows which rules fired, in what order, and what each one changed. |
| A rule export for the company, if the trace points at one | Lets it read the conditions of a rule that did not fire. |
| Your notes on past issues | Symptoms, causes and fixes from earlier tickets. This is where most of the value comes from over time. |
Questions that get useful answers
- "Compare these two requests field by field and list every difference on line 1, ignoring dates and document numbers."
- "From this trace, list the rules that fired for line 2 in order, with the fields each one set."
- "This rule did not fire. Given this request, which of its conditions failed?"
- "Do any of these past issues match this symptom? Quote the one that matches and say what is different."
Ask narrow questions about the files in front of it. "Why is the tax wrong?" invites a confident answer about tax law. "Which field differs?" gets a checkable one.
- Field: Document date; Working call: 2026-10-02; Failing call: 2026-10-15; Note: Ignored as asked
- Field: Document number; Working call: 90011877; Failing call: 90012345; Note: Ignored as asked
- Field: Ship-to postal code; Working call: 80202; Failing call: (blank); Note: Differs
- Field: Product code; Working call: MAT-55021; Failing call: MAT-55021; Note: Same
- Field: Custom field 3; Working call: RESALE; Failing call: (blank); Note: Differs
- 2 differences on line 1, dates and document numbers excluded
- (1) A checkable finding. Open both files and confirm the field.
- (2) A second difference. The model lists it and does not decide which one matters. Re-running the call does.
Where it goes wrong
- Treatment questions. Whether an ebook sold to a consumer abroad is outside scope, or a service is reverse charged, is a tax decision. A model will answer it anyway and sound sure.
- Engine behavior it has not seen. It may assume conditions combine with AND when your editor treats siblings as OR, or assume a rule runs before another when it does not.
- Long files. It can miss a line in the middle of a large payload. Trim to the affected lines and the header when you can.
- Confident fixes. A suggested rule change is a hypothesis until it has been re-run in test with the original request.
Guardrails we use
- Use an approved tool. Payloads contain customer names, addresses, prices and registration numbers. Use the AI tool your company has approved for this kind of data, and remove what you can before you paste.
- Confirm by re-running. Every conclusion is tested by changing the one field or rule it blames and running the call again in a test tool. If the result does not change, the conclusion was wrong.
- Get the treatment from people. The model finds the mechanism. The tax team confirms what the result should be before anything changes in production.
- Write the outcome down. Record symptom, cause, fix and how it was verified. That record is what makes the next ticket faster, with or without AI.
- 1. Analyst: Remove customer data from the payloads
- 2. AI model: Compare the calls and name the field or rule
- 3. Analyst: Change only what it blames
- 4. Test tool: Re-run the original request
- 5. Tax team: Confirm the intended treatment
- 6. Analyst: Record symptom, cause, fix, verification
The notes matter more than the model
- Symptom: Billing document posts with no tax line
- Environment: ERP production, external tax engine
- Diagnosis: Response was a partial success with no tax on the lines
- Root cause: Ship-to on the customer record had no postal code
- Fix: Completed the address, added a check on new customers
- Verification: Re-ran the original request in test, tax line returned
- (1) Write the symptom the way a ticket would describe it, so it can be found again.
- (2) One cause, stated as a fact about a record, a rule or a mapping.
- (3) How the fix was proved. A note without this is still a hypothesis.
The gains we see come less from the model and more from feeding it a structured record of past issues: one short file per issue with the same headings each time (symptom, environment, diagnosis, root cause, fix, verification). With that record, a new ticket often matches an old one in minutes. The casebook on this site is built the same way, with client details removed.