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.

Most of a tax ticket is reading, and the reading is what a model can take on The path of a typical ticket. The shaded steps are reading, and that is where a model saves time.
  • 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

InputWhy it helps
The failing request and responseThe facts of what was sent and what came back. Without these it can only guess.
A similar call that workedA 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 lineShows which rules fired, in what order, and what each one changed.
A rule export for the company, if the trace points at oneLets it read the conditions of a rule that did not fire.
Your notes on past issuesSymptoms, causes and fixes from earlier tickets. This is where most of the value comes from over time.

Questions that get useful answers

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.

A narrow question returns a short list you can check The kind of answer a narrow question returns (illustrative). Every row can be checked against the two files in a minute.
  • 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

Guardrails we use

  1. 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.
  2. 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.
  3. Get the treatment from people. The model finds the mechanism. The tax team confirms what the result should be before anything changes in production.
  4. 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.
The model reads, the test tool proves, and the tax team decides Who does what on one ticket. The model appears once, in the middle, and nothing it says reaches production without a re-run and a tax decision.
  • 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

Every past issue is filed under the same six headings One issue, one short file, the same six headings every time (illustrative). The symptom line is what a new ticket gets matched against.
  • 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.